[
https://issues.apache.org/jira/browse/SOLR-5787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14118265#comment-14118265
]
James Dyer commented on SOLR-5787:
----------------------------------
The counts for the individual-word suggestions show the total count for the
entire index. This is the section of the spellcheck response you get with
"spellcheck.extendedResults=true"
{code:xml}
<lst name="hopq">
<int name="numFound">3</int>
<int name="startOffset">10</int>
<int name="endOffset">14</int>
<int name="origFreq">0</int>
<arr name="suggestion">
<lst>
<str name="word">hope</str>
<int name="freq">25283</int>
</lst>
<lst>
<str name="word">hopi</str>
<int name="freq">647</int>
</lst>
<lst>
<str name="word">hops</str>
<int name="freq">246</int>
</lst>
</arr>
</lst>
{code}
So "hope" occurs in the 25,283 times total in the entire index whereas "hops"
is only in the index 246.
On the other hand, if you are setting "spellcheck.maxCollateTries" >0 with
"spellcheck.collate=true" and "spellcheck.collateExtendedResults=true", this
section tells you the total hits the collation would return if you re-queried
it.
{code:xml}
<lst name="collation">
<str name="collationQuery">(life AND hope)</str>
<int name="hits">1328</int>
<lst name="misspellingsAndCorrections">
<str name="lifq">life</str>
<str name="hopq">hope</str>
</lst>
</lst>
{code}
In this example, if you kept the same "fq" parameters as before but changed "q"
to "(life AND hope)", your query would return 1,328 results.
> Get spellcheck frequency relatively to current query
> ----------------------------------------------------
>
> Key: SOLR-5787
> URL: https://issues.apache.org/jira/browse/SOLR-5787
> Project: Solr
> Issue Type: Improvement
> Components: spellchecker
> Affects Versions: 4.6
> Environment: Solr deployed on Jetty 9 Servlet container
> Reporter: Hakim
> Priority: Minor
> Labels: features, newbie
>
> I guess that this functionnality isn't implemented yet. I'll begin by an
> example to explain what I'm requesting:
> I have a lucene query that get articles satisfying a certain query. With this
> same command, I'm getting at the same time suggestions if this query doesnt
> return any article (so far, nothing unusual).
> The frequency (count) associated with these suggestions is relative to all
> index (it counts all occurences of the suggestion in the whole index). What I
> want is that it counts only suggestion occurences satisfying current lucene
> query.
> P.S: I'm using solr's spellcheck component (solr.DirectSolrSpellChecker).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]