On Nov 21, 2010, at 7:14 AM, rajini maski wrote: > If any one know articles or blog on solr spell-check component configuration > type..please let me know..solr-wiki not helping me solve maze..
Might be helpful: http://www.lucidimagination.com/blog/2010/08/31/getting-started-spell-checking-with-apache-lucene-and-solr/ BTW, in your schema, how are you populating the spell field? Do you have a copy field setup or are you sending in directly to the spell field? > > On Fri, Nov 19, 2010 at 12:40 PM, rajini maski <rajinima...@gmail.com>wrote: > >> And If I am trying to do : >> >> http://localhost:8909/solr/select/?spellcheck.q=Curst&version=2.2&start=0&rows=10&indent=on&spellcheck=true >> &q=Curst& >> >> The XML OUTPUT IS >> >> -<http://localhost:8090/solr/select/?spellcheck.q=Curst&version=2.2&start=0&rows=10&indent=on&q=Curst#> >> <response> >> -<http://localhost:8090/solr/select/?spellcheck.q=Curst&version=2.2&start=0&rows=10&indent=on&q=Curst#> >> <lst name="*responseHeader*"> >> <int name="*status*">0</int> >> <int name="*QTime*">0</int> >> -<http://localhost:8090/solr/select/?spellcheck.q=Curst&version=2.2&start=0&rows=10&indent=on&q=Curst#> >> <lst name="*params*"> >> <str name="*indent*">on</str> >> <str name="*start*">0</str> >> <str name="*q*">Curst</str> >> <str name="*spellcheck.q*">Curst</str> >> <str name="*rows*">10</str> >> <str name="*version*">2.2</str> >> </lst> >> </lst> >> <result name="*response*" numFound="*0*" start="*0*" /> >> </response> >> >> No suggestion Tags also... >> >> If I am trying to do : >> >> http://localhost:8909/solr/select/?spellcheck.q=Curst&version=2.2&start=0&rows=10&indent=on&spellcheck=true >> &q=Crust& >> >> The XML OUTPUT IS >> >> -<http://localhost:8090/solr/select/?spellcheck.q=Curst&version=2.2&start=0&rows=10&indent=on&q=Crust#> >> <response> >> -<http://localhost:8090/solr/select/?spellcheck.q=Curst&version=2.2&start=0&rows=10&indent=on&q=Crust#> >> <lst name="*responseHeader*"> >> <int name="*status*">0</int> >> <int name="*QTime*">0</int> >> -<http://localhost:8090/solr/select/?spellcheck.q=Curst&version=2.2&start=0&rows=10&indent=on&q=Crust#> >> <lst name="*params*"> >> <str name="*indent*">on</str> >> <str name="*start*">0</str> >> <str name="*q*">Crust</str> >> <str name="*spellcheck.q*">Curst</str> >> <str name="*rows*">10</str> >> <str name="*version*">2.2</str> >> </lst> >> </lst> >> -<http://localhost:8090/solr/select/?spellcheck.q=Curst&version=2.2&start=0&rows=10&indent=on&q=Crust#> >> <result name="*response*" numFound="*1*" start="*0*"> >> -<http://localhost:8090/solr/select/?spellcheck.q=Curst&version=2.2&start=0&rows=10&indent=on&q=Crust#> >> <doc> >> <str name="*spell*">Crust</str> >> </doc> >> </result> >> </response> >> >> No suggestion Tags.. >> >> What is the proper configuration for this? Is there any specific article >> written on spell check-solr other then in solr-wiki page..I am not getting >> clear idea about this component in solr-wiki.. >> >> Awaiting replies.. >> Rajani Maski >> >> >> On Fri, Nov 19, 2010 at 11:32 AM, rajini maski <rajinima...@gmail.com>wrote: >> >>> Hello Peter, >>> Thanks For reply :)I did spellcheck.q=Curst as you said ...Query >>> is like: >>> >>> >>> http://localhost:8909/solr/select/?spellcheck.q=Curst&version=2.2&start=0&rows=10&indent=on&spellcheck=true >>> >>> >>> >>> I am getting this error :( >>> >>> HTTP Status 500 - null java.lang.NullPointerException at >>> java.io.StringReader.<init>(Unknown Source) at >>> org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:197) at >>> org.apache.solr.search.LuceneQParser.parse(LuceneQParserPlugin.java:78) at >>> org.apache.solr.search.QParser.getQuery(QParser.java:131) at >>> org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:89) >>> at >>> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:174) >>> at >>> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131) >>> at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316) at >>> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338) >>> at >>> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241) >>> at >>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) >>> at >>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >>> at >>> >>> >>> What is the error mean ... ? what do I need to do for this.. Any mistake >>> in config? >>> >>> The config.xml and schema I have attached in the mail below FYI..Please >>> let me know if anyone know why is this error.. >>> >>> Awaiting reply >>> Rajani Maski >>> >>> >>> On Thu, Nov 18, 2010 at 8:09 PM, Peter Karich <peat...@yahoo.de> wrote: >>> >>>> Hi Rajani, >>>> >>>> some notes: >>>> * try spellcheck.q=curst or completely without spellcheck.q but with q >>>> * compared to the normal q parameter spellcheck.q can have a different >>>> analyzer/tokenizer and is used if present >>>> * do not do spellcheck.build=true for every request (creating the >>>> spellcheck index can be very expensive) >>>> * if you got spellcheck working embed the spellcheck component into your >>>> normal query component. otherwise you need to query 2 times ... >>>> >>>> Regards, >>>> Peter. >>>> >>>> >>>> All, >>>>> >>>>> I am trying apply the Solr spell check component functionality to >>>>> our >>>>> data. >>>>> >>>>> The configuration set up I needed to make for it by updating config.xml >>>>> and >>>>> schema.xml is done as follows.. >>>>> Please let me know if any errors in it. >>>>> >>>>> I am not getting any suggestions in suggestion tags of solr output xml. >>>>> >>>>> I indexed word "Crust" to the field textSpell that is enabled for spell >>>>> check and then I searched for >>>>> "Curst" >>>>> >>>>> The queries i tried were : >>>>> >>>>> http://localhost:8909/solr/spell?q=Curst&spellcheck=true&spellcheck.collate=true&spellcheck.build=true&spellcheck.q=true >>>>> >>>>> >>>>> http://localhost:8909/solr/spell?q=Cruste&spellcheck=true&spellcheck.collate=true&spellcheck.build=true&spellcheck.q=true&spellcheck.dictionary=default >>>>> >>>>> >>>>> The CONFIG.XML : >>>>> >>>>> <searchComponent name="spellcheck" class="solr.SpellCheckComponent"> >>>>> <lst name="spellchecker"> >>>>> <str name="name">default</str> >>>>> <str name="field">spell</str> >>>>> <str name="spellcheckIndexDir">./spellchecker</str> >>>>> </lst> >>>>> >>>>> <!-- a spellchecker that uses a different distance measure --> >>>>> <lst name="spellchecker"> >>>>> <str name="name">jarowinkler</str> >>>>> <str name="field">lowerfilt</str> >>>>> <str >>>>> >>>>> name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str> >>>>> <str name="spellcheckIndexDir">./spellchecker2</str> >>>>> </lst> >>>>> <str name="queryAnalyzerFieldType">textSpell</str> >>>>> </searchComponent> >>>>> >>>>> <requestHandler name="/spell" class="solr.SearchHandler" lazy="true"> >>>>> <lst name="defaults"> >>>>> <str name="spellcheck.dictionary">default</str> >>>>> <!-- 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> >>>>> >>>>> >>>>> >>>>> SCHEMA: >>>>> >>>>> <fieldType name="textSpell" class="solr.TextField" >>>>> positionIncrementGap="100"> >>>>> <analyzer type="index"> >>>>> <tokenizer class="solr.StandardTokenizerFactory"/> >>>>> <filter class="solr.LowerCaseFilterFactory"/> >>>>> <filter class="solr.StandardFilterFactory"/> >>>>> <filter class="solr.RemoveDuplicatesTokenFilterFactory"/> >>>>> </analyzer> >>>>> <analyzer type="query"> >>>>> <tokenizer class="solr.StandardTokenizerFactory"/> >>>>> <filter class="solr.LowerCaseFilterFactory"/> >>>>> <filter class="solr.StandardFilterFactory"/> >>>>> <filter class="solr.RemoveDuplicatesTokenFilterFactory"/> >>>>> </analyzer> >>>>> </fieldType> >>>>> >>>>> >>>>> <field name="spell" type="textSpell" indexed="true" stored="true" /> >>>>> >>>>> >>>>> If any error in above that is not enabling spell check please let me >>>>> know. >>>>> >>>>> The output I am getting is like null suggetions >>>>> >>>>> <lst> >>>>> <Suggesstions/> >>>>> </lst> >>>>> >>>>> >>>>> Regards, >>>>> Rajani Maski >>>>> >>>>> >>>> >>>> -- >>>> http://jetwick.com twitter search prototype >>>> >>>> >>> >> -------------------------- Grant Ingersoll http://www.lucidimagination.com