[ 
https://issues.apache.org/jira/browse/SOLR-16588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17656050#comment-17656050
 ] 

ASF subversion and git services commented on SOLR-16588:
--------------------------------------------------------

Commit db6218d0fe1c34da57d2d753d5e5bece6244961a in solr's branch 
refs/heads/branch_9x from Alessandro Benedetti
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=db6218d0fe1 ]

SOLR-16588: set default knn algorithm (#1255)

Co-authored-by: Elia <e.porci...@sease.io>
Co-authored-by: Kevin Risden <risd...@users.noreply.github.com>

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

Reply via email to