[hibernate-issues] [JIRA] (HSEARCH-3752) Implicit nested predicates
Waldemar Kłaczyński (JIRA)
jira at hibernate.atlassian.net
Fri Mar 13 08:48:09 EDT 2020
Waldemar Kłaczyński ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A77e50cac-bda3-4af4-9bb3-6461f4d10eea ) *commented* on HSEARCH-3752 ( https://hibernate.atlassian.net/browse/HSEARCH-3752?atlOrigin=eyJpIjoiMWZjZGQ3Yzk5OTk2NGIwZGJlZGM0YmEyMTY2OTYwNWQiLCJwIjoiaiJ9 )
Re: Implicit nested predicates ( https://hibernate.atlassian.net/browse/HSEARCH-3752?atlOrigin=eyJpIjoiMWZjZGQ3Yzk5OTk2NGIwZGJlZGM0YmEyMTY2OTYwNWQiLCJwIjoiaiJ9 )
Filtering queries cannot have BlockJoinQuery. It would be great if they were wrapped up in a class like Elasticsearch. In elastic search is ESToParentBlockJoinQuery. You can always delete and extract the original query, but not to remove other nested query elements. You can even rebuild the wrap, automatically adding or removing nesting elements. Depending on the need.
public abstract class AbstractLuceneSearchPredicateBuilder implements SearchPredicateBuilder<LuceneSearchPredicateBuilder>,
LuceneSearchPredicateBuilder {
......
@Override
public final Query build(LuceneSearchPredicateContext context) {
.....
query = Queries.recompileToMaster(query, indexScope);
.....
The function compiles the query in one place, it would also work for LuceneSearchPredicateFactory.fromLuceneQuery. Recompiles so deeply until it encounters ESToParentBlockJoinQuery. In order not to repeat actions from previous predicates.
query = Queries.recompileToPatrial(query, nestedDocumentPath, indexScope);
Recompilation only removes ESToParentBlockJoinQuery and ToParentBlockJoinQuery associated with the path.
( https://hibernate.atlassian.net/browse/HSEARCH-3752#add-comment?atlOrigin=eyJpIjoiMWZjZGQ3Yzk5OTk2NGIwZGJlZGM0YmEyMTY2OTYwNWQiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HSEARCH-3752#add-comment?atlOrigin=eyJpIjoiMWZjZGQ3Yzk5OTk2NGIwZGJlZGM0YmEyMTY2OTYwNWQiLCJwIjoiaiJ9 )
Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100121- sha1:a2b3dcc )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200313/3b587859/attachment.html
More information about the hibernate-issues
mailing list