You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "mosh (JIRA)" <ji...@apache.org> on 2018/09/02 12:01:00 UTC

[jira] [Comment Edited] (SOLR-12685) RTG should return the whole block if schema is nested

    [ https://issues.apache.org/jira/browse/SOLR-12685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16601188#comment-16601188 ] 

mosh edited comment on SOLR-12685 at 9/2/18 12:00 PM:
------------------------------------------------------

{quote}Perhaps there is a need though to only get that specific doc, and not the whole block, even though the document is in the block, perhaps in place update(I am not very familiar with those features, just to make sure)?
{quote}
Now that SOLR-12519 was committed to master, ChildDocTransformer requires SolrIndexSearcher.
 This requirement causes documents to skip transaction log lookup, instead using a SolrIndexSearcher for docId lookup.
{code:java}
// true in any situation where we have to use a realtime searcher rather then returning docs
// directly from the UpdateLog
final boolean mustUseRealtimeSearcher =
      // if we have filters, we need to check those against the indexed form of the doc
      (rb.getFilters() != null)
      || ((null != transformer) && transformer.needsSolrIndexSearcher());
{code}
{code:java}
if (mustUseRealtimeSearcher) {
    // close handles to current searchers & result context
    searcherInfo.clear();
    resultContext = null;
    ulog.openRealtimeSearcher();  // force open a new realtime searcher
    o = null;  // pretend we never found this record and fall through to use the searcher
    break;
}{code}
I am not quite sure of the performance implications of this requirement.
 In case these implications are not deemed as a limiting factor, the trigger for block lookups under RTG component could be determined purely by the combination of IndexSchema#isUsableForChildDocs in addition to the existence of _root_ field for the specific doc, thus removing the need for an additional flag.
 [~dsmiley],
 your insights would be of the highest of aids.


was (Author: moshebla):
{quote}Perhaps there is a need though to only get that specific doc, and not the whole block, even though the document is in the block, perhaps in place update(I am not very familiar with those features, just to make sure)?
{quote}
Now that SOLR-12519 was committed to master, ChildDocTransformer requires SolrIndexSearcher.
 This requirement causes documents to skip transaction log lookup, instead using a SolrIndexSearcher for docId lookup.
{code:java}
// true in any situation where we have to use a realtime searcher rather then returning docs
// directly from the UpdateLog
final boolean mustUseRealtimeSearcher =
      // if we have filters, we need to check those against the indexed form of the doc
      (rb.getFilters() != null)
      || ((null != transformer) && transformer.needsSolrIndexSearcher());
{code}
{code:java}
if (mustUseRealtimeSearcher) {
    // close handles to current searchers & result context
    searcherInfo.clear();
    resultContext = null;
    ulog.openRealtimeSearcher();  // force open a new realtime searcher
    o = null;  // pretend we never found this record and fall through to use the searcher
    break;
}{code}
I am not quite sure of the performance implications of this requirement.
 In case these implications are not deemed as a limiting factor, the trigger for block lookups could be determined purely by IndexSchema#isUsableForChildDocs,
removing the need for an additional flag.
 [~dsmiley],
your insights would be of the highest of aids.

> RTG should return the whole block if schema is nested
> -----------------------------------------------------
>
>                 Key: SOLR-12685
>                 URL: https://issues.apache.org/jira/browse/SOLR-12685
>             Project: Solr
>          Issue Type: Sub-task
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: mosh
>            Priority: Major
>         Attachments: SOLR-12638-no-commit.patch
>
>
> Currently Solr's RealTimeGet component return the document if provided a docId when consulting the index. For AtomicUpdates for child documents, RTG should return the whole block when dealing with a nested schema.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org