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

Output from ExplainAugmenterFactory and DebugQuery for rerank queries is not same

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Minor
    • Resolution: Unresolved
    • 7.5
    • None
    • search
    • None

    Description

      Currently, if we use the ExplainAugmenterFactory with LtR, instead of using the 
      model/re-rankers explain method, it uses the default query explain (tf-idf 
      explanation). This happens because the BasicResultContext doesn't wrap the 
      query(https://github.com/apache/lucene-solr/blob/1d85cd783863f75cea133fb9c452302
      214165a4d/solr/core/src/java/org/apache/solr/response/BasicResultContext.java#L6
      7) with the RankQuery when its set to context's query, which is then used by 
      the ExplainAugmenterFactory. 
      (https://github.com/apache/lucene-solr/blob/1d85cd783863f75cea133fb9c45230221416
      5a4d/solr/core/src/java/org/apache/solr/response/transform/ExplainAugmenterFacto
      ry.java#L111).

      As a result there are discrepancies between queries like -

      http://localhost:8983/solr/collection1/select?q=*:*&collection=collectionName&wt
      =json&fl=[explain style=nl],score&rq={!ltr model=linear-model}

      http://localhost:8983/solr/collection1/select?q=*:*&collection=collectionName&wt
      =json&fl=score&rq={!ltr model=linear-model}&debugQuery=true

      the former outputs the explain from the SimilarityScorer's explain while the 
      latter uses the correct LtR ModelScorer's explain.

      There are a few other problems with the explain augmenter - for eg. it doesn't 
      work with grouping (although the other doc transformers like LtR's 
      LTRFeatureLoggerTransformerFactory work with grouping)

      Mailing List - 

       

      http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201901.mbox/%3C5C3879D702C30144003902B0_0_18802%40msllnjpmsgsv06%3E

      Attachments

        1. bug.patch
          2 kB
          Sambhav Kothari
        2. 539.patch
          3 kB
          Sambhav Kothari

        Issue Links

          Activity

            People

              Unassigned Unassigned
              samj1912 Sambhav Kothari
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m