RE: spellcheck.collate returning all results

2011-05-24 Thread Richard Hodsdon
Hi,

Thanks this did the trick.
I am using SOLR 3.1, so I did not need to apply the first patch.

Richard

--
View this message in context: 
http://lucene.472066.n3.nabble.com/spellcheck-collate-returning-all-results-tp2975621p2979560.html
Sent from the Solr - User mailing list archive at Nabble.com.


spellcheck.collate returning all results

2011-05-23 Thread Richard Hodsdon
Hi,

I have been trying to set up spellchecking on our system using the
SpellCheckComponent.

According to the wiki by using spellcheck.collate any fq parameters that are
passed through to the original query while doing spellcheck will return
results if the collation is re-run. So far this has not been happening.
I am getting results returned but if I re-run the query passing through the
collated q param it finds nothing.

My initial Query i as follows:
http://127.0.0.1:8983/solr/select?q=reeed%20bulllspellcheck=truespellcheck.collate=truefq=content_type:post

and I get back in the spellcheck lst
lst name=spellcheck
lst name=suggestions
lst name=reeed
int name=numFound1/int
int name=startOffset0/int
int name=endOffset5/int
arr name=suggestion
strred/str
/arr
/lst
lst name=bulll
int name=numFound1/int
int name=startOffset6/int
int name=endOffset11/int
arr name=suggestion
strbull/str
/arr
/lst
str name=collationred bull/str
/lst
/lst

The issue is if I run the query again using the 'correct' query 

http://127.0.0.1:8983/solr/select?q=red%20bullspellcheck=truespellcheck.collate=truefq=content_type:postwt=json

I get no reponses returned. This is because of my content_type:post, which
is filtering correctly. 

I have also run spellcheck.build=true 

I have set up my solrconfig.xml as follows.

searchComponent name=spellcheck class=solr.SpellCheckComponent
str name=queryAnalyzerFieldTypetextgen/str
lst name=spellchecker
  str name=classnamesolr.IndexBasedSpellChecker/str
  str name=spellcheckIndexDir./spellchecker/str
  str name=fieldname/str
  str name=buildOnCommittrue/str
  str name=spellcheck.collatetrue/str
/lst
  /searchComponent

requestHandler name=search class=solr.SearchHandler default=true
 lst name=defaults
   str name=echoParamsexplicit/str
   int name=rows10/int
 /lst
 arr name=last-components
strspellcheck/str
 /arr
/requestHandler

My scheme.xml declares textgen fieldsType and name field
field name=name type=textgen indexed=true stored=true/
fieldType name=textgen class=solr.TextField positionIncrementGap=100
  analyzer type=index
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.StopFilterFactory ignoreCase=true
words=stopwords.txt enablePositionIncrements=true /
filter class=solr.WordDelimiterFilterFactory
generateWordParts=1 generateNumberParts=1 catenateWords=1
catenateNumbers=1 catenateAll=0 splitOnCaseChange=0/
filter class=solr.LowerCaseFilterFactory/
  /analyzer
  analyzer type=query
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.SynonymFilterFactory synonyms=synonyms.txt
ignoreCase=true expand=true/
filter class=solr.StopFilterFactory
ignoreCase=true
words=stopwords.txt
enablePositionIncrements=true
/
filter class=solr.WordDelimiterFilterFactory
generateWordParts=1 generateNumberParts=1 catenateWords=0
catenateNumbers=0 catenateAll=0 splitOnCaseChange=0/
filter class=solr.LowerCaseFilterFactory/
  /analyzer
/fieldType

Thanks

Richard



--
View this message in context: 
http://lucene.472066.n3.nabble.com/spellcheck-collate-returning-all-results-tp2975621p2975621.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: spellcheck.collate returning all results

2011-05-23 Thread Dyer, James
Richard,

To enable the guarantee you need to specify spellcheck.maxCollationTries with 
a value other than zero (which is default).  There is cost involved with 
verifying beforehand if the collations will return hits so this feature is 
off by default.  Also, you may want to enable extended collations with 
spellcheck.collateExtendedResults to know beforehand how many hits you'll 
get.  It also will detail exactly which correction was subbed in for which 
original misspelled word.

Two things you might want to be aware of:
- This is new functionality for 3.1 so it doesn't work on 1.4 without a patch 
(see SOLR-2010 in jira).

- There is a critical bug in the spell check collate functionality that affects 
any use of spellcheck.collate=true in 3.1 and Trunk (4.x).  If using collate 
(even *without* spellcheck.maxCollationTries) you should apply SOLR-2462 
first (see https://issues.apache.org/jira/browse/SOLR-2462 for information  a 
patch).  It is likely this (or a similar fix) will eventually get committed and 
included in the next bug-fix release, should there be one.

James Dyer
E-Commerce Systems
Ingram Content Group
(615) 213-4311


-Original Message-
From: Richard Hodsdon [mailto:hodsdon.rich...@gmail.com] 
Sent: Monday, May 23, 2011 9:54 AM
To: solr-user@lucene.apache.org
Subject: spellcheck.collate returning all results

Hi,

I have been trying to set up spellchecking on our system using the
SpellCheckComponent.

According to the wiki by using spellcheck.collate any fq parameters that are
passed through to the original query while doing spellcheck will return
results if the collation is re-run. So far this has not been happening.
I am getting results returned but if I re-run the query passing through the
collated q param it finds nothing.

My initial Query i as follows:
http://127.0.0.1:8983/solr/select?q=reeed%20bulllspellcheck=truespellcheck.collate=truefq=content_type:post

and I get back in the spellcheck lst
lst name=spellcheck
lst name=suggestions
lst name=reeed
int name=numFound1/int
int name=startOffset0/int
int name=endOffset5/int
arr name=suggestion
strred/str
/arr
/lst
lst name=bulll
int name=numFound1/int
int name=startOffset6/int
int name=endOffset11/int
arr name=suggestion
strbull/str
/arr
/lst
str name=collationred bull/str
/lst
/lst

The issue is if I run the query again using the 'correct' query 

http://127.0.0.1:8983/solr/select?q=red%20bullspellcheck=truespellcheck.collate=truefq=content_type:postwt=json

I get no reponses returned. This is because of my content_type:post, which
is filtering correctly. 

I have also run spellcheck.build=true 

I have set up my solrconfig.xml as follows.

searchComponent name=spellcheck class=solr.SpellCheckComponent
str name=queryAnalyzerFieldTypetextgen/str
lst name=spellchecker
  str name=classnamesolr.IndexBasedSpellChecker/str
  str name=spellcheckIndexDir./spellchecker/str
  str name=fieldname/str
  str name=buildOnCommittrue/str
  str name=spellcheck.collatetrue/str
/lst
  /searchComponent

requestHandler name=search class=solr.SearchHandler default=true
 lst name=defaults
   str name=echoParamsexplicit/str
   int name=rows10/int
 /lst
 arr name=last-components
strspellcheck/str
 /arr
/requestHandler

My scheme.xml declares textgen fieldsType and name field
field name=name type=textgen indexed=true stored=true/
fieldType name=textgen class=solr.TextField positionIncrementGap=100
  analyzer type=index
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.StopFilterFactory ignoreCase=true
words=stopwords.txt enablePositionIncrements=true /
filter class=solr.WordDelimiterFilterFactory
generateWordParts=1 generateNumberParts=1 catenateWords=1
catenateNumbers=1 catenateAll=0 splitOnCaseChange=0/
filter class=solr.LowerCaseFilterFactory/
  /analyzer
  analyzer type=query
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.SynonymFilterFactory synonyms=synonyms.txt
ignoreCase=true expand=true/
filter class=solr.StopFilterFactory
ignoreCase=true
words=stopwords.txt
enablePositionIncrements=true
/
filter class=solr.WordDelimiterFilterFactory
generateWordParts=1 generateNumberParts=1 catenateWords=0
catenateNumbers=0 catenateAll=0 splitOnCaseChange=0/
filter class=solr.LowerCaseFilterFactory/
  /analyzer
/fieldType

Thanks

Richard



--
View this message in context: 
http://lucene.472066.n3.nabble.com/spellcheck-collate-returning-all-results-tp2975621p2975621.html
Sent from the Solr - User mailing list archive at Nabble.com.