Reputation: 550
I set description as field in solr.. Now i want to get description by searching a single word
in it.. How is it possible using php solr?
Please specify solr query for search..
someone plz help me?
Upvotes: 0
Views: 424
Reputation: 3025
If you are trying to use a word in paragraph you could do this:-
<fieldType name="text" class="solr.TextField" >
<analyzer type="index">
<tokenizer class="solr.NGramTokenizerFactory" minGramSize="3" maxGramSize="15" />
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory" />
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
It will be more flexible if you can index your data with the NGramTokenizerFactory to do complete front and back wildcard searches. If you just want to search for substrings at the beginning or end of the string, consider using the EdgeNGramTokenizerFactory.
Upvotes: 1