advanced-object-search
advanced-object-search copied to clipboard
[Bug]: ManyToOneRelation.php always creates Nested Query
Expected behavior
Function getQueryPart of ManyToOneRelation.php should create BoolQuery instead of NestedQuery when allowInheritance on object is not selected (which is passed to $this->considerInheritance)
Otherwise any query on relation will result in es error "failed to create query: [nested] nested object under path [{fieldName}] is not of nested type"
Actual behavior
ManyToOneRelation.php always returns nestedQuery even when mapping is not nested (see function above)
Steps to reproduce
Create 2 objects. Put one object into relation to another object (without allow inheritance clicked on class definition). Index the object and try to use any filter according to the docs, README.md and it will faill with "failed to create query: [nested] nested object under path [{fieldName}] is not of nested type"