Edismax sorting help

2011-06-09 Thread Denis Kuzmenok
Hi, everyone.

I have fields:
text fields: name, title, text
boolean field: isflag (true / false)
int field: popularity (0 to 9)

Now i do query:
defType=edismax
start=0
rows=20
fl=id,name
q=lg optimus
fq=
qf=name^3 title text^0.3
sort=score desc
pf=name
bf=isflag sqrt(popularity)
mm=100%
debugQuery=on


If i do query like Samsung i want to see prior most relevant results
with  isflag:true and bigger popularity, but if i do query like Nokia
6500  and  there is isflag:false, then it should be higher because of
exact  match.  Tried different combinations, but didn't found one that
suites   me.   Just   got   isflag/popularity   sorting   working   or
isflag/relevancy sorting.



Re: Edismax sorting help

2011-06-09 Thread Yonik Seeley
2011/6/9 Denis Kuzmenok forward...@ukr.net:
 Hi, everyone.

 I have fields:
 text fields: name, title, text
 boolean field: isflag (true / false)
 int field: popularity (0 to 9)

 Now i do query:
 defType=edismax
 start=0
 rows=20
 fl=id,name
 q=lg optimus
 fq=
 qf=name^3 title text^0.3
 sort=score desc
 pf=name
 bf=isflag sqrt(popularity)
 mm=100%
 debugQuery=on


 If i do query like Samsung i want to see prior most relevant results
 with  isflag:true and bigger popularity, but if i do query like Nokia
 6500  and  there is isflag:false, then it should be higher because of
 exact  match.  Tried different combinations, but didn't found one that
 suites   me.   Just   got   isflag/popularity   sorting   working   or
 isflag/relevancy sorting.

Multiplicative boosts tend to be more stable...

Perhaps try replacing
  bf=isflag sqrt(popularity)
with
  bq=isflag:true^10  // vary the boost to change how much
isflag counts vs the relevancy score of the main query
  boost=sqrt(popularity)  // this will multiply the result by
sqrt(popularity)... assumes that every document has a non-zero
popularity

You could get more creative in trunk where booleans have better
support in function queries.

-Yonik
http://www.lucidimagination.com


Re: Edismax sorting help

2011-06-09 Thread Denis Kuzmenok
Your  solution  seems  to work fine, not perfect, but much better then
mine :)
Thanks!

 If i do query like Samsung i want to see prior most relevant results
 with  isflag:true and bigger popularity, but if i do query like Nokia
 6500  and  there is isflag:false, then it should be higher because of
 exact  match.  Tried different combinations, but didn't found one that
 suites   me.   Just   got   isflag/popularity   sorting   working   or
 isflag/relevancy sorting.

 Multiplicative boosts tend to be more stable...

 Perhaps try replacing
   bf=isflag sqrt(popularity)
 with
   bq=isflag:true^10  // vary the boost to change how much
 isflag counts vs the relevancy score of the main query
   boost=sqrt(popularity)  // this will multiply the result by
 sqrt(popularity)... assumes that every document has a non-zero
 popularity

 You could get more creative in trunk where booleans have better
 support in function queries.

 -Yonik
 http://www.lucidimagination.com