lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-11891) DocsStreamer populates SolrDocument w/unnecessary fields
Date Mon, 19 Mar 2018 21:32:00 GMT

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

ASF subversion and git services commented on SOLR-11891:
--------------------------------------------------------

Commit 11af2144b66717f41e2fcb5c73c7059cf009a00a in lucene-solr's branch refs/heads/branch_7x
from Chris Hostetter
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=11af214 ]

SOLR-11891: DocStreamer now respects the ReturnFields when populating a SolrDocument
This is an optimization that reduces the number of unneccessary fields a ResponseWriter will
see if documentCache is used

This commit also includes fixes for SOLR-12107 & SOLR-12108 -- two bugs that were previously
dependent on the
un-optimized behavior of DocStreamer in order to function properly.

- SOLR-12107: Fixed a error in [child] transformer that could ocur if documentCache was not
used
- SOLR-12108: Fixed the fallback behavior of [raw] and [xml] transformers when an incompatble
'wt' was specified,
  the field value was lost if documentCache was not used.

(cherry picked from commit 8bd7e5c9d254c1d629a784e0b601885adea2f57b)


> DocsStreamer populates SolrDocument w/unnecessary fields
> --------------------------------------------------------
>
>                 Key: SOLR-11891
>                 URL: https://issues.apache.org/jira/browse/SOLR-11891
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Response Writers
>    Affects Versions: 5.4, 6.4.2, 6.6.2
>            Reporter: wei wang
>            Assignee: Hoss Man
>            Priority: Major
>         Attachments: DocsStreamer.java.diff, SOLR-11891.patch, SOLR-11891.patch.BAD
>
>
> We observe that solr query time increases significantly with the number of rows requested,
 even all we retrieve for each document is just fl=id,score.  Debugged a bit and see that
most of the increased time was spent in BinaryResponseWriter,  converting lucene document
into SolrDocument.  Inside convertLuceneDocToSolrDoc():   
> [https://github.com/apache/lucene-solr/blob/df874432b9a17b547acb24a01d3491839e6a6b69/solr/core/src/java/org/apache/solr/response/DocsStreamer.java#L182] 
> I am a bit puzzled why we need to iterate through all the fields in the document. Why
can’t we just iterate through the requested field list?    
> [https://github.com/apache/lucene-solr/blob/df874432b9a17b547acb24a01d3491839e6a6b69/solr/core/src/java/org/apache/solr/response/DocsStreamer.java#L156] 
> e.g. when pass in the field list as 
> sdoc = convertLuceneDocToSolrDoc(doc, rctx.getSearcher().getSchema(), fnames)
> and just iterate through fnames,  there is a significant performance boost in our case.  



--
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


Mime
View raw message