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

DisMax queries are not being cached in QueryResultCache

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.3
    • 1.4
    • search
    • None
    • Using Sun JDK 1.5 and Solr 1.3.0 release on Windows XP

    Description

      I have a DisMax Search Handler set up in my solrconfig.xml to weight results based on which field a hit was found in. Results seem to be coming back fine, but the exact same query issued twice will not result in a cache hit.

      I have run far enough in the debugger to determine that the hashCode for the BooleanQuery object is returning a different value each time for the same query. This leads me to believe there is some random factor involved in it's calculation, such as a default Object hashCode() implementation somewhere in the chain. Non DisMax queries seem to be caching just fine.

      Where I see this behavior exhibited is on line 47 of the QueryResultKey constructor. I have not dug in far enough to determine exactly where the hashCode is being incorrectly calculated. I will try and dig in further tomorrow, but wanted to get some attention on the bug.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tfeak Todd Feak
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: