[ 
https://issues.apache.org/jira/browse/SOLR-8675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Erick Erickson resolved SOLR-8675.
----------------------------------
    Resolution: Not A Problem

Please raise issues like this on the user's list, we try to keep JIRA for 
issues in the code base, not custom code questions.

In this case, I'm assuming your code is in a collect method or some such. 
You're going out to disk and decompressing at least 16K for each doc. This is 
an anti-pattern as stated in the docs.

One possibility would be to access the indexed term directly, or perhaps create 
it as a DocValues field and access that.

Please ask for further details on the user's list.

> Accessing a field in custom request handler is very slow
> --------------------------------------------------------
>
>                 Key: SOLR-8675
>                 URL: https://issues.apache.org/jira/browse/SOLR-8675
>             Project: Solr
>          Issue Type: Improvement
>          Components: search, SearchComponents - other
>    Affects Versions: 4.3.1
>            Reporter: Neeraj Lajpal
>
> I am trying to access a field in custom request handler. I am accessing it 
> like this for each document:
> Document doc;
> doc = reader.document(id);
> DocFields = doc.getValues("state");
> There are around 600,000 documents in the solr. For a query running on all 
> the docs, it is taking more than 65 seconds.
> I have also tried SolrIndexSearcher.doc method, but it is also taking around 
> 60 seconds.
> Removing the above lines of code bring down the qtime to milliseconds. But, I 
> need to access that field for my algo.
> Is there a more optimised way to do this?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to