Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-10051

Improve the performance and flexibility of the Solr search suggest

    XMLWordPrintable

Details

    • Medium

    Description

      Currently you can only specify the search query in the Search Suggest Source. This is not performant because it doesn't use the filter cache. Each query is different (when the input text is different) so the cache is not used efficiently. Moreover, it would be nice to be able to control other Solr Search parameters from the Search Suggest Source besides the query statement.

      As an example, the following statement from the 'query' property of a Search Suggest Source:

      type:DOCUMENT AND (title:(__INPUT__*) OR name:(__INPUT__*) OR name_exact:(__INPUT__*))
      

      could be written as:

      fq=type:DOCUMENT
      qf=title^2 name
      

      Note that:

      • we would use the filter query which is the same for all search requests to this Search Suggest Source so it will be cached by Solr
      • we would be able to specify the boost for each field we want to search in
      • the query statement used could be '__INPUT__' by default, if not specified.

      In order to preserve backward compatibility with existing Solr Search Suggest Sources, we could use the following convention:

      • a line that doesn't start with 'xxx=' specifies the query statement; in other words, existing Solr Search Suggest Sources are specifying only the query statement.

      For example:

      foo __INPUT__* bar
      fq=type:DOCUMENT
      qf=title^2 name
      

      would mean the query statement is 'foo __INPUT__* bar'. Which is equivalent to:

      q=foo __INPUT__* bar
      fq=type:DOCUMENT
      qf=title^2 name
      

      Attachments

        Activity

          People

            mflorea Marius Dumitru Florea
            mflorea Marius Dumitru Florea
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: