[ 
https://issues.apache.org/jira/browse/SOLR-16588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Gibney updated SOLR-16588:
----------------------------------
    Fix Version/s: 9.1.1
       Resolution: Fixed
           Status: Resolved  (was: Patch Available)

> 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
>             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-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to