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

SOLR does not allow to match documents matching specific values in multiple xwiki properties

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.2-milestone-2
    • Fix Version/s: 5.3-rc-1
    • Component/s: Search - Solr
    • Labels:
    • Tests:
      Unit
    • Development Priority:
      High
    • Difficulty:
      Hard
    • Similar issues:

      Description

      Here is the use case that was given which corresponds quite well to something that does not seem possible to do:

      • We create one or several types of documents / content types for the clients (like "articles" or some entries of some types)
      • They want a custom search that would only search among these documents (not even users, not even some other helper documents) – their "knowledge"
      • They want an UI that would allow them to filter these search results by criteria which correspond to fields in the class that defines the type of these documents. Same for sorting.
      • usually we endup hiding a lot of capabilities of the search, we restrict it only to one specific type of document, we don't search attachments, we hide the possibility to change the wiki, change the space, etc

      In short, getting rid of everything else besides one or more applications seems to be what people desire. And then adding a lot of search criteria that are custom to this application(s).

      What would be interesting would be something where these usecases are easy to implement.

      • They want an UI that would allow them to filter these search results by criteria which correspond to fields in the class that defines the type of these documents. Same for sorting.

      Examples:

      match all blog posts which have the word "john" in any field and have the status published and are of the category "News" or "XWiki" and hightlight "john" in all results

      This is a simple one but the query could be much more complex with a combination of ANDs and ORs. Another example:

      match all documents which have the word "john" in any field except user documents and highlight "john" in all results

      Currently given the structure of the SOLR index which separates indexing of documents, objects and properties you can only do this using the SOLR join feature but with only one join (as far as I could find) and even with this it requires a lot of playing around with the syntax of the query field and the filter field.

      The lucene index added ALL fields to the document record, creating on the fly field names like "Blog.BlogPostClass_category". Note that this was not necessarly perfect as you might one sometimes the fields to be searchable as exact values and sometimes as full text. Language could also be a complexity.

        Attachments

          Activity

            People

            • Assignee:
              mflorea Marius Dumitru Florea
              Reporter:
              ludovic Ludovic Dubost
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: