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 Sundar Sankaranarayanan <Su...@phoenix.edu> on 2008/05/02 23:41:14 UTC
Question on WhitespaceTokenizerFactory concatenateAll
Hi,
I have a requirement that one of the fields that I had indexed as a
Text Field earlier should now return me results when searched with blank
spaces in between the word. I had tried to use the example in
wiki(http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#head-83
c527b144cd9f71c341e7c4a061daee382bca40) to do so. I changed my schema to
this.
<fieldtype name="subword" class="solr.TextField">
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1"
generateNumberParts="1"
catenateWords="1"
catenateNumbers="1"
catenateAll="1"
/>
</analyzer>
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1"
generateNumberParts="1"
catenateWords="1"
catenateNumbers="1"
catenateAll="1"
/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.StopFilterFactory"/>
<filter class="solr.EnglishPorterFilterFactory"/>
</analyzer>
</fieldtype>
<field name="XXXX" type="subword" indexed="true" store="true"
omitNorms="false"/>
How ever, I still am not getting back any results when the searched word
has space in between them. I have not re indexed the data after the
change in schema.xml.
Is there a way that I still get back results without having to re-index
them.
Warm Regards,
Sundar Sankarnarayanan
Software Engineer
@University of Phoenix
Re: Question on WhitespaceTokenizerFactory concatenateAll
Posted by Chris Hostetter <ho...@fucit.org>.
: I have a requirement that one of the fields that I had indexed as a
: Text Field earlier should now return me results when searched with blank
: spaces in between the word. I had tried to use the example in
You're still using "Text Field" ... what was the analyzer you were using
before?
: How ever, I still am not getting back any results when the searched word
: has space in between them. I have not re indexed the data after the
: change in schema.xml.
that generally won't work .. nothing will magically happen just by
changing the "index" analyzer for fieldType - that only affects newly
indexed documents.
-Hoss