I have some docs with two fields: text, count.
I\'ve used Lucene to index docs and now I want to search in text and get the result sorted by count in de
Lucene
first:
Fieldable count = new NumericField("count", Store.YES, true);
second:
SortField field = new SortField("count", SortField.INT); Sort sort = new Sort(field);
third:
TopFieldDocs docs = searcher.search(query, 20, sort); ScoreDoc[] sds = docs.scoreDocs;
Like this is OK !