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-24275: Indexable Image field type #1240

Merged
merged 5 commits into from Apr 30, 2015

Conversation

pspanja
Copy link
Contributor

@pspanja pspanja commented Apr 23, 2015

This PR resolves https://jira.ez.no/browse/EZP-24275

A subtask of https://jira.ez.no/browse/EZP-24232

Additionally to the file name, which is the default value used by Field criterion and sort clause, Image field type also indexes alternative text and file size. These can be targeted by using CustomFieldInterface:: setCustomField() method. Test framework is here refactored to allow testing of these custom fields. However this is a bit awkward, and calls for a refactoring to make testing simpler for the new implementations.

Since not all searchable field types have Indexable definition implemented, this required FileSearchBaseIntegrationTest. This is temporary and will be removed when all searchable field types are covered.

Dedicated methods to provide Field search target value was needed, this was taken from #1230.

Solr's base CriterionVisitor now implements prepareValue() method, which is used to convert and escape the search target value to the proper Solr representation. This is taken from #1229.

Additional fixes

Small bug in Elasticsearch's FieldRange criterion visitor, where wrong variable was checked, causing null to be used as a filter in case when there are no field filters defined. This did not affect the behavior as Elasticsearch seems to be tolerant to it.

Followups

  1. https://jira.ez.no/browse/EZP-24310: Refactor field type search integration tests to better support custom fields

{
if ( $fileInfo->isDir() )
{
if ( !self::isIgnoredPath( dirname( $path ) ) )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't these two if be combined?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, this part was actually copied from FileSearchBaseIntegrationTest, it is here temporarily until we implement search tests for all field types.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok.

@glye
Copy link
Member

glye commented Apr 27, 2015

+1

1 similar comment
@andrerom
Copy link
Contributor

+1

@pspanja pspanja force-pushed the impl-EZP-24275-indexable-image branch from 5cbf8c4 to 713835e Compare April 30, 2015 19:34
pspanja added a commit that referenced this pull request Apr 30, 2015
Implement EZP-24275: Indexable Image field type
@pspanja pspanja merged commit 510676e into master Apr 30, 2015
@pspanja pspanja deleted the impl-EZP-24275-indexable-image branch April 30, 2015 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants