lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Densel Santhmayor <dens...@gmail.com>
Subject Error using DuplicateFilter in contrib/queries
Date Tue, 17 Mar 2009 16:52:37 GMT
Hello

I was trying to use the DuplicateFilter api in contrib/queries for Lucene in
an
application but it doesn't seem to be accepted as a valid argument to the
searcher.search function. I'm using Apache Lucene 2.4.0.

Here's what I did.

DuplicateFilter df=new DuplicateFilter("NAME");
df.setKeepMode(DuplicateFilter.KM_USE_FIRST_OCCURRENCE);
return indexSearcher.search(query, df);

Pretty simple implementation, right? But I keep getting this error:

SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.VerifyError: (class: search/SearchManager, method:
performSearch signature:
([Ljava/lang/String;II)Lorg/apache/lucene/search/TopDocs;) Incompatible
argument to function

performSearch is my api where I call the above code. If I change the line to

return indexSearcher.search(query, (Filter)null);

then this error doesn't come up anymore.

Could this be a class version issue? ie. the DuplicateFilter class may be in
a
Jar from a Lucene 2.3 version where the Filter base class was defined with
different methods?

Does anyone know of a DuplicateFilter class for version 2.4? Has the Filter
base class
been defined with different methods and that's why this doesn't work? Where
can I get
the latest version of DuplicateFilter?

Thanks for your time and replies
DM

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message