-
Notifications
You must be signed in to change notification settings - Fork 46
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
[Bug]: ManyToOneRelation can maximum return 10 hits #170
Comments
@AndrewKMoses Thank you for the report but i cannot reproduce the exact same problems, i can change the maximum For me it works, even on demo using the Manufacturer many-to-one field Can you provide further details? |
Well, my main point in this issue is that the size argument is missing, giving you a default of 10 hits. That should be fixed somehow? What is In your case it seems like it's the same issue as in #85? |
yes, that's a good point and needs to be improved. The question now is what number should replace
I haven't changed any configuration, so it should be also the same default value at
Doesn't look the same to me, i've just put a |
Expected behavior
Filtering using ManyToOneRelation returns all matches
Actual behavior
Filtering using ManyToOneRelation returns maximum 10 hits.
Steps to reproduce
I have a template setup as below where Options is a ManyToOneRelation.
On the line below, there is no size parameter included, giving you the default size, which is 10.
https://github.com/pimcore/advanced-object-search/blob/4.x/src/Filter/FieldDefinitionAdapter/ManyToOneRelation.php#L121
I tried setting this to something very large (10000) giving me the error message below:
`{
"error": {
"root_cause": [
{
"type": "query_shard_exception",
"reason": "failed to create query: maxClauseCount is set to 1024",
"index_uuid": "8P3R0UYRTHOrMiL0YPZlAg",
"index": "advanced_object_search_article"
}
],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query",
"grouped": true,
"failed_shards": [
{
"shard": 0,
"index": "advanced_object_search_article",
"node": "1lK30pC5RayahBM7mN_duA",
"reason": {
"type": "query_shard_exception",
"reason": "failed to create query: maxClauseCount is set to 1024",
"index_uuid": "8P3R0UYRTHOrMiL0YPZlAg",
"index": "advanced_object_search_article",
"caused_by": {
"type": "too_many_clauses",
"reason": "maxClauseCount is set to 1024"
}
}
}
]
},
"status": 400
}
Server threw exception - could not perform action. Please reload the admin interface and try again.`
There is a setting (indices.query.bool.max_clause_count) to change the maximum number of clauses, but the docs do not recommend that.
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/search-settings.html
The text was updated successfully, but these errors were encountered: