-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi everybody,


On 05/10/2006 05:44 Ravi Chintakunta wrote:

public Hits search(String queryString, int numHits,
                    String dedupField, String sortField, boolean
reverse)  throws IOException {

   org.apache.lucene.queryParser.QueryParser parser = new
org.apache.lucene.queryParser.QueryParser("content", new
org.apache.lucene.analysis.standard.StandardAnalyzer());

org.apache.lucene.search.Query luceneQuery = parser.parse (queryString);

  return translateHits
     (optimizer.optimize(luceneQuery, luceneSearcher, numHits,
                         sortField, reverse),
      dedupField, sortField);
 }

This seems to be a good approach. I have not yet tried it out in detail, however, the method optimize() in LuceneQueryOptimizer does only take BooleanQuery as an argument, so the line 'return translateHits...' would cause a compile error, wouldn't it?


- --
Best regards,
Björn Wilmsmann


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFFJV9Fgz0R1bg11MERAt3sAJ4pKJ8voEhWSo+94SI6bam4iVPYgACbBQmm
sFAZIcCv3CoIBJC5g8FbOyo=
=vzdw
-----END PGP SIGNATURE-----

Reply via email to