Re: Question about searcherManager applyAllDeletes parameter and maybeRefresh method

2023-03-02 Thread Ningshan Li
Hi Patrick, Thanks for the quick response and the explanation and sources are helpful! But there is still a point we couldn't quite understand: why did the test I mentioned earlier pass (applyAllDeletes false and do maybeRefresh())? If the delete is not applied, we should see the deleted doc in th

Re: Question about searcherManager applyAllDeletes parameter and maybeRefresh method

2023-03-02 Thread Patrick Zhai
Hi Ningshan, If you want to make sure the deletes are applied after you call maybeRefresh() then you need to set the applyAllDeletes to be true. A bit more details: The constructor of SearcherManager actually internally passes the applyAllDeletes to the IndexWriter, which then will pass it to the

Question about searcherManager applyAllDeletes parameter and maybeRefresh method

2023-03-02 Thread Ningshan Li
Hi! Hope you are all doing well! We are using searcherManager ( https://lucene.apache.org/core/7_4_0/core/org/apache/lucene/search/SearcherManager.html) and get a little confused on applyAllDeletes parameter in the constructor and the method maybeRefresh(). In our case, we need to search over refr

Re: Vector Search on Lucene

2023-03-02 Thread Michael Wechner
Hi Marcos The indexing looks kind of Document doc =new Document(); float[] vector = getEmbedding(text); FieldType vectorFieldType = KnnVectorField.createFieldType(vector.length, VectorSimilarityFunction.COSINE); KnnVectorField vectorField =new KnnVectorField("my_vector_field", vector, vectorFi

Vector Search on Lucene

2023-03-02 Thread marcos rebelo
Hi all, I'm willing to use Vector Search with Lucene. I have vectors created for queries and documents outside Lucene. I would like to upload the document vectors to a Lucene index, Then use Lucene to filter the documents (like classical search) and rank the remaining products with the Vectors.