I agree with Adrien. The current block join support in Solr is a desaster, because it was released to early. Just nuke the broken APIs and create a new one, so Solr internally knows from schema/mapping how to block join and also prevent misformed updates. This is also worth a backwards compatibility break! Doing expensive runtime checks on every query just to keep a broken API/implementation is not a good idea. Break hard and come with a better API, the users will still be more happy, trust me. I know so many users who f*ck up the block joins, as Solr does not enforce it correctly. Do the following:
- remove Solr ID fields from child documents (why do we have them? This also makes updates to child documents impossible)
- always hide child documents on "normal" queries and return them only with the parent document (like Elasticsearch does)
- automatically add block join queries if fields of the child documents are part of the query
- add some extra queries to specifically search on childs and return childs only (hiding parents, of course)
- if somebody updates a parent document, delete also all childs and create a new block
- hide the block join filter. Solr should have an internal marker field to support block join, which is never exposed
Read full article from [LUCENE-7674] java.lang.IllegalStateException: Child query must not match same docs with parent filter. Combine them as must clauses (+) to find a problem doc. docId=2147483647, class org.apache.lucen
No comments:
Post a Comment