Ken Krugler wrote:
Hello all,
I want to realize a drill-down Function aka "narrow search" aka "refine
search".
I want to have something like:
Refine by Date:
* 1990-2000 (30 Docs)
* 2001-2003 (200 Docs)
* 2004-2006 (10 Docs)
But not only DateRanges but also for other Categories.
What I have found in the List-Archives so far is that I have to use
Filters for my search.
Does anybody knows where to find some Source Code, to get an Idea how to
implement this?
One example (I think) is:
http://www.krugle.com/files/cvs/savannah.nongnu.org/sdx/sdx_v2/src/java/fr/gouv/culture/sdx/search/lucene/query/DateIntervalQuery.java
-- Ken
from the lucene wiki:
Can Lucene do a "search within search", so that the second search is
constrained by the results of the first query?
Yes. There are two primary options:
*
Use QueryFilter with the previous query as the filter. (you can
search the mailing list archives for QueryFilter and Doug Cutting's
recommendations against using it for this purpose)
*
Combine the previous query with the current query using
BooleanQuery, using the previous query as required.
The BooleanQuery approach is the recommended one.
unquote:
seems to me that simply adding your drilled down query part to the
previous query with a BooleanQuery should do the trick.
- mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]