Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-17047

(SolrCore's) CodecFactory validation ignores schema based KnnVectorsFormat options on init

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      SolrCore's logic for initializing a CodecFactory includes some validation that (in psuedo-code) looks like:

      if factory is not instanceof SolrCoreAware:
        loop over all FieldTypes in schema:
          if fieldtype has configured postings format: throw error 
          if fieldtype has configured docValues format: throw error 
      

      ..essentially: "If the codec can't do it's own validation of how the fieldtypes are configured, sanity check what we know can be configured."

      But this validation does not include the configurability of KnnVectorsFormat options in DenseVectorField – these are only validated by SchemaCodecFactory if it's configured.

      Even within SchemaCodecFactory, these per-fieldtype KNN options are only validated "on use" – not on initialization.


      One way or another, attempting to configure DenseVectorField w/options that require SchemaCodecFactory should fail (on SolrCore init) unless SchemaCodecFactory is in use and those options are valid.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hossman Chris M. Hostetter
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: