You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ho...@apache.org on 2023/11/01 21:48:22 UTC

(solr) branch main updated: SOLR-17046: ref-guide updates now that SchemaCodecFactory is implicit default

This is an automated email from the ASF dual-hosted git repository.

hossman pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new e371e10cfde SOLR-17046: ref-guide updates now that SchemaCodecFactory is implicit default
e371e10cfde is described below

commit e371e10cfdea68154e8d48b2acb133ef74fb4015
Author: Chris Hostetter <ho...@apache.org>
AuthorDate: Wed Nov 1 14:48:13 2023 -0700

    SOLR-17046: ref-guide updates now that SchemaCodecFactory is implicit default
---
 .../configuration-guide/pages/codec-factory.adoc   | 30 +++++++++++++++++-----
 .../field-type-definitions-and-properties.adoc     |  5 ++--
 .../query-guide/pages/dense-vector-search.adoc     |  6 +----
 3 files changed, 28 insertions(+), 13 deletions(-)

diff --git a/solr/solr-ref-guide/modules/configuration-guide/pages/codec-factory.adoc b/solr/solr-ref-guide/modules/configuration-guide/pages/codec-factory.adoc
index c16b59b1b54..e4275d5f114 100644
--- a/solr/solr-ref-guide/modules/configuration-guide/pages/codec-factory.adoc
+++ b/solr/solr-ref-guide/modules/configuration-guide/pages/codec-factory.adoc
@@ -18,16 +18,34 @@
 
 A `codecFactory` can be specified in `solrconfig.xml` to determine which Lucene {lucene-javadocs}/core/org/apache/lucene/codecs/Codec.html[`Codec`] is used when writing the index to disk.
 
-If not specified, Lucene's default codec is implicitly used.
+If not specified, Solr's `SchemaCodecFactory` is implicitly used as if it had been defined with no configuration options:
 
-== Alternatives to the Default Codec
-There are two alternatives to Lucene's default codec.
+[source,xml]
+----
+<codecFactory class="solr.SchemaCodecFactory" />
+----
+
+
+== Available Codec Factories
+
+=== solr.LuceneDefaultCodecFactory
+
+The {solr-javadocs}/core/org/apache/solr/core/LuceneDefaultCodecFactory.html[`solr.LuceneDefaultCodecFactory`] Uses the Lucene {lucene-javadocs}/core/org/apache/lucene/codecs/Codec.html#getDefault()[`Codec.getDefault()`] and does not support any configuration options.
+
+Example:
+
+[source,xml]
+----
+<codecFactory class="solr.LuceneDefaultCodecFactory" />
+----
 
-=== solr.SchemaCodecFactory
+=== solr.SchemaCodecFactory (default)
 
-The {solr-javadocs}/core/org/apache/solr/core/SchemaCodecFactory.html[`solr.SchemaCodecFactory`] supports 2 key features:
+The {solr-javadocs}/core/org/apache/solr/core/SchemaCodecFactory.html[`solr.SchemaCodecFactory`] defaults to the same behavior as Lucene's default Codec, but supports 2 additional key features:
 
-* Schema based per-fieldtype configuration for `docValuesFormat` and `postingsFormat` - see the xref:indexing-guide:field-type-definitions-and-properties.adoc#field-type-properties[Field Type Properties] section for more details.
+* Schema based per-fieldtype customizations:
+** `docValuesFormat` and `postingsFormat` on any field type - see the xref:indexing-guide:field-type-definitions-and-properties.adoc#field-type-properties[Field Type Properties] section for more details.
+** Support for `DenseVectorField` customizations to the `KnnVectorsFormat` - see the xref:query-guide:dense-vector-search.adoc[Dense Vector Search] section for more details.
 * A `compressionMode` option:
 ** `BEST_SPEED` (default) is optimized for search speed performance
 ** `BEST_COMPRESSION` is optimized for disk space usage
diff --git a/solr/solr-ref-guide/modules/indexing-guide/pages/field-type-definitions-and-properties.adoc b/solr/solr-ref-guide/modules/indexing-guide/pages/field-type-definitions-and-properties.adoc
index 39f2ee5751f..6122e7476d2 100644
--- a/solr/solr-ref-guide/modules/indexing-guide/pages/field-type-definitions-and-properties.adoc
+++ b/solr/solr-ref-guide/modules/indexing-guide/pages/field-type-definitions-and-properties.adoc
@@ -165,7 +165,7 @@ Use `false` for field types with query analyzers including filters that can matc
 |===
 +
 Defines a custom `DocValuesFormat` to use for fields of this type.
-This requires that a schema-aware codec, such as the `SchemaCodecFactory`, has been configured in `solrconfig.xml`.
+This requires that a schema-aware codec, such as the xref:configuration-guide:codec-factory.adoc[Schema Codec Factory], is in use.
 
 `postingsFormat`::
 +
@@ -175,7 +175,8 @@ This requires that a schema-aware codec, such as the `SchemaCodecFactory`, has b
 |===
 +
 Defines a custom `PostingsFormat` to use for fields of this type.
-This requires that a schema-aware codec, such as the `SchemaCodecFactory`, has been configured in `solrconfig.xml`.
+This requires that a schema-aware codec, such as the xref:configuration-guide:codec-factory.adoc[Schema Codec Factory], is in use.
+
 
 [NOTE]
 ====
diff --git a/solr/solr-ref-guide/modules/query-guide/pages/dense-vector-search.adoc b/solr/solr-ref-guide/modules/query-guide/pages/dense-vector-search.adoc
index 10b49ccc07c..076b42fe410 100644
--- a/solr/solr-ref-guide/modules/query-guide/pages/dense-vector-search.adoc
+++ b/solr/solr-ref-guide/modules/query-guide/pages/dense-vector-search.adoc
@@ -100,11 +100,7 @@ this similarity is intended as an optimized way to perform cosine similarity. In
 the preferred way to perform cosine similarity is to normalize all vectors to unit length, and instead use DOT_PRODUCT. You should only use this function if you need to preserve the original vectors and cannot normalize them in advance.
 
 To use the following advanced parameters that customise the codec format
-and the hyper-parameter of the HNSW algorithm make sure you set this configuration in `solrconfig.xml`:
-[source,xml]
-<config>
-<codecFactory class="solr.SchemaCodecFactory"/>
-...
+and the hyper-parameter of the HNSW algorithm, make sure the xref:configuration-guide:codec-factory.adoc[Schema Codec Factory], is in use.
 
 Here's how `DenseVectorField` can be configured with the advanced hyper-parameters: