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 Romi <ro...@gmail.com> on 2011/06/22 14:08:48 UTC

Conflict in wildcard query and spellchecker in solr search

Using solr search when i search for rin* it run wildcard query and i get the
result for ring but when i search for Rin* it run spellchecker and then
gives the result for ring. why so ?? please explain

-----
Thanks & Regards
Romi
--
View this message in context: http://lucene.472066.n3.nabble.com/Conflict-in-wildcard-query-and-spellchecker-in-solr-search-tp3095198p3095198.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Conflict in wildcard query and spellchecker in solr search

Posted by Romi <ro...@gmail.com>.
how can I lowercase query outside of Solr before sending a query?

-----
Thanks & Regards
Romi
--
View this message in context: http://lucene.472066.n3.nabble.com/Conflict-in-wildcard-query-and-spellchecker-in-solr-search-tp3095198p3095345.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Conflict in wildcard query and spellchecker in solr search

Posted by Markus Jelsma <ma...@openindex.io>.
No, wildcard queries are not analyzed. They are not _passed_ through your 
analyzers. If you lowercase at index-time, you must lowercase it outside of 
Solr before sending a query.

On Wednesday 22 June 2011 14:35:12 Romi wrote:
> * <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
>       <analyzer type="index">
>         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
> 
>         <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt"/>
>         <filter class="solr.WordDelimiterFilterFactory"
> generateWordParts="1" generateNumberParts="1" catenateWords="1"
> catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
>         <filter class="solr.LowerCaseFilterFactory"/>
> 		<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
> ignoreCase="true" expand="true"/>
>         <filter class="solr.EnglishPorterFilterFactory"
> protected="protwords.txt"/>
>         <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
> 		<filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"
> maxPosAsterisk="6" maxPosQuestion="2" maxFractionAsterisk="0.33"/>
>       </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"/>
>         <filter class="solr.WordDelimiterFilterFactory"
> generateWordParts="1" generateNumberParts="1" catenateWords="0"
> catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
>         <filter class="solr.LowerCaseFilterFactory"/>
>         <filter class="solr.EnglishPorterFilterFactory"
> protected="protwords.txt"/>
>         <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
> 
> 
>       </analyzer>
>     </fieldType>*
> 
> I am using this fieldtype and applied these filters. for wildcard searches
> do i need to include some more filters or what other configurations are
> needed
> 
> -----
> Thanks & Regards
> Romi
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Conflict-in-wildcard-query-and-spellche
> cker-in-solr-search-tp3095198p3095290.html Sent from the Solr - User
> mailing list archive at Nabble.com.

-- 
Markus Jelsma - CTO - Openindex
http://www.linkedin.com/in/markus17
050-8536620 / 06-50258350

Re: Conflict in wildcard query and spellchecker in solr search

Posted by Romi <ro...@gmail.com>.
* <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
      <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        
        <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
        <filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="1"
catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
        <filter class="solr.LowerCaseFilterFactory"/>
		<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
        <filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
		<filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"
maxPosAsterisk="6" maxPosQuestion="2" maxFractionAsterisk="0.33"/> 
      </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"/>
        <filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="0"
catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
		

      </analyzer>
    </fieldType>*

I am using this fieldtype and applied these filters. for wildcard searches 
do i need to include some more filters or what other configurations are
needed

-----
Thanks & Regards
Romi
--
View this message in context: http://lucene.472066.n3.nabble.com/Conflict-in-wildcard-query-and-spellchecker-in-solr-search-tp3095198p3095290.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Conflict in wildcard query and spellchecker in solr search

Posted by Markus Jelsma <ma...@openindex.io>.
Wildcard queries are not analyzed. Lowercase your query beforehand.

On Wednesday 22 June 2011 14:08:48 Romi wrote:
> Using solr search when i search for rin* it run wildcard query and i get
> the result for ring but when i search for Rin* it run spellchecker and
> then gives the result for ring. why so ?? please explain
> 
> -----
> Thanks & Regards
> Romi
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Conflict-in-wildcard-query-and-spellche
> cker-in-solr-search-tp3095198p3095198.html Sent from the Solr - User
> mailing list archive at Nabble.com.

-- 
Markus Jelsma - CTO - Openindex
http://www.linkedin.com/in/markus17
050-8536620 / 06-50258350