advanced-object-search icon indicating copy to clipboard operation
advanced-object-search copied to clipboard

[Bug]: ManyToOneRelation.php always creates Nested Query

Open cuca24 opened this issue 1 year ago • 0 comments

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"

cuca24 avatar Sep 22 '23 15:09 cuca24