Skip to content

Commit

Permalink
Use thread-safe search version of HnswGraphSearcher (#12246)
Browse files Browse the repository at this point in the history
Addressing comment received in the PR #12246
  • Loading branch information
dantuzi authored and alessandrobenedetti committed May 30, 2023
1 parent 34e5905 commit 26e4f06
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
import org.apache.lucene.index.VectorSimilarityFunction;
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.TermAndBoost;
import org.apache.lucene.util.hnsw.HnswGraph;
import org.apache.lucene.util.hnsw.HnswGraphBuilder;
import org.apache.lucene.util.hnsw.HnswGraphSearcher;
import org.apache.lucene.util.hnsw.NeighborQueue;
import org.apache.lucene.util.hnsw.OnHeapHnswGraph;

/**
* The Word2VecSynonymProvider generates the list of sysnonyms of a term.
Expand All @@ -43,7 +43,7 @@ public class Word2VecSynonymProvider {
VectorSimilarityFunction.DOT_PRODUCT;
private static final VectorEncoding VECTOR_ENCODING = VectorEncoding.FLOAT32;
private final Word2VecModel word2VecModel;
private final HnswGraph hnswGraph;
private final OnHeapHnswGraph hnswGraph;

/**
* Word2VecSynonymProvider constructor
Expand Down

0 comments on commit 26e4f06

Please sign in to comment.