Hi alex,

     Thanks for you reply....can you please check the following details and
give me suggestions how can i do it, then it will be more helpful to me


i am passing query parameters like 

http://localhost:8080/solr/core/c=cityname&s=iphne+4&s1=iphne~0.5&s2=4~0.5

here "s" is the main string and splitted into s1 and s2 for fuzzy


if a user search for "iphne 4" first it has to check exact match it is not
found then i am splitting string into two strings s1 and s2. i am adding
~0.5 for both s1 and s2.


i need "iphone 4" result first


and i did the configuration in the following way...


<str name="1.q.op">AND</str>
   <str name="1.df">fsw_title</str>
   <str name="1.rows">15</str>
   <str name="1.q">{!edismax v=$s}</str>
   
   <str name="1.fq">city:All OR _query_:"{!field f=city v=$c}"</str>
   <bool name="1.group">true</bool>
   <str name="1.group.field">mpId</str>
   <str name="1.group.limit">3</str>
   <bool name="1.group.main">true</bool>
   
   <str name="1.defType">edismax</str>
   <bool name="1.lowercaseOperators">false</bool>
   <str name="1.qf">tsw_title^15.0 tf_title^10.0 tsw_keywords^1
keywords^0.5</str>
   <str name="1.pf2">fsw_title~1^50.0</str>
   <str name="1.pf3">fsw_title~1^25.0</str>
   <str name="1.bf">sum(product(typeId,100),weightage)</str>
   
<str name="2.q.op">OR</str>
   <str name="2.df">fsw_title</str>
   <str name="2.rows">20</str>
   <str name="2.q">_query_:"{!edismax qf=$qfs1 pf=$pfx pf2=$pf2x v=$s1}" AND
_query_:"{!edismax qf=$qfs2 v=$s2}"</str>
   
   <str name="2.fq">city:All OR _query_:"{!field f=city v=$c}"</str>
   <bool name="2.group">true</bool>
   <str name="2.group.field">mpId</str>
   <str name="2.group.limit">5</str>
   <bool name="2.group.main">true</bool>
   
   <bool name="2.lowercaseOperators">false</bool>
   <str name="2.qfs1">fsw_title^30 tsw_title^20 tf_title^15.0
keywords^1.0</str>
   <str name="2.qfs2">tsw_title^15.0 tf_title^10.0 tsw_keywords^1
keywords^0.5</str>
   <str name="2.pfx">fsw_title~1^100.0</str>
   <str name="2.pf2x">fsw_title~1^50.0</str>
   <str name="2.pf3x">fsw_title~1^25.0</str>
   <str name="2.bf">product(typeId,100)</str>






--
View this message in context: 
http://lucene.472066.n3.nabble.com/SORTING-RESULTS-BASED-ON-RELAVANCY-tp4090789p4090794.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to