You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by sunnyfr <jo...@gmail.com> on 2008/10/17 11:16:49 UTC

Re: LowerCaseFilterFactory and spellchecker

Hi,

After reading this post, I looked for in solrconfig.xml :
<requestHandler name="spellchecker"
class="solr.SpellCheckerRequestHandler" startup="lazy">
	<lst name="defaults">
		<int name="suggestionCount">1</int>
		<float name="accuracy">0.5</float>
	</lst>
	<str name="spellcheckerIndexDir">spell</str>
	<str name="termSourceField">spelling</str>
</requestHandler>

But couldn't find it, just find :
  <!-- a request handler utilizing the spellcheck component -->
  <requestHandler name="/spellCheckCompRH" class="solr.SearchHandler">
    <lst name="defaults">
      <!-- omp = Only More Popular -->
      <str name="spellcheck.onlyMorePopular">false</str>
      <!-- exr = Extended Results -->
      <str name="spellcheck.extendedResults">false</str>
      <!--  The number of suggestions to return -->
      <str name="spellcheck.count">1</str>
    </lst>
    <arr name="last-components">
      <str>spellcheck</str>
    </arr>
  </requestHandler>

Can you tell me the difference? and which dir should i point to ?
Thanks a lot,

(solr1.3)


Rob Casson wrote:
> 
> think i'm just doing something wrong...
> 
> was experimenting with the spellcheck handler with the nightly
> checkout from 11-28; seems my spellchecking is case-sensitive, even
> tho i think i'm adding the LowerCaseFilterFactory to both the index
> and query analyzers.
> 
> here's a brief rundown of my testing steps.
> 
> from schema.xml:
> 
> <fieldtype name="spell" class="solr.TextField" positionIncrementGap="100">
> 	<analyzer type="index">
> 		<tokenizer class="solr.StandardTokenizerFactory"/>
> 		<filter class="solr.StandardFilterFactory"/>
> 		<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
> 		<filter class="solr.LowerCaseFilterFactory"/>
> 	</analyzer>
> 	<analyzer type="query">
> 		<tokenizer class="solr.StandardTokenizerFactory"/>
> 		<filter class="solr.StandardFilterFactory"/>
> 		<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
> 		<filter class="solr.LowerCaseFilterFactory"/>
> 	</analyzer>
> </fieldtype>
> 
> <field name="title" type="text" indexed="true" stored="true"
> multiValued="true"/>
> <field name="spelling" type="spell" indexed="true" stored="stored"
> multiValued="true"/>
> 
> <copyField source="title" dest="spelling"/>
> 
> --------------------------------
> 
> from solrconfig.xml:
> 
> <requestHandler name="spellchecker"
> class="solr.SpellCheckerRequestHandler" startup="lazy">
> 	<lst name="defaults">
> 		<int name="suggestionCount">1</int>
> 		<float name="accuracy">0.5</float>
> 	</lst>
> 	<str name="spellcheckerIndexDir">spell</str>
> 	<str name="termSourceField">spelling</str>
> </requestHandler>
> 
> --------------------------------
> 
> adding the doc:
> 
> curl http://localhost:8983/solr/update -H "Content-Type: text/xml"
> --data-binary '<add><doc><field
> name="title">Thorne</field></doc></add>'
> curl http://localhost:8983/solr/update -H "Content-Type: text/xml"
> --data-binary '<optimize />'
> 
> --------------------------------
> 
> building the spellchecker:
> 
> http://localhost:8983/solr/select/?q=Thorne&qt=spellchecker&cmd=rebuild
> 
> --------------------------------
> 
> querying the spellchecker:
> 
> results from http://localhost:8983/solr/select/?q=Thorne&qt=spellchecker
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <response>
> 	<lst name="responseHeader">
> 		<int name="status">0</int>
> 		<int name="QTime">1</int>
> 	</lst>
> 	<str name="words">Thorne</str>
> 	<str name="exist">false</str>
> 	<arr name="suggestions">
> 		<str>thorne</str>
> 	</arr>
> </response>
> 
> results from http://localhost:8983/solr/select/?q=thorne&qt=spellchecker
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <response>
> 	<lst name="responseHeader">
> 		<int name="status">0</int>
> 		<int name="QTime">2</int>
> 	</lst>
> 		<str name="words">thorne</str>
> 		<str name="exist">true</str>
> 	<arr name="suggestions"/>
> </response>
> 
> 
> any pointers as to what i'm doing wrong, misinterpreting?  i suspect
> i'm just doing something bone-headed in the analyzer sections...
> 
> thanks as always,
> 
> rob casson
> miami university libraries
> 
> 

-- 
View this message in context: http://www.nabble.com/LowerCaseFilterFactory-and-spellchecker-tp14016710p20029819.html
Sent from the Solr - User mailing list archive at Nabble.com.