XWiki Platform
  1. XWiki Platform
  2. XWIKI-9417

Search does not return any results for Static List values

    Details

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

      Description

      Steps to reproduce:

      • create an application using AWM
      • add a property of type Static List with the default 3 values (value1=First Choice|value2=Second Choice|value3=Third Choice)
      • create 3 entries to select each of these values one by one
      • go to the "Administration: Search" section of your wiki and reindex the wiki (lucene or solr)
      • search for one of the property IDs like "value1" => you will get one result for the page that has this option selected
      • search for one of the property values like "First Choice" => you will get no results

      The behavior is the same while using both Lucene or SOLR.

        Activity

        Hide
        Marius Dumitru Florea added a comment -

        We're now indexing both the raw value that is saved in the database and the display value that is specified in the XClass (the label seen by the user).

        Show
        Marius Dumitru Florea added a comment - We're now indexing both the raw value that is saved in the database and the display value that is specified in the XClass (the label seen by the user).
        Hide
        Marius Dumitru Florea added a comment -

        There are two issues that we need to address in the future:

        • the display value that is specified in the XClass is often overwritten by translations. Most of the time you don't even specify the label in the XClass, and if you do it's just to serve as a default. Even AppWithinMinutes adds the translation keys:
          # Class fields
          Test.TestClass_staticList1=Static List
          Test.TestClass_staticList1_value1=First Choice
          Test.TestClass_staticList1_value2=Second Choice
          Test.TestClass_staticList1_value3=Third Choice
          

          So the user will see the translated label and may complains that the search doesn't return any results for a word that appears in the translated label. Also, in case the label specified in the XClass is not synchronized with the default translation (EN) then the user could complain that he gets results for a word that doesn't appear in the value he sees when he edits the object with that static list. Which brings us to the second problem.

        • We don't re-index the objects when the XClass changes so the user may complain that he gets no results after he updates the static list values (labels) in the XClass.
        Show
        Marius Dumitru Florea added a comment - There are two issues that we need to address in the future: the display value that is specified in the XClass is often overwritten by translations. Most of the time you don't even specify the label in the XClass, and if you do it's just to serve as a default. Even AppWithinMinutes adds the translation keys: # Class fields Test.TestClass_staticList1=Static List Test.TestClass_staticList1_value1=First Choice Test.TestClass_staticList1_value2=Second Choice Test.TestClass_staticList1_value3=Third Choice So the user will see the translated label and may complains that the search doesn't return any results for a word that appears in the translated label. Also, in case the label specified in the XClass is not synchronized with the default translation (EN) then the user could complain that he gets results for a word that doesn't appear in the value he sees when he edits the object with that static list. Which brings us to the second problem. We don't re-index the objects when the XClass changes so the user may complain that he gets no results after he updates the static list values (labels) in the XClass.

          People

          • Assignee:
            Marius Dumitru Florea
            Reporter:
            Elena-Oana Tabaranu
          • Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

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