Hi All

I am writing a custom QueryParserPlugin for solr to fulfill a
specific requirement. Now when I Build query object, I need to feed that
object with terms, for that I get analyzer from the request as

Analyzer analyzer =
req.getSchema().getField("TextField").getType().getAnalyzer()

now in schema TextField has type "text" that is configured as

<fieldtype name="text" class="solr.TextField">

<analyzer>

<tokenizer class="solr.StandardTokenizerFactory"
luceneMatchVersion="LUCENE_29"/>

<filter class="solr.StandardFilterFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>

</analyzer>

</fieldtype>

now when i get TokenStream

TolenStream ts=analyzer.tokenStream("TextField",new StringReader("ri*"));

it simply removes wild cards from the term, analyzer has the
same behavior even if I escape wild card as

TolenStream ts=analyzer.tokenStream("TextField",new StringReader("ri\\*"));

Please suggest

Regards
Ahsan Iqbal

Reply via email to