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/semantic-text] Add query and model compatibility tests #107256

Conversation

carlosdelest
Copy link
Member

Add queries that showcase using nested queries for performing search without the need for semantic_query.

@carlosdelest carlosdelest requested a review from a team as a code owner April 9, 2024 10:28
@carlosdelest carlosdelest requested review from jimczi and Mikep86 and removed request for a team April 9, 2024 10:29
@elasticsearchmachine elasticsearchmachine added the needs:triage Requires assignment of a team area label label Apr 9, 2024
Copy link
Contributor

@jimczi jimczi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @carlosdelest

- match: { hits.total.value: 2 }
- match: { hits.total.relation: eq }
- match: { hits.hits.0.inner_hits.dense_field\.inference\.chunks.hits.total.value: 2 }
- exists: hits.hits.0.inner_hits.dense_field\.inference\.chunks.hits.hits.0.fields.dense_field\.inference\.chunks.0.text
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be able to match the exact text of the chunk?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @jimczi - merged already. But I've added this as part of #107262 now 👍

- match: { hits.total.value: 2 }
- match: { hits.total.relation: eq }
- match: { hits.hits.0.inner_hits.sparse_field\.inference\.chunks.hits.total.value: 2 }
- exists: hits.hits.0.inner_hits.sparse_field\.inference\.chunks.hits.hits.0.fields.sparse_field\.inference\.chunks.0.text
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here?

@carlosdelest carlosdelest merged commit 4d24bf0 into elastic:feature/semantic-text Apr 9, 2024
13 of 14 checks passed
carlosdelest added a commit to carlosdelest/elasticsearch that referenced this pull request Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:triage Requires assignment of a team area label >non-issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants