Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-10522

Search Service: do not discard small search term if another is wildcarded

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Normal
    • Resolution: Unresolved
    • search-service-3.2.0
    • None
    • None
    • None

    Description

      If wildcarding is enabled, a search with a both a small and big term should not lead to discarding the small one.

      See this unit test on master:

          @Test
          public void test_contains_with_mixed_terms_with_wildcarding() {
              InitialQueryImpl initialQuery = new InitialQueryImpl();
              QueryImpl query = initialQuery.from("/").where(QueryUtils.text().contains("12 123456"));
      
              String queryAsString = TestUtils.getQueryAsString(query, session);
      
              assertEquals("//*[" + COMMON_SCOPE + " and ((jcr:contains(.,'12 123456') or jcr:contains(.,'123456*')))]" + COMMON_ORDERBY, queryAsString);
          }
      

      The second jcr:contains only has "123456*" but should have "12 123456*.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jhoffman Jeroen Hoffman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: