lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <markrmil...@gmail.com>
Subject Re: Where to find drill-down examples (source code)
Date Fri, 21 Jul 2006 19:04:59 GMT
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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message