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 Hasnain <ha...@hotmail.com> on 2010/10/20 11:15:47 UTC

Searching with Number fields

Hi,

   Im having trouble with searching with number fields, if this field has
alphanumerics then search is working perfect but not with all numbers, can
anyone suggest me  solution???

<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
      <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.SynonymFilterFactory"
synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
        
        
        <filter class="solr.StopFilterFactory"
                ignoreCase="true"
                words="stopwords.txt"
                enablePositionIncrements="true"
                />
        <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.LowerCaseFilterFactory"/>
      </analyzer>
    </fieldType>


-- 
View this message in context: http://lucene.472066.n3.nabble.com/Searching-with-Number-fields-tp1737513p1737513.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Searching with Number fields

Posted by Erick Erickson <er...@gmail.com>.
I don't see anything obvious. Try going to the admin page and click the
"analysis" link. That'll let you see pretty much exactly how things get
parsed both for indexing and querying.

Unless your synonyms are somehow getting in the way, but I don't
see how.

Best
Erick

On Wed, Oct 20, 2010 at 5:15 AM, Hasnain <ha...@hotmail.com> wrote:

>
> Hi,
>
>   Im having trouble with searching with number fields, if this field has
> alphanumerics then search is working perfect but not with all numbers, can
> anyone suggest me  solution???
>
> <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
>      <analyzer type="index">
>        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>        <filter class="solr.SynonymFilterFactory"
> synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
>
>
>        <filter class="solr.StopFilterFactory"
>                ignoreCase="true"
>                words="stopwords.txt"
>                enablePositionIncrements="true"
>                />
>        <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.LowerCaseFilterFactory"/>
>      </analyzer>
>    </fieldType>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Searching-with-Number-fields-tp1737513p1737513.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>