I still dont get this, How would i do this, so i can try it out ..
is searcher.search(query, new Sort(SortField.DOC)) ..correct this would return stuff in the order of the documents, so how would i reverse this, i mean the later documents appearing fisrt .. searcher.search(query, new Sort(????) How do you get document number descending .. ?? for the sort that is On 8/21/06, Yonik Seeley <[EMAIL PROTECTED]> wrote:
On 8/21/06, M A <[EMAIL PROTECTED]> wrote: > Yeah I tried looking this up, > > If i wanted to do it by document id (highest docs first) , does this mean > doing something like > > hits = searcher.search(query, new Sort(new SortFeild(DOC, true); // or > something like that, > > is this way of sorting any different performance wise to what i was doing > before .. Definitely a lot faster if you don't warm up and re-use your searchers. Sorting by docid doesn't require the FieldCache, so you don't get the first-search penalty. -Yonik http://incubator.apache.org/solr Solr, the open-source Lucene search server --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]