Thanks shawn, I am already using the Boosting but the OR condition works for me as you mentioned.
One question If I used in search field "(TAGs)" , it is returning lot of Fields but if try with the '(" something like "TAGs", it is getting less, why the " ( )" are changing the results.? They won't take the exact match ..? Let me know if I am missing something. Thanks -----Original Message----- From: Shawn Heisey [mailto:s...@elyograg.org] Sent: Monday, July 07, 2014 8:22 PM To: solr-user@lucene.apache.org Subject: Re: Exact Match first in the list. > HI, I HAVE A situation where applying below search rules. > > When I search columns for the full text search. "Product Variant > Name", the exact match has to be in the first list and other match > like , product or variant or name or any combination will be next in the > results. > > Any thoughts, why analyzer or tokenizer or filter need to use. This is more a matter of boosting than analysis. If you are using edismax, this is particularly easy. Just put large boost values on the fields in the pf parameter, and you'd likely want to use the same field list as the qf parameter. If you are not using edismax and can construct such a query yourself, you can boost the phrase over the individual terms. Here's a sample query: "Product Variant Name"^10 OR (Product Variant Name) This is essentially what edismax will do with a boost on the pf values, except that it will work with more than one field. The edismax parser is a wonderful creation. Thanks, Shawn