[
https://issues.apache.org/jira/browse/SOLR-16588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17656134#comment-17656134
]
ASF subversion and git services commented on SOLR-16588:
--------------------------------------------------------
Commit 39b79f834ddbc1bca2380d3fb6182acc2a57c540 in solr's branch
refs/heads/branch_9_1 from Alessandro Benedetti
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=39b79f834dd ]
SOLR-16588: set default knn algorithm (#1255)
Co-authored-by: Elia <[email protected]>
Co-authored-by: Kevin Risden <[email protected]>
> solr.DenseVectorField fieldType without a knnAlgorithm parameter results in
> error
> ---------------------------------------------------------------------------------
>
> Key: SOLR-16588
> URL: https://issues.apache.org/jira/browse/SOLR-16588
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Affects Versions: 9.1
> Reporter: Alastair Porter
> Assignee: Alessandro Benedetti
> Priority: Minor
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Following the Dense Vector Search documentation at
> [https://solr.apache.org/guide/solr/latest/query-guide/dense-vector-search.html]
>
> Using a field definition of
>
> {code:java}
> <fieldType name="knn_vector" class="solr.DenseVectorField"
> vectorDimension="4" similarityFunction="euclidean"/>
> <field name="vector" type="knn_vector" multiValued="false"
> stored="true"/>{code}
> And then trying to index a document results in an error in solr:
>
>
> {code:java}
> 2022-12-13 19:10:08.763 ERROR (qtp3540494-54) [ x:fsnn] o.a.s.s.HttpSolrCall
> org.apache.solr.common.SolrException: null KNN algorithm is not supported =>
> org.apache.solr.common.SolrException: null KNN algorithm is not supported
> at
> org.apache.solr.core.SchemaCodecFactory$1.getKnnVectorsFormatForField(SchemaCodecFactory.java:134)
> org.apache.solr.common.SolrException: null KNN algorithm is not supported
> at
> org.apache.solr.core.SchemaCodecFactory$1.getKnnVectorsFormatForField(SchemaCodecFactory.java:134)
> ~[?:?]
> at
> org.apache.lucene.codecs.lucene92.Lucene92Codec$3.getKnnVectorsFormatForField(Lucene92Codec.java:101)
> ~[?:?]
> at
> org.apache.lucene.codecs.perfield.PerFieldKnnVectorsFormat$FieldsWriter.getInstance(PerFieldKnnVectorsFormat.java:148)
> ~[?:?]
> at
> org.apache.lucene.codecs.perfield.PerFieldKnnVectorsFormat$FieldsWriter.writeField(PerFieldKnnVectorsFormat.java:107)
> ~[?:?]
> at
> org.apache.lucene.index.VectorValuesWriter.flush(VectorValuesWriter.java:145)
> ~[?:?]
> at org.apache.lucene.index.IndexingChain.writeVectors(IndexingChain.java:461)
> ~[?:?] {code}
> This appears to be related to the changes introduced in SOLR-16245
>
> Adding a parameter {{knnAlgorithm="hnsw"}} to the fieldType definition causes
> the indexing process to work as expected
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]