You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Pradeep Kumar K <pr...@robosoftin.com> on 2002/06/30 16:18:19 UTC
Multiple queries
Hi
How can I create a searcher which searcher for multiplequeries.
Example
assume that I store indexes in ramdirectory named 'rdir'
let my first query query1 = "name:pradeep";
second query query2 = "age:22";
Hits hits= indSe.search(the_quer);
I know the following will return no of hits for the query query1
Hits hits = indSe.search(query1);
But how can I get hits for a compination of queries query1 AND query2.
TIA
Pradeep
--------------------------------------------------------------
Robosoft Technologies, Mangalore, India
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Multiple queries
Posted by Keith Gunn <kg...@csd.abdn.ac.uk>.
On Sun, 30 Jun 2002, Pradeep Kumar K wrote:
Can't you just make one query which does "name:pradeep age:22"
> Hi
>
> How can I create a searcher which searcher for multiplequeries.
>
> Example
> assume that I store indexes in ramdirectory named 'rdir'
>
> let my first query query1 = "name:pradeep";
> second query query2 = "age:22";
> Hits hits= indSe.search(the_quer);
>
> I know the following will return no of hits for the query query1
> Hits hits = indSe.search(query1);
>
> But how can I get hits for a compination of queries query1 AND query2.
>
> TIA
> Pradeep
>
>
> --------------------------------------------------------------
> Robosoft Technologies, Mangalore, India
>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Multiple queries
Posted by Otis Gospodnetic <ot...@yahoo.com>.
Use can use BooleanQuery for this (check the Javadoc on the site for
method names), or if it's easier for you try using QueryParser.
Otis
--- Pradeep Kumar K <pr...@robosoftin.com> wrote:
> Hi
>
> How can I create a searcher which searcher for multiplequeries.
>
> Example
> assume that I store indexes in ramdirectory named 'rdir'
>
> let my first query query1 = "name:pradeep";
> second query query2 = "age:22";
> Hits hits= indSe.search(the_quer);
>
> I know the following will return no of hits for the query
> query1
> Hits hits = indSe.search(query1);
>
> But how can I get hits for a compination of queries query1 AND
> query2.
>
> TIA
> Pradeep
>
>
> --------------------------------------------------------------
> Robosoft Technologies, Mangalore, India
>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>