Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-8468

Handle failure of sphinx search when using short keyword (even in a phrase)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 2.12.0 CR1
    • System
    • False
    • None
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • +

    Description

      When searching for records in 3scale tables (account, product, backend...), the Sphinx divides the search word using various separators. When using a keyword that is shorter than 3 characters, Sphinx always returns an empty result. This happens even when searching for a phrase and one word in the phrase is less than 3 characters (even though the remaining words are more than 3 characters. That is, this happens any time a word that has fewer than 3 characters is being used, even when it is used in combination with other keywords, that are equal to or longer than 3 characters.

      The following text is part of the original description. It's possible that this particular problem has been fixed already. This should be investigated.

      Example: the name "account-1" is a valid name for the 3scale Account. When searching in the accounts table (`/buyers/accounts`) we are able to find this account by typing "account". But using "account-1" as a search key returns zero results. In this case, Sphinx uses "-" as a separator, therefore it identifies two keywords: "account" and "1".

      Two account names were generated by the 3scale QE test suite and their representation by Sphinx (from the system-sphinx log). 

      1. "ui_accou-jsmolar-accont-jfpr" 
        ui_accou\\\-jsmolar\\\-accont\\\-ljnf
      1. "ui_accou-0-account-jfpr" 
        org_name\\\-0\\\-serch\\\-r0qn

       
      However, we also have discovered that this failure happens for any phrase that contains a word with fewer than 3 characters for example, "This is our phrase".

      Let's find a way to handle this in code in a way that is transparent to the user so that they don't need to know the details of our search beyond what is already currently explained in the UI and the documentation.

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jsmolar Jakub Smolár
              Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated: