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

Accessing a field in custom request handler is very slow

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 4.3.1
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: