# Bringing maximum-inner-product into Lucene

DevFeed: [Bringing maximum-inner-product into Lucene](<https://devfeed.tech/articles/bringing-maximum-inner-product-into-lucene-78866.md>)

Original publisher: [Read original article](<https://www.elastic.co/search-labs/blog/lucene-bringing-maximum-inner-product-to-lucene>)

Author: Benjamin Trent

Published: 2023-09-01T00:00:00Z

Content type: article

Language: en

Sources: [Elasticsearch Labs](<https://devfeed.tech/sources/elasticsearch-labs.md>)

Topics: [elasticsearch](<https://devfeed.tech/topics/elasticsearch.md>), [Cohere API for embeddings](<https://devfeed.tech/topics/cohere-api-for-embeddings.md>), [vector embeddings in AI](<https://devfeed.tech/topics/vector-embeddings-in-ai.md>), [content defined chunking](<https://devfeed.tech/topics/content-defined-chunking.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [benchmarking](<https://devfeed.tech/tags/benchmarking.md>), [cohere](<https://devfeed.tech/tags/cohere.md>), [gamma](<https://devfeed.tech/tags/gamma.md>), [hnsw](<https://devfeed.tech/tags/hnsw.md>), [huggingface](<https://devfeed.tech/tags/huggingface.md>), [inner-product](<https://devfeed.tech/tags/inner-product.md>), [lucene](<https://devfeed.tech/tags/lucene.md>)

## AI overview

The article describes how Lucene added maximum-inner-product search for non-normalized vectors. It explains scaling scores to keep them non-negative for block-max WAND pruning, then reports experiments comparing recall and latency with and without Euclidean transformations. The authors found that transformation appeared useful only for a synthetic gamma-distribution dataset with vectors inserted in reverse magnitude order; they say the work will enable maximum-inner-product support in Elasticsearch.

## Source excerpt

Explore how we brought maximum-inner-product into Lucene and the investigations undertaken to ensure its support.