Document sort by relevance and others

26 views
Skip to first unread message

mschipperheyn

unread,
Apr 26, 2013, 10:39:49 AM4/26/13
to bobo-...@googlegroups.com
Hi,

I'm trying to combine field sorting with relevance sorting.
Kind of like the Lucene:

new Sort(new SortField[] {
SortField.FIELD_SCORE,
new SortField("field_1", SortField.STRING),
new SortField("field_2", SortField.STRING) });

However, I'm not clear how to do this as the BrowseRequest just exposes an addSortField method.

Kind regards,
Marc

John Wang

unread,
Apr 26, 2013, 1:26:01 PM4/26/13
to bobo-browse
you can call addSortField multiple times to add more than 1 sortfield. I believe there is also a setSortFields call where you can pass in an array.

-John


--
You received this message because you are subscribed to the Google Groups "bobo-browse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bobo-browse...@googlegroups.com.
To post to this group, send email to bobo-...@googlegroups.com.
Visit this group at http://groups.google.com/group/bobo-browse?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

mschipperheyn

unread,
Apr 29, 2013, 4:20:05 PM4/29/13
to bobo-...@googlegroups.com
Thanks, but my point was more how to add SortField.FIELD_SCORE

Kind regards,
Marc
Reply all
Reply to author
Forward
0 new messages