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 Ashish P <as...@gmail.com> on 2009/03/19 07:51:37 UTC
Field tokenizer question
I have created a field,
<fieldtype name="conditionText" class="solr.StrField" >
<analyzer>
<tokenizer class="solr.PatternTokenizerFactory" pattern="_" />
</analyzer>
</fieldtype>
The pattern is "_" (Underscore)
When I do field analysis using solr admin, it shows it correctly. Have a
look at attached image. e.g. cric_info
http://www.nabble.com/file/p22594575/field%2Banalysis.jpeg
But when I search the field, like searchbam:cric, it returns zero results.
I am expecting that I should be able to search on cric and info both
individually.
But the response is :
<response>
- <lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">47</int>
- <lst name="params">
<str name="indent">on</str>
<str name="start">0</str>
<str name="q">searchbam:cric</str>
<str name="rows">10</str>
<str name="version">2.2</str>
</lst>
</lst>
<result name="response" numFound="0" start="0" />
</response>
The index is properly committed.
Am I missing something here?????
--
View this message in context: http://www.nabble.com/Field-tokenizer-question-tp22594575p22594575.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Field tokenizer question
Posted by Chris Hostetter <ho...@fucit.org>.
: as far as I know solr.StrField is not analized but it is indexed as is
: (verbatim).
correct ... but there is definitely a bug here if the analysis.jsp
is implying that an analyzer is being used...
https://issues.apache.org/jira/browse/SOLR-1086
-Hoss
Re: Field tokenizer question
Posted by Giovanni De Stefano <gi...@gmail.com>.
Hello Ashish,
as far as I know solr.StrField is not analized but it is indexed as is
(verbatim).
Cheers,
Giovanni
On 3/23/09, Ashish P <as...@gmail.com> wrote:
>
>
> Hey it works. Can you please tell me the reason??
> Thanks,
> Ashish
>
> Koji Sekiguchi-2 wrote:
> >
> > Ashish P wrote:
> >> I have created a field,
> >> <fieldtype name="conditionText" class="solr.StrField" >
> >> <analyzer>
> >> <tokenizer class="solr.PatternTokenizerFactory" pattern="_"
> />
> >> </analyzer>
> >> </fieldtype>
> >>
> >>
> > Set class="solr.TextField" instead of class="solr.StrField" in your
> > fieldType definition.
> > Then reindex and commit.
> >
> > Koji
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Field-tokenizer-question-tp22594575p22653356.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>
Re: Field tokenizer question
Posted by Ashish P <as...@gmail.com>.
Hey it works. Can you please tell me the reason??
Thanks,
Ashish
Koji Sekiguchi-2 wrote:
>
> Ashish P wrote:
>> I have created a field,
>> <fieldtype name="conditionText" class="solr.StrField" >
>> <analyzer>
>> <tokenizer class="solr.PatternTokenizerFactory" pattern="_" />
>> </analyzer>
>> </fieldtype>
>>
>>
> Set class="solr.TextField" instead of class="solr.StrField" in your
> fieldType definition.
> Then reindex and commit.
>
> Koji
>
>
>
--
View this message in context: http://www.nabble.com/Field-tokenizer-question-tp22594575p22653356.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Field tokenizer question
Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
Ashish P wrote:
> I have created a field,
> <fieldtype name="conditionText" class="solr.StrField" >
> <analyzer>
> <tokenizer class="solr.PatternTokenizerFactory" pattern="_" />
> </analyzer>
> </fieldtype>
>
>
Set class="solr.TextField" instead of class="solr.StrField" in your
fieldType definition.
Then reindex and commit.
Koji