Look for MultiFieldQueryParser. I believe that is the name of the
class. You should be able to find it in the online Javadocs.
Otis
--- Sebastien X <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've an index : each document is indexed with 2 fields named
> "content" and "title".
>
> To make my search, I use this code :
> QueryParser qp = new QueryParser("content", analyzer);
>
> My interrogation is :
> if I use the QueryParser("content", analyzer) and I make a search
> like this in my query " title : mysearch", is the exact same thing
> than if I use the QueryParser("title", analyzer) and I make the
> search " mysearch" ?
> I suppose that yes, but someone could confirm that?
> Is there a methode to make my search automatically with the 2 fields?
> for the moment, I use this code :
> QueryParser qp = new QueryParser("content", analyzer);
> qp.setOperator(QueryParser.DEFAULT_OPERATOR_AND);
> query = qp.parse("("+queryString+") OR
> title:("+queryString+")");
> Is it the good way?
>
>
> Thanks in advance
>
>
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]