Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-29984

Solr Field LIKE criterion is not behaving like on Legacy Storage Engine

    Details

      Description

      Solr works differently then LegacySE (Legacy Search Engine, aka sql search) on these two criterions:

      • LIKE: LegacySE expects value to have a "%" in value, while Solr adds wildcards before and after the string ("$value")

      I suggest we standardize how LegacySE and Solr work to allow "*" as wildcard to align with FullText.

      ref:

        Issue Links

          Activity

          Show
          André Rømcke added a comment - https://github.com/ezsystems/ezpublish-kernel/pull/2517 https://github.com/ezsystems/ezplatform-solr-search-engine/pull/128
          Hide
          André Rømcke added a comment -

          Merged:
          https://github.com/ezsystems/ezplatform-solr-search-engine/pull/128
          https://github.com/ezsystems/ezpublish-kernel/pull/2517

          Doc/QA:
          This fixes and streamlines LIKE usage on the API, and makes wildcards (*) supported both on Solr and LEgacy search (with limits).

          Example usage:
          $query->filter = new Field('title', Operator::LIKE, "Ab*t");

          Field types with support for LIKE (AFAIK based on trying to look at Integration Tests, Type- and Searchable-classes in kernel only) across both storage engines:

          • Author (lowercase)
          • Country (lowercase)
          • EmailAddress_(lowercase)_
          • ISBN (lowercase)
          • Keywords
          • MapLocation (address, as lowercase)
          • RichText (within first 255 char of first paragraph)
          • Textblock (lowercase, within first 255 char)
          • Textline (lowercase)

          This story also by means of cleanup adds missing (minimal) Field Criteria & SortingClause support for Author, RelationList (id) and RichText FieldTypes when using LegacySearchEngine.

          SIDE / FYI 1: Several more field types support full Field criteria / sort clause on Solr only, but that has not changed in this story, this can be seen by looking for which once have a SearchField implements Indexable classes. Also those that have that also often indexes custom fields, like Selection's selected_option_value, which can be filtered on Field Criteria as exposed by CustomFieldInterface.
          2: ImageAsset could be added also as a followup here to work like Relation (id).

          Show
          André Rømcke added a comment - Merged: https://github.com/ezsystems/ezplatform-solr-search-engine/pull/128 https://github.com/ezsystems/ezpublish-kernel/pull/2517 Doc/QA: This fixes and streamlines LIKE usage on the API, and makes wildcards ( * ) supported both on Solr and LEgacy search (with limits) . Example usage: $query->filter = new Field('title', Operator::LIKE, "Ab*t"); Field types with support for LIKE (AFAIK based on trying to look at Integration Tests, Type- and Searchable-classes in kernel only) across both storage engines: Author (lowercase) Country (lowercase) EmailAddress_(lowercase)_ ISBN (lowercase) Keywords MapLocation (address, as lowercase) RichText (within first 255 char of first paragraph) Textblock (lowercase, within first 255 char) Textline (lowercase) This story also by means of cleanup adds missing (minimal) Field Criteria & SortingClause support for Author, RelationList (id) and RichText FieldTypes when using LegacySearchEngine. SIDE / FYI 1: Several more field types support full Field criteria / sort clause on Solr only, but that has not changed in this story, this can be seen by looking for which once have a SearchField implements Indexable classes. Also those that have that also often indexes custom fields, like Selection's selected_option_value , which can be filtered on Field Criteria as exposed by CustomFieldInterface . 2: ImageAsset could be added also as a followup here to work like Relation (id) .

            People

            • Assignee:
              Unassigned
              Reporter:
              André Rømcke
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: