Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement EZP-24572: Indexable definition for Selection field type #1333


2 participants
Copy link

commented Jul 8, 2015

Review dependency graph

  • #1305 Main languages core
    • #1322 Multicore tests
      • #1326 Complete CustomField support
        • #1327 Extract CoreFilter service
        • #1333 Indexable Selection
          • #1334 Indexable RelationList
  • #1329 DateModified sort clause

This PR resolves

Based on #1326

This implements Indexable definition for Selection field type. Doing so required some changes to the Indexable interface:

  1. getFieldData() now receives SPI FieldDefinition as a second parameter.

    In Selection field type case the field definition is used to index option labels.

  2. New method getDefaultSortField() is added, getDefaultField() is renamed to getDefaultMatchField().

    As Selection field type must index in a multivalued field, which can't be used for sort, a separate field for sort is required.

Indexed data:

  1. option_value, a list of selected options labels
  2. option_index, a list of selected options indexes
  3. option_count, count of selected options
  4. sort_value, list of selected options indexes concatenated with - and used for sorting

Behavior of search on multivalued field values

Behavior is the same to what is natural to Solr (and similar). It is possible to do ranges on a multivalued field. It is also possible to assert equals to a single value in a multivalued field.


New test case based on existing SearchBaseIntegrationTest is implemented. The test case deals with multivalued field values, in addition to the single-valued field values, inherited from the base test.

Legacy Search Engine

Legacy Search Engine does not properly support all operators with multivalued field values. It would be possible to improve upon this, but probably with some performance impact. I decided rather to skip tests instead, unless explicitly requested.


This comment has been minimized.

Copy link

commented Jul 9, 2015

+1 if travis agrees :)


This comment has been minimized.

Copy link
Contributor Author

commented Jul 13, 2015

Merged manually in adbcdf8

@pspanja pspanja closed this Jul 13, 2015

@pspanja pspanja deleted the impl-EZP-24572-indexable-selection-2 branch Jul 13, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.