Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add NestedField Visit Method #13961

Closed

Conversation

luyuncheng
Copy link
Contributor

i use neural query in OpenSearch with nested field https://opensearch.org/docs/latest/search-plugins/semantic-search/#setting-a-default-model-on-an-index-or-field, but it can not calling model in search pipeline with neural_query_enricher processor like the doc shows.

i think it is because NestedQueryBuilder do not support visit method like boolean query

public void visit(QueryBuilderVisitor visitor) {
visitor.accept(this);
if (mustClauses.isEmpty() == false) {
QueryBuilderVisitor subVisitor = visitor.getChildVisitor(Occur.MUST);
for (QueryBuilder mustClause : mustClauses) {
mustClause.visit(subVisitor);
}
}

it can not visit from processRequest like the following code do:
https://github.com/opensearch-project/neural-search/blob/2b21110be2d343e83f539e75104a8928522bf720/src/main/java/org/opensearch/neuralsearch/processor/NeuralQueryEnricherProcessor.java#L68-L75

BTW in #13837 i see it fixed many scenarios queries, but we still need NestedQueryBuilder to visit query builder.

so this pr i added a visit method.

Signed-off-by: luyuncheng <[email protected]>
Copy link
Contributor

github-actions bot commented Jun 4, 2024

❌ Gradle check result for e72e9b3: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@IanMenendez
Copy link

Having this same problem. NeuralQueryEnricher search processor does not support Nested Fields

@opensearch-trigger-bot
Copy link
Contributor

This PR is stalled because it has been open for 30 days with no activity.

@opensearch-trigger-bot opensearch-trigger-bot bot added the stalled Issues that have stalled label Jul 13, 2024
@zhichao-aws
Copy link
Member

Hi @luyuncheng, I created a PR to fix the same issue and found there is duplicate PR. Are you still working at this PR?

@luyuncheng
Copy link
Contributor Author

luyuncheng commented Jul 17, 2024

Hi @luyuncheng, I created a PR to fix the same issue and found there is duplicate PR. Are you still working at this PR?

@zhichao-aws
#14739 Looks like the same solution, but my pr waiting for a month, nobody triggered. if you merged, we can close this.

@opensearch-trigger-bot opensearch-trigger-bot bot removed the stalled Issues that have stalled label Jul 17, 2024
@opensearch-trigger-bot
Copy link
Contributor

This PR is stalled because it has been open for 30 days with no activity.

@opensearch-trigger-bot opensearch-trigger-bot bot added the stalled Issues that have stalled label Aug 17, 2024
@luyuncheng luyuncheng closed this Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stalled Issues that have stalled
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants