epugh commented on code in PR #2356:
URL: https://github.com/apache/solr/pull/2356#discussion_r1530500951


##########
solr/solr-ref-guide/modules/query-guide/pages/spell-checking.adoc:
##########
@@ -25,26 +25,34 @@ The basis for these suggestions can be terms in a field in 
Solr, externally crea
 === Define Spell Check in solrconfig.xml
 
 The first step is to specify the source of terms in `solrconfig.xml`.
-There are three approaches to spell checking in Solr, discussed below.
+There is a number of approaches to spell checking in Solr, discussed below.

Review Comment:
   Maybe "There are a number of"?



##########
solr/solr-ref-guide/modules/query-guide/pages/spell-checking.adoc:
##########
@@ -530,4 +597,4 @@ For example:
 
http://localhost:8983/solr/techproducts/spell?spellcheck=true&spellcheck.build=true&spellcheck.q=toyata&shards.qt=/spell&shards=solr-shard1:8983/solr/techproducts,solr-shard2:8983/solr/techproducts
 
 In case of a distributed request to the SpellCheckComponent, the shards are 
requested for at least five suggestions even if the `spellcheck.count` 
parameter value is less than five.
-Once the suggestions are collected, they are ranked by the configured distance 
measure (Levenstein Distance by default) and then by aggregate frequency.
+Once the suggestions are collected, they are ranked by the configured distance 
measure (LevenshteinDistance by default) and then by aggregate frequency.

Review Comment:
   did you mean to remove the space?



##########
solr/solr-ref-guide/modules/query-guide/pages/spell-checking.adoc:
##########
@@ -25,26 +25,34 @@ The basis for these suggestions can be terms in a field in 
Solr, externally crea
 === Define Spell Check in solrconfig.xml
 
 The first step is to specify the source of terms in `solrconfig.xml`.
-There are three approaches to spell checking in Solr, discussed below.
+There is a number of approaches to spell checking in Solr, discussed below.
 
 ==== IndexBasedSpellChecker
 
 The `IndexBasedSpellChecker` uses a Solr index as the basis for a parallel 
index used for spell checking.
 It requires defining a field as the basis for the index terms; a common 
practice is to copy terms from some fields (such as `title`, `body`, etc.) to 
another field created for spell checking.
-Here is a simple example of configuring `solrconfig.xml` with the 
`IndexBasedSpellChecker`:
+Here is an example of configuring `IndexBasedSpellChecker` in `solrconfig.xml`:
 
 [source,xml]
 ----
 <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
   <lst name="spellchecker">
     <str name="classname">solr.IndexBasedSpellChecker</str>
-    <str name="spellcheckIndexDir">./spellchecker</str>
+    <!-- required parameters -->
     <str name="field">content</str>
-    <str name="buildOnCommit">true</str>
-    <!-- optional elements with defaults
+    <!-- optional parameters for IndexBasedSpellChecker -->
+    <str name="sourceLocation">./folder/with/index/files</str>
+    <!-- optional parameters for all spellcheckers -->
+    <str name="spellcheckIndexDir">./spellcheckerDir</str>
+    <str name="name">default</str>
+    <str name="fieldType">content_ft</str>
+    <str name="queryAnalyzerFieldType">text_general</str>
     <str 
name="distanceMeasure">org.apache.lucene.search.spell.LevenshteinDistance</str>
-    <str name="accuracy">0.5</str>
-    -->
+    <str name="comparatorClass">score</str>
+    <float name="accuracy">0.5</float>

Review Comment:
   This in interesting...    I don't know that I have every used the `<float` 
attribute in my `solrconfig.xml` file...    I guess I assumed that everything 
was a `<str` and it was just how we passed in parameters.     This may be a 
larger question, but does having a type in the `solrconfig.xml` actually help 
us?     I wonder if everything should have just been `<param 
name="accuracy">0.5</param>` and let the Java code sort it out???     I am 
curious if we use `<float` and `<int` widely...?



-- 
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

Reply via email to