Are you running off of a release? onlyMorePopular was only
implemented in the trunk a few days ago (in earlier versions, even if
you specified onlyMorePopular, it was ignored).
dave
On Oct 24, 2007, at 5:58 PM, Justin Knoll wrote:
I'm running the example Solr install with a custom schema.xml and
solrconfig.xml. I'm seeing some unexpected results for searches
using the SpellCheckerRequestHandler using the onlyMorePopular
option. Namely, searching for certain terms with onlyMorePopular
set to true returns a suggestion which, when searched for in turn
itself, returns a suggestion back to the original term.
For example, a query such as:
http://localhost:8983/solr/select/?
q=Eft&qt=spellchecker&onlyMorePopular=true
returns:
<response>
−
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">2</int>
</lst>
−
<arr name="suggestions">
<str>oft</str>
</arr>
</response>
And a query for
http://localhost:8983/solr/select/?
q=oft&qt=spellchecker&onlyMorePopular=true
<response>
−
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">2</int>
</lst>
−
<arr name="suggestions">
<str>Eft</str>
</arr>
</response>
It seems that "onlyMorePopular" should be an asymmetric relation. I
thought perhaps it might actually be implemented as a >= instead of
a strict >, making it antisymmetric and perhaps explaining this
result as a popularity tie. However, taking a clean copy of the
example install, adding entries into the spellchecker.xml file,
then inserting and rebuilding the index results in onlyMorePopular
cross-recommendations as above even when I've created a clear
popularity inequality between similar terms (e.g. adding two docs
with word="blackkerry" makes it more popular than the existing
"blackberry" doc, but each is suggested for the other).
I checked the defaults list for the spellchecker requestHandler in
my solrconfig.xml, and it didn't specify a value for
onlyMorePopular. I added a default value of true and restarted
Solr, but that has no effect. I've also tried using Luke to inspect
the spell index, but I'm not sure exactly what to look for. I'd be
more than happy to provide any details which might assist others in
lending their expertise. Any insights would be very much appreciated.
Thanks,
Justin Knoll