Using QueryFilter

K

keith_rhodes

I'm having trouble with filtered queries.

I have a working system, indexed a set of files that are searchable
through an HTML for I built and a jsp I based on the demo.

I've been trying to adapt the code from
http://wimpi.coalevo.net/2007/03/using-lucene-filteredquery.html to
build a filtered query.

I recover the value of the filter string from my HTML form OK.

But when I try this:
QueryFilter qf = new QueryFilter(filterString);

I get a curious error:
An error occurred at line: 124 in the jsp file: /results.jsp
The constructor QueryFilter(String) is undefined

Looking at the documentation, I thought this constructor was in
org.apache.lucene.search
http://lucene.apache.org/java/2_1_0/api/org/apache/lucene/search/package-summary.html

There is it, part way down the page, a link to:
http://lucene.apache.org/java/2_1_0/api/org/apache/lucene/search/QueryFilter.html

So what's going wrong? I imported that package right at the beginning
of the jsp, and other constructors are available (e.g. Hits and
Query)... but no QueryFilter.

Keith.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top