lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Willnauer" <simon.willna...@googlemail.com>
Subject Re: Where to find drill-down examples (source code)
Date Tue, 26 Sep 2006 18:19:52 GMT
Either you grap the next best svn client and check out the branch of
2.0 or you just download
the source dist from a mirror..... use this one
http://mirrorspace.org/apache/lucene/java/

best regards simon

On 9/26/06, djd0383 <ddigmann@formos.com> wrote:
>
> I there a link to a zip file where I can get the entire package of source
> files (version 2, please).  I know I am able to view them in the Source
> Repository (http://svn.apache.org/viewvc/lucene/java/trunk/), but I do not
> really feel like going through each of those to download them all.  I am
> looking for a one stop shop here.
>
>
>
> Miles Barr-3 wrote:
> >
> > Martin Braun wrote:
> >
> >>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?
> >> I think that's a useful property for a search engine, so are there any
> >>contributions for Lucene for that?
> >>
> >
> > If you want to do a refined search I'd put the original query in a
> > QueryFilter, which filters on the new search.
> >
> > http://lucene.apache.org/java/docs/api/org/apache/lucene/search/QueryFilter.html
> >
> > e.g.
> >
> > Query original = // saved from the last time the search was executed
> > QueryFilter filter = new QueryFilter(original);
> >
> > QueryParser parser = ...
> > Searcher searcher = ...
> >
> > String userQuery;
> > Query query = parser.parse(userQuery);
> >
> > Hits hits = searcher.search(query, filter);
> >
> >
> > Fill in the blanks with however you normally get your QueryParser and
> > IndexSearcher. You could store the old query on the session, or
> > somewhere else.
> >
> > Then the QueryFilter will ensure you're doing a refinement, but won't
> > affect the scoring in the new search.
> >
> >
> > Alternatively, since you appear to only want to refine on dates and
> > categories, you might want to put them in filters so they don't affect
> > the score, and leave the query as is. In which case you can use a
> > RangeQuery for the dates, and a wrap a TermQuery in a QueryFilter to
> > handle the categories.
> >
> > If you need multiple filters you can use the ChainedFilter class.
> >
> >
> >
> >
> > Miles
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Where-to-find-drill-down-examples-%28source-code%29-tf1980330.html#a6512411
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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