hmm you can try creating Sort sort = null; SortField[] sortFields = new SortField[1]; sortFields[0] = new SortField(FIELD_TO_SEARCH, LOCALE,true**); sort = new Sort(sortFields);
** org.apache.lucene.search.SortField<eclipse-javadoc:%E2%98%82=SearchIndexWeb/%5C/var%5C/www%5C/SearchIndexWeb%5C/WebContent%5C/WEB-INF%5C/lib%5C/lucene-core-3.0.2.jar%3Corg.apache.lucene.search%28SortField.class%E2%98%83SortField> .SortField(String<eclipse-javadoc:%E2%98%82=SearchIndexWeb/%5C/var%5C/www%5C/SearchIndexWeb%5C/WebContent%5C/WEB-INF%5C/lib%5C/lucene-core-3.0.2.jar%3Corg.apache.lucene.search%28SortField.class%E2%98%83SortField%7ESortField%7ELjava.lang.String;%7ELjava.util.Locale;%7EZ%E2%98%82String>field, Locale<eclipse-javadoc:%E2%98%82=SearchIndexWeb/%5C/var%5C/www%5C/SearchIndexWeb%5C/WebContent%5C/WEB-INF%5C/lib%5C/lucene-core-3.0.2.jar%3Corg.apache.lucene.search%28SortField.class%E2%98%83SortField%7ESortField%7ELjava.lang.String;%7ELjava.util.Locale;%7EZ%E2%98%82Locale>locale, boolean reverse) if you set last variable true it will walk reverse order. then give it to Searcher object as a sort parameter Searcher searcher = null; TopFieldDocs topFieldDocs = searcher.search(query, AMOUNT_YOU_WANT, sort); 2010/8/23 Ryan McKinley <ryan...@gmail.com> > Is there anyway to walk the terms in reverse order? > > I have a query that need to find the last matching term -- if it could > start checking from the end, it would avoid a lot of work. > > Thanks > Ryan > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > > -- Erdinc Akkaya Web Developer @ CE / Positive www.positive.com.tr