Hi In May 2021 I have done a Vector Search implementation based on Lucene 9.0.0-SNAPSHOT with the following code
FieldType vectorFieldType = VectorField.createHnswType(vector.length, VectorValues.SimilarityFunction.DOT_PRODUCT,16,500); VectorField vectorField =new VectorField(VECTOR_FIELD, vector, vectorFieldType); doc.add(vectorField) and class KnnWeightextends Weight { KnnWeight() { super(KnnQuery.this); } @Override public Scorer scorer(LeafReaderContext context)throws IOException { log.debug("Get scorer."); return new TopDocScorer(this, context.reader().searchNearestVectors(field,vector,topK,fanout)); } whereas fanout is of type "int" I have now updated Lucene source and rebuilt 9.0.0-SNAPSHOT and get various compile errors. I assume VectorField got renamed to KnnVectorField, right? Does somebody maybe have some sample code how Vector search is being implemented with the most recent Lucene code? Thanks Michael