Sorting by NumericField not working

2011-03-25 Thread Azhar Jassal
Hi, I'm trying to sort results by a NumericField but the results do not sort (still appear in default score order). The NumericField was indexed using the code below: NumericField field = new NumericField(name, NumericUtils.PRECISION_STEP_DEFAULT, Field.Store.YES, false); field.setIntValue(value)

Sort results by number of document fields

2011-01-31 Thread Azhar Jassal
Hi, How can I use Lucene to sort search results by the number of fields each document has? (highest to lowest - documents with more fields in my index are better results) Also my fields are named as URI's i.e. "< http://www.w3.org/2000/01/rdf-schema#label>", how should I form queries with field n