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

Force field/term centric matching mode for multi-term synonyms with sow=false

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 8.0
    • None
    • None
    • None

    Description

      As Doug Turnbull pointed out on the solr-user mailing list: https://lists.apache.org/thread.html/27590a2d8598be515b24f47f7912e074d2010910242cfdeb1fcd655d%40%3Csolr-user.lucene.apache.org%3E (recommended reading, especially for his discussion of the limitations of the new sow=false request parameter), sow=false changes the queries edismax produces over multiple fields when any of the fields’ query-time analysis differs from the other fields’, e.g. if one field’s analyzer removes stopwords when another field’s doesn’t. In this case, rather than a dismax-query-per-whitespace-separated-term (edismax’s behavior when sow=true), a dismax query per field is produced. This can change results in general, but quite significantly when combined with the mm (min-should-match) request parameter: since min-should-match applies per field instead of per term, missing terms in one field’s analysis won’t disqualify docs from matching. E.g. query “Terminator 100” with request param “mm=100%” against both a title (text) field and a run_length (integer) field will result in the following queries:
      When sow=true:

      +(DisjunctionMaxQuery((title:terminator)) DisjunctionMaxQuery((run_length:[100 TO 100] | title:100)))~2

      When sow=false:

      +DisjunctionMaxQuery((run_length:[100 TO 100] | ((title:terminator title:100)~2)))

      In the above scenario, when sow=true (and in versions of Solr before 6.5), “terminator” must appear in documents in order to produce a match. But when sow=false, a document can match if its run_length field is 100, even when the title does not contain “terminator”.

      It is good to have an option to force term centric or query-centric matching at query parsing; so that expected behavior can be achieved; discussed under http://lucene.472066.n3.nabble.com/Split-on-whitespace-parameter-doubt-td4404185.html.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sarkaramrit2@gmail.com Amrit Sarkar
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: