AndreyBozhko commented on code in PR #1961: URL: https://github.com/apache/solr/pull/1961#discussion_r1341570910
########## solr/solr-ref-guide/modules/indexing-guide/pages/schema-elements.adoc: ########## @@ -95,18 +95,23 @@ However, `uniqueKey` will continue to work, as long as the field is properly use Similarity is a Lucene class used to score a document in searching. Each collection has one "global" Similarity. -By default Solr uses an implicit {solr-javadocs}/core/org/apache/solr/search/similarities/SchemaSimilarityFactory.html[`SchemaSimilarityFactory`] which allows individual field types to be configured with a "per-type" specific Similarity and implicitly uses `BM25Similarity` for any field type which does not have an explicit Similarity. +By default, Solr uses an implicit {solr-javadocs}/core/org/apache/solr/search/similarities/SchemaSimilarityFactory.html[`SchemaSimilarityFactory`] which allows individual field types to be configured with a "per-type" specific Similarity and implicitly uses `BM25Similarity` for any field type which does not have an explicit Similarity. This default behavior can be overridden by declaring a top level `<similarity/>` element in your schema, outside of any single field type. This similarity declaration can either refer directly to the name of a class with a no-argument constructor, such as in this example showing `BM25Similarity`: [source,xml] ---- -<similarity class="solr.BM25SimilarityFactory"/> +<similarity class="org.apache.lucene.search.similarities.BM25Similarity"/> Review Comment: Here, I just updated the xml snippets - so if the text says `in this example showing BM25Similarity`, the example indeed uses the similarity directly and not the factory. I tried writing this snippet as ```xml <similarity class="solr.BM25Similarity"/> ``` at first - but it seems like if the similarity class is from Lucene, the `solr.` shorthand doesn't work. And the original xml snippet (that was using the similarity factory) now appears after the text that talks about similarity factories. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org