Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-8675

Accessing a field in custom request handler is very slow

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 4.3.1
    • Fix Version/s: None
    • Labels:
      None

      Description

      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?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              neerajlajpal Neeraj Lajpal
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: