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.
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.