Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-73303

Web Content Search doesn't properly restrict results when using quotes


    • 3
    • Regression Bug


      As a general rule, quotation mark operators in search queries restrict results to exact matches for a provided phrase, Eg. given an existing content named

      Web Content Title,

      the search term "Web Content Title" should return exactly one result,

      while the search terms "Web Contbent Title" and "Web Content Title1" should return no results.

      As it stands, Web content searching seems to be splitting quoted search terms into individual words, and concatenating the results, instead of searching for the entire term as a singular unit.

      Steps to Reproduce:

      1. Create a page with two Web Content Displays and a Web Content Search
      2. Create a Web Content with the title and Content
        Test Title
        Sample Content
      3. Create a Web Content with the title and content
        Test Web Title
        Sample Content
      4. In the Web Content Search, Search the Following Terms
        Test Web Title
        "Test Web Title"
        "Test W3b Title"

      Expected results:

      1. Test Web Title returns 2 results
      2. "Test Web Title" returns 1 result
      3. "Test W3b Title" returns 0 results


      Actual results:

      1. Test Web Title returns 2 results
      2. "Test Web Title" returns 2 results
      3. "Test W3b Title" returns 2 results

      Interesting notes:

      Quotation marks appear to work as expected when there are no delimiters in the search query (no spaces, no newlines). It looks like what is happening is that the search engine, instead of searching for "Test Web Title" as a single phrase, is searching discretely for the terms "Test", "Web", and "Title", and returning the combined results for all three terms.

      Reproduced on :
      Tomcat 8.0.32 + MySQL 5.7.17. Portal master GIT ID: d2eed9450eef8c320a7c7e81461ffab0d93f3505.


        Issue Links



              support-lep@liferay.com SE Support
              brian.chen Brian Chen (Inactive)
              Marta Elicegui Marta Elicegui
              0 Vote for this issue
              1 Start watching this issue


                4 years, 3 weeks, 3 days ago


                  Version Package