Hi, One possible solution would be to create a second field (e.g., text_general) that uses DefaultTokenizer, or other tokenizer that breaks the string into tokens, and use a copyField to copy the content from text_exact to text_general. Then, you can use edismax parser to search both fields, but giving text_exact a higher boost (qf=text_exact^5 text_general). In this case, both fields should be indexed, but only one needs to be stored.
Edward On Wed, Jan 22, 2020 at 10:34 AM Dhanesh Radhakrishnan <dhan...@hifx.co.in> wrote: > Hello, > I'm facing an issue with stemming. > My search query is "restaurant dubai" and returns results. > If I search "restaurants dubai" it returns no data. > > How to stem this keyword "restaurant dubai" with "restaurants dubai" ? > > I'm using a text exact field for search. > > <field name="business_locality" type="text_exact" required="true" > multiValued="true" omitNorms="false" omitTermFreqAndPositions="false"/> > > Here is the field definition > > <fieldType name="text_exact" class="solr.TextField" > positionIncrementGap="100"> > <analyzer type="index"> > <tokenizer class="solr.KeywordTokenizerFactory" /> > <filter class="solr.LowerCaseFilterFactory" /> > <filter class="solr.TrimFilterFactory" /> > <filter class="solr.PorterStemFilterFactory"/> > </analyzer> > <analyzer type="query"> > <tokenizer class="solr.KeywordTokenizerFactory" /> > <filter class="solr.LowerCaseFilterFactory" /> > <filter class="solr.TrimFilterFactory" /> > <filter class="solr.PorterStemFilterFactory"/> > </analyzer> > </fieldType> > > Is there any solutions without changing the tokenizer class. > > > > > Dhanesh S.R > > -- > IMPORTANT: This is an e-mail from HiFX IT Media Services Pvt. Ltd. Its > content are confidential to the intended recipient. If you are not the > intended recipient, be advised that you have received this e-mail in error > and that any use, dissemination, forwarding, printing or copying of this > e-mail is strictly prohibited. It may not be disclosed to or used by > anyone > other than its intended recipient, nor may it be copied in any way. If > received in error, please email a reply to the sender, then delete it from > your system. > > Although this e-mail has been scanned for viruses, HiFX > cannot ultimately accept any responsibility for viruses and it is your > responsibility to scan attachments (if any). > > ​Before you print this email > or attachments, please consider the negative environmental impacts > associated with printing. >