Is it possible to make search among results of previous search?
For example: I made search:
Searcher searcher =...
Query query = ...
Hits hits =
hits = Searcher.search(query);
After it I want to not make a new search, I want to make search among found
results
2006/3/7, Anton Potehin <[EMAIL PROTECTED]>:
>
> Is it possible to make search among results of previous search?
>
>
>
>
>
> For example: I made search:
>
>
>
> Searcher searcher =...
>
>
>
> Query query = ...
>
>
>
> Hits hits =
>
>
>
> hits = Searcher.search(query);
>
>
>
>
>
>
>
> After it
);
-Original Message-
From: hu andy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 07, 2006 12:40 PM
To: java-user@lucene.apache.org
Subject: Re: sub search
Importance: High
2006/3/7, Anton Potehin <[EMAIL PROTECTED]>:
>
> Is it possible to make search among results of previous s
EMAIL PROTECTED]
> Sent: Tuesday, March 07, 2006 12:40 PM
> To: java-user@lucene.apache.org
> Subject: Re: sub search
> Importance: High
>
> 2006/3/7, Anton Potehin <[EMAIL PROTECTED]>:
> >
> > Is it possible to make search among results of previous search?
>
,true,false);
hits = Searcher.search(bq,queryFilter);
-Original Message-
From: hu andy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 07, 2006 12:40 PM
To: java-user@lucene.apache.org
Subject: Re: sub search
Importance: High
2006/3/7, Anton Potehin <[EMAIL PROTECTED]>:
Is it possib
Anton Potehin wrote:
After it I want to not make a new search,
> I want to make search among found results...
Perhaps something like this would work:
final BitSet results = toBitSet(Hits);
searcher.search(newQuery, new Filter() {
public BitSet bits(IndexReader reader) {
return results;
Anton Potehin wrote:
Is it possible to make search among results of previous search?
After it I want to not make a new search, I want to make search among
found results...
Simple. Create a new BooleanQuery and put the original query into it,
along with the new query.
Daniel
--
Daniel