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

EZP-27458: Add Field Facet Visitor #129

Closed
wants to merge 10 commits into from
Closed

EZP-27458: Add Field Facet Visitor #129

wants to merge 10 commits into from

Conversation

wizhippo
Copy link
Contributor

@wizhippo wizhippo commented Jan 25, 2019

Add filed facet support

Example

           new FacetBuilder\FieldFacetBuilder([
                'name' => 'Specialties',
                'fieldPaths' =>['agent/specialties/tag_ids'],
                'limit' => 9999,
            ]),
           
           new FacetBuilder\FieldFacetBuilder([
                'name' => 'Multipath',
                'fieldPaths' => [
                     'article/title',
                     'atrilcle/tags/tag_ids',
                ],
                'limit' => 9999,
           ]),

Related PR ezsystems/ezpublish-kernel#2557

@ezrobot

This comment has been minimized.

@andrerom andrerom requested review from pspanja and alongosz January 28, 2019 18:39
@andrerom
Copy link
Contributor

andrerom commented Jan 28, 2019

We would somehow need to make sure we have integration tests in kernel, but besides that Looks like good direction.

Copy link
Member

@alongosz alongosz left a comment

Choose a reason for hiding this comment

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

Hmm, indeed some integration test in ezpublish-kernel explaining what happens here would be nice.

Though I see we have some integration tests, which use FieldFacetBuilder, in \eZ\Publish\API\Repository\Tests\SearchServiceTest so I wonder how do they work (maybe there were skipped, or just don't throw when missing builder?).

Anyway this PR will require either more investigation by me before I approve or more explaining in PhpDoc, because code is not self-explanatory.

pinging also our foremost expert in faceted search - @Nattfarinn - for a review :)

lib/Query/Common/FacetBuilderVisitor/Field.php Outdated Show resolved Hide resolved
lib/Query/Common/FacetBuilderVisitor/Field.php Outdated Show resolved Hide resolved
@alongosz alongosz requested a review from Nattfarinn January 31, 2019 10:06
Copy link
Contributor

@andrerom andrerom left a comment

Choose a reason for hiding this comment

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

Beside the nitpicks some comments.

Though I see we have some integration tests, which use FieldFacetBuilder, in \eZ\Publish\API\Repository\Tests\SearchServiceTest so I wonder how do they work (maybe there were skipped, or just don't throw when missing builder?).

Afaik skipped, but we should check that they pass here. Ideally Solr tests should be setup to fail on skips to avoid any silent skips happening.

Follow up kernel API design considerations

(NOTE to self / @alongosz, and possibly you @wizhippo if you're up for it)

Besides the need to better document fieldPaths and FieldRangeFacetBuilder->fieldPath:

FieldFacetBuilder->regex

It seems Solr does not allow for regex like the way it's suggested in API. Maybe we should deprecate it, and maybe also consider to add the following if it translates well to Elastic too:

  • (string) prefix
  • (string) contains
  • (bool) containsIgnoreCase = false

lib/Query/Common/FacetBuilderVisitor/Field.php Outdated Show resolved Hide resolved
lib/Query/Common/FacetBuilderVisitor/Field.php Outdated Show resolved Hide resolved
@wizhippo
Copy link
Contributor Author

wizhippo commented Oct 7, 2019

Any chance the v3 is coming up we can visit this and facets?

@alongosz
Copy link
Member

alongosz commented Oct 7, 2019

Any chance the v3 is coming up we can visit this and facets?

ping @SylvainGuittard

@SylvainGuittard
Copy link

@alongosz I am not against having this in v3.
This PR is against master. Is this branch compatible with Symfony 4 and current eZ Platform v3? Is there any other blocker?

@andrerom
Copy link
Contributor

andrerom commented Oct 8, 2019

Is there any other blocker?

@SylvainGuittard Someone in eZ Eng needs to write integration tests in kernel, besides that we are more or less good to go here.

@wizhippo
Copy link
Contributor Author

wizhippo commented Aug 6, 2020

Superseded by ezsystems/ezplatform-kernel#94

@wizhippo wizhippo closed this Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants