-
Notifications
You must be signed in to change notification settings - Fork 35
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-30996: RelationField return no results if field searchable in more than 1 content type #154
base: 1.7
Are you sure you want to change the base?
Conversation
346d8c3
to
13ec16e
Compare
fa3b0da
to
d345dd1
Compare
@andrerom as discussed, rebased to
Thanks. |
hmm, why do you think this should be removed? Or did we already discussed that somewhere? |
We didn't discuss it yet, it was only mentioned in the description:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really familiar with this Criterion, so I need complete steps to reproduce: the entire search query, the minimal setup (what Content Types and content items were created?) and the expected result. Both the issue description and tests do not provide full information, only pieces.
60a8591
to
ce27e3f
Compare
@alongosz Create one folder object, and select root folder in "rel_folder" field.
It will work with legacy search, and not on solr. I tested it by editing a |
…e than 1 content type
ce27e3f
to
6d9d06e
Compare
@alongosz Rebased to |
PR:
Criterion\FieldRelation
visitor for case when 2+ content types have same field searchableIssue
If you have 2 content types (
type1
,type2
) with the same attribute identifier (attr1
), and run a search forattr1
Criterion\Operator::CONTAINS array("some_value"), then in solr search the query ends up looking liketype1_attr1="some_value" AND type2_attr1="some_value"
so nothing gets returned.(In legacy search, it will work as expected)
Open question
I am not sure about this part, which I left from original implementation:
In the core, there is no way to get multiple values in
$preparedValues
.mapSearchFieldvalue
always return string or int type.The only use-case I can think about - some platform user extended it and use "int|string" identifier as criteria value but have that single identifier mapped to multiple values inside
mapSearchFieldvalue
While this use-case looks at least weird, and such implementation potentially can rely not on "AND" logic rule, I would propose to remove this part in this PR.
Please confirm it's okay and I'll update this PR to not include it.