: I'm trying to perform spell checking as part of a query using the Lucene
: parser, and I'm finding that the spell checker is giving me suggestions for
: the mathematical functions used in my boost clause. Here's my request as
: seen through solr admin:
spellchecker looks at the literal "q" param -- it doesn't know about your
"qq" param (it has to do it's own parsing, so it doesn't get the expanded
query from the boost parser)
take a look at the spellcheck.q param as a way to be very explicit about
what you want spellchecker to operate on.
: <lst name="params">
: <str name="spellcheck">true</str>
: <str name="wt">xml</str>
: <str name="rows">5</str>
: <str name="fl">*,score</str>
: <str name="start">0</str>
: <str name="q">
: {!boost b=log(linear(journal_entry_count,0.0001,1)) v=$qq}
: </str>
: <str name="qq">
: username_exact:(test)^4.5 username_exact:(test~)^3 username:(test)^3.0
: username:(test~)^2 about_me:(test)^1.5 about_me:(test~)^1
: medical_conditions:(test)^1.5 medical_conditions:(test~)^1 name:(test)^1.5
: name:(test~)^1 email:(test)^1.5 email:(test~)^1
: </str>
: </lst>
:
: Here are the spellcheck suggestions given to me (note the terms "log" and
: "linear" that aren't part of the actual query):
:
: <lst name="spellcheck">
: <lst name="suggestions">
: <lst name="boost"> <-------- this is not part of the query
: proper
: <int name="numFound">1</int>
: <int name="startOffset">2</int>
: <int name="endOffset">7</int>
: <arr name="suggestion">
: <str>best</str>
: </arr>
: </lst>
: <lst name="log"> <-------- this is not part of the query
: proper
: <int name="numFound">1</int>
: <int name="startOffset">10</int>
: <int name="endOffset">13</int>
: <arr name="suggestion">
: <str>long</str>
: </arr>
: </lst>
: [rest removed]
: </lst>
:
: Am I doing something wrong with the boosting part of the query? Is there a
: way to exclude the functions in the boost clause from spell checking?
:
: Thanks
: Cuong
:
-Hoss