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

eDismax sow=false doesn't work with string field types

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 8.8.2
    • None
    • query parsers
    • None

    Description

      Currently, the sow=false should not tokenize the input user query text and delegate to each field for query time text analysis.

      But what happens if one of the queries involved is not analyzed?
      For example, because it is a string field type?

      Terms are split and the query generated is broken:

          assertU(adoc("id", "75", "trait_ss", "multi term"));
      
      public void testSplitOnWhitespace_stringField_shouldBuildSingleClause() throws Exception
          {
              assertJQ(req("qf", "trait_ss", "defType", "edismax", "q", "multi term", "sow", "false"),
                  "/response/numFound==1", "/response/docs/[0]/id=='75'");
      
              String parsedquery;
              parsedquery = getParsedQuery(
                  req("qf", "trait_ss", "q", "multi term", "defType", "edismax", "sow", "false", "debugQuery", "true"));
              assertThat(parsedquery, anyOf(containsString("((trait_ss:multi term))")));
          }
      

      This test would be currently broken.
      The current parsed query is wrongly:

      (trait_ss:multi trait_ss:term)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              abenedetti Alessandro Benedetti
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

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