Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sorting Lucene docs in Luke

I want to fire up a query in luke for luncene indexed document. I want to sort the results before they are fetched. What is the lucene syntax to sort the data. I don't need java/or-language-specific code to sort; instead raw lucene syntax to sort the data?

Can anyone give me a sample example for sorting by 2 fields in descending order?

Cheers

like image 342
Priyank Avatar asked Jan 07 '10 06:01

Priyank


1 Answers

Lucene queries don't have a sort syntax. You have to use the Sort object in your implementation of lucene if you need to sort

like image 60
Midhat Avatar answered Oct 07 '22 21:10

Midhat