Skip to content

ES|QL brute force l1_norm vector function #131768

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

Merged
merged 8 commits into from
Jul 24, 2025

Conversation

tteofili
Copy link
Contributor

@tteofili tteofili commented Jul 23, 2025

This introduces the v_l1_norm vector function for brute force dense vector search in ES|QL.
e.g.,

FROM colors
 | EVAL similarity = V_L1_NORM(rgb_vector, [0, 255, 255]) 
 | SORT similarity DESC

fixes #131688

@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label v9.2.0 labels Jul 23, 2025
@tteofili tteofili added >non-issue v9.2.0 :Search Relevance/Search Catch all for Search Relevance :Analytics/ES|QL AKA ESQL test-release Trigger CI checks against release build and removed needs:triage Requires assignment of a team area label v9.2.0 labels Jul 23, 2025
@elasticsearchmachine elasticsearchmachine added Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch labels Jul 23, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

Copy link
Contributor

github-actions bot commented Jul 23, 2025

🔍 Preview links for changed docs

Copy link
Member

@carlosdelest carlosdelest left a comment

Choose a reason for hiding this comment

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

💯 Another one bites the dust!

@@ -37,22 +39,25 @@ public static Iterable<Object[]> parameters() throws Exception {
List<Object[]> params = new ArrayList<>();

if (EsqlCapabilities.Cap.COSINE_VECTOR_SIMILARITY_FUNCTION.isEnabled()) {
params.add(new Object[] { "v_cosine", VectorSimilarityFunction.COSINE });
params.add(new Object[] { "v_cosine", (SimilarityEvaluatorFunction) VectorSimilarityFunction.COSINE::compare });
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

@tteofili tteofili merged commit 75ca874 into elastic:main Jul 24, 2025
31 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL >non-issue :Search Relevance/Search Catch all for Search Relevance Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch test-release Trigger CI checks against release build v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

V_L1_NORM – calculates L1 distance
4 participants