Uploaded image for project: 'Terrier Core'
  1. Terrier Core
  2. TR-175

Decorate class does not remove field qualifiers when generating query-biased summaries


    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5
    • Fix Version/s: 3.6
    • Component/s: .querying
    • Labels:


      When the filter() method of the PostFilter org.terrier.querying.Decorate is called, the query string is split as follows:

      String[] _qTerms = q.getOriginalQuery().replaceAll(" \\w+\\p{Punct}\\w+ "," ").toLowerCase().split(" ");

      However, SearchRequest q's method 'getOriginalQuery' returns the full query inclusive of fields (e.g. FIELD:term1 FIELD:term2).

      This results in field-prefixed query terms being used to rank sentences within Decorate's generateQueryBiasedSummary method. This means that every sentence will almost certainly score 0 (unless it happens, by chance, to contain 'FIELD:term' within). With all 0-score sentences the Decorate class resorts to using the first 2 sentences of the meta key's value being decorated.

      Adding the following to the 'filter' method, immediately after "String[] metadata = getMetadata(metaKeys, docid);", remedies this issue:

      for(int p = 0; p < _qTerms.length; p++)
      _qTerms[p] = _qTerms[p].substring(_qTerms[p].indexOf(':')+1);


          Issue Links


            paulholmes Paul Holmes created issue -
            craigm Craig Macdonald made changes -
            Field Original Value New Value
            Link This issue is blocked by TREC-252 [ TREC-252 ]
            craigm Craig Macdonald made changes -
            Fix Version/s 3.6 [ 10060 ]
            Fix Version/s 4.0 [ 10051 ]
            craigm Craig Macdonald made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Fix Version/s 4.0 [ 10051 ]
            Resolution Fixed [ 1 ]


              • Assignee:
                craigm Craig Macdonald
                paulholmes Paul Holmes
              • Watchers:
                0 Start watching this issue


                • Created: