lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Tschumy <>
Subject Where's the search(Query query, Sort sort) method of Searcher
Date Thu, 08 Jul 2004 22:32:28 GMT
I'm trying to do a search and sort the results using a Sort object.  
The 1.4-final API says that Searcher has the following method.

Hits search(Query query,  Sort sort)

However, when I try to use it in the code below:

         IndexSearcher is = new IndexSearcher(fsDir);
         Query query = QueryParser.parse("Nuggets", "creator", new 
         Hits hits =, new Sort("created"));

I get the following compile error:

     [javac] Compiling 18 source files to /Users/bill/Nuggets/classes
cannot resolve symbol
     [javac] symbol  : method search 
     [javac] location: class
     [javac]             hits =, new Sort("created"));
     [javac]                      ^

If I do the same call without the Sort object it compiles just fine.

This seems to be indicating the search(Query, Sort) method is not in 
the jar file.  Either the API is in error (doubtful) or I'm doing 
something really stupid (likely).  Can someone explain which it is?
Bill Tschumy
Otherwise -- Austin, TX

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message