Details

      Description

      Steps to reproduce

      1. Create a structure with fields indexed as keyword, number, and text. Fields should be optional. (not mandatory.)
      2. Create a few articles using this structure. Some articles should leave all fields empty.
      3. Sort on each field.

      Expected:

      1. Articles with empty fields are last in order.

      Observed:

      1. When sorting on the number or text fields, articles with empty fields are last in order.
      2. When sorting on the keyword field, articles with empty fields are first in order.

       

      Probable cause

      DDMIndexerImpl invokes:

      The method addTextSortable returns immediately if the valueString is null or empty, but the method addKeywordSortable indexes the element even if the valueString is null or empty.

      The search engine is solely responsible for indexing a string as keyword or text, so from the application side there's no distinction whatsoever between invoking either method. Therefore DDMIndexerImpl should invoke only addTextSortable. When there's content, the search engine will index it according to its defined mapping (keyword or text) and when there's no content, the field will not be sent to the search engine at all – thus expected sort behavior is achieved.

       

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since last comment:
                11 weeks, 5 days ago

                Packages

                Version Package