Multi-index Elasticsearch query fails (sometimes silently) when field is present in only one index

Environment

Hibernate Search 6.0.1.Final, JDK 8.0.282, macOS 10.14.6, Elasticsearch 7.10.2

Activity

Show:
Yoann Rodière
3 hours ago

We just released the fix: https://in.relation.to/2021/04/14/hibernate-search-6-0-3-Final/ . Thanks for reporting this, and sorry it took so long.

Yoann Rodière
March 10, 2021, 12:34 PM

Here, we just merged a fix in branches 6.0 and master.

Tests now cover:

  • Missing fields on any predicate (match, range, …)

  • Missing field on explicit nested predicate

  • Missing field on sort

  • Missing field on projection

  • And with the latest fix, missing field on implicit nested predicate

Hopefully that’s the end of it…

In any case, your test now works as expected with the latest master. It still fails, but the failure seems caused by incorrect assertions (expecting hits in a certain order, but they end up in another order; I’d say you need a sort).

Yoann Rodière
March 10, 2021, 7:36 AM

Request/response for future reference:

 

Yoann Rodière
March 10, 2021, 7:35 AM

More like it’s me not being thorough enough with my testing… There’s still a failure when running your tests, but it's a silent one. It seems related to implicit nesting. I’ll have a closer look.

Reopening.

Griffin DeJohn
March 9, 2021, 11:09 PM
Edited

So I built Hibernate Search from master and tried it out. The error I got before is indeed gone, but the result set is different with the elasticsearch backend than with lucene, so the test fails with elasticsearch (there’s only one result instead of the expected three).

Is this just a difference between the backends that we have to live with?

Fixed

Assignee

Yoann Rodière

Reporter

Griffin DeJohn

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Affects versions

Priority

Major