You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Alessandro Benedetti (Jira)" <ji...@apache.org> on 2023/02/21 10:06:00 UTC
[jira] [Updated] (SOLR-16588) solr.DenseVectorField fieldType without a knnAlgorithm parameter results in error
[ https://issues.apache.org/jira/browse/SOLR-16588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alessandro Benedetti updated SOLR-16588:
----------------------------------------
Labels: vector-based-search (was: )
> 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
> Affects Versions: 9.1
> Reporter: Alastair Porter
> Assignee: Alessandro Benedetti
> Priority: Minor
> Labels: vector-based-search
> Fix For: 9.1.1
>
> 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: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org