Skip to content
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

remove deprecated KnnVectorField use #3121

Merged
merged 31 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c22cfaa
WIP: Upgrading to Lucene 10
Jan 13, 2025
822d562
Removed dependency on TimeLimitingCollector
noblepaul Jan 14, 2025
c29bdeb
Removed the deprecated methods
noblepaul Jan 15, 2025
8c9e9ed
Removed dependency on deprecated TopDocCollector
noblepaul Jan 15, 2025
f4b8b16
Moved setRewriteMethod() to constructor, replaced scorer() with score…
Jan 15, 2025
38a22d4
Replaced some more scorer() with scorerSupplier()
Jan 15, 2025
d4770a5
Changed rewrite method signature, added DV skip to FieldInfo construc…
Jan 15, 2025
705fe9b
Changed rewrite method signature, added DV skip to FieldInfo construc…
Jan 15, 2025
8b24db8
More fixes
Jan 15, 2025
7ec4b98
Removing deprecated method getTermVectors(int docID)
Jan 15, 2025
5dcff09
Removed TopScoreDocsCollector.create() and replaced with manager's ne…
Jan 15, 2025
d94b22f
Deal with removal of TopFieldCollector.create()
Jan 15, 2025
5c9dbf0
Removed dependencies on deprecated TimeLimitingCollector
noblepaul Jan 16, 2025
9bb7397
removed deprecated methods
noblepaul Jan 16, 2025
7f2a77b
Fixed deprecated methods
noblepaul Jan 16, 2025
6224d6a
Fixed syntax errors
noblepaul Jan 16, 2025
18ec6ea
Fixed syntax errors
noblepaul Jan 16, 2025
4c141a6
Test compilation fixes
Jan 17, 2025
f490667
Adding our own scorer supplier
Jan 17, 2025
f5df6c7
bulk scorer modified
noblepaul Jan 17, 2025
e1fe99f
bulk scorer modified
noblepaul Jan 18, 2025
bcd4815
Don't close a stream during request parsing
Jan 18, 2025
dfead62
Fixing scorer issues with range queries, thereby passing ConvertedLeg…
Jan 21, 2025
a6ede24
Fixing SortedSetDocValues.NO_MORE_ORDS removal issue, fixed SolrIndex…
Jan 22, 2025
20eb534
More improper ordinals handling
Jan 22, 2025
266dae8
More ords handling fixed, passing TestJsonFacets now
Jan 23, 2025
c723c4d
Use match all docs for null filter
noblepaul Jan 23, 2025
153ad2f
retain only KnnVectorField-is-deprecated changes
cpoerschke Jan 24, 2025
078a9b7
removed TBD comment and ran gradlew tidy
cpoerschke Jan 24, 2025
b2a3d63
Merge remote-tracking branch 'github_apache/main' into KnnVectorField…
cpoerschke Jan 24, 2025
44dcc06
action review feedback: also mention byte vector field+query in javadocs
cpoerschke Jan 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@
import org.slf4j.LoggerFactory;

/**
* Provides a field type to support Lucene's {@link org.apache.lucene.document.KnnVectorField}. See
* {@link org.apache.lucene.search.KnnVectorQuery} for more details. It supports a fixed cardinality
* Provides a field type to support Lucene's {@link org.apache.lucene.document.KnnByteVectorField}
* and {@link org.apache.lucene.document.KnnFloatVectorField}. See {@link
* org.apache.lucene.search.KnnByteVectorQuery} and {@link
* org.apache.lucene.search.KnnFloatVectorQuery} for more details. It supports a fixed cardinality
* dimension for the vector and a fixed similarity function. The default similarity is
* EUCLIDEAN_HNSW (L2). The default algorithm is HNSW. For Lucene 9.1 e.g. See {@link
* org.apache.lucene.util.hnsw.HnswGraph} for more details about the implementation. <br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import java.util.stream.StreamSupport;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.KnnFloatVectorField;
import org.apache.lucene.document.KnnVectorField;
import org.apache.lucene.index.IndexableField;
import org.apache.lucene.index.VectorSimilarityFunction;
import org.apache.lucene.tests.util.TestUtil;
Expand Down Expand Up @@ -352,8 +351,8 @@ public void denseVector_shouldReturnOneIndexableFieldAndOneStoredFieldPerVectorE
Document out = DocumentBuilder.toDocument(doc, core.getLatestSchema());

// from /solr/core/src/test-files/solr/collection1/conf/schema.xml
KnnVectorField expectedIndexableField =
new KnnVectorField(
KnnFloatVectorField expectedIndexableField =
new KnnFloatVectorField(
"vector", new float[] {1.1f, 2.1f, 3.1f, 4.1f}, VectorSimilarityFunction.COSINE);

assertThat(
Expand Down Expand Up @@ -383,8 +382,8 @@ public void denseVector_shouldWorkWithCopyFields() {
Document out = DocumentBuilder.toDocument(doc, core.getLatestSchema());

// from /solr/core/src/test-files/solr/collection1/conf/schema.xml
KnnVectorField expectedDestination =
new KnnVectorField(
KnnFloatVectorField expectedDestination =
new KnnFloatVectorField(
"vector2", new float[] {1.1f, 2.1f, 3.1f, 4.1f}, VectorSimilarityFunction.DOT_PRODUCT);

assertThat(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.util.stream.StreamSupport;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.KnnFloatVectorField;
import org.apache.lucene.document.KnnVectorField;
import org.apache.lucene.index.IndexableField;
import org.apache.lucene.index.VectorSimilarityFunction;
import org.apache.solr.SolrTestCaseJ4;
Expand Down Expand Up @@ -54,8 +53,8 @@ public void denseVector_shouldWorkWithCatchAllCopyFields() {
Document out = DocumentBuilder.toDocument(doc, core.getLatestSchema());

// from /solr/core/src/test-files/solr/collection1/conf/schema.xml
KnnVectorField expectedDestination =
new KnnVectorField(
KnnFloatVectorField expectedDestination =
new KnnFloatVectorField(
"vector2", new float[] {1.1f, 2.1f, 3.1f, 4.1f}, VectorSimilarityFunction.DOT_PRODUCT);

assertThat(
Expand Down
Loading