FAQ
Hi,

I am new to Lucene, so asking some basic question.

Is there any example/reference implementation available of Lucene Usage
using BooleanQuery using API instead of QueryParser?







Cheers

Aamir Yaseen





This e-mail is confidential and should not be used by anyone who is not the original intended recipient. Global DataPoint Limited does not accept liability for any statements made which are clearly the sender's own and not expressly made on behalf of Global DataPoint Limited. No contracts may be concluded on behalf of Global DataPoint Limited by means of e-mail communication. Global DataPoint Limited Registered in England and Wales with registered number 3739752 Registered Office Middlesex House, 34-42 Cleveland Street, London W1T 4LB

Search Discussions

  • Aamir Yaseen at Jun 3, 2008 at 9:23 am
    Hi all,
    Sorry for bothering again,

    I am referring Lucene Documentation at
    http://lucene.apache.org/java/docs/queryparsersyntax.html
    that suggests
    If you are programmatically generating a query string and then
    parsing it with the query parser then you >>should seriously consider
    building your queries directly with the query API. In other words, the
    query parser >>is designed for human-entered text, not for
    program-generated text.

    Is there any sample implementation of Lucene Implementation of
    BooleanQuery using API instead of QueryParser?



    Cheers
    Aamir Yaseen



    -----Original Message-----
    From: Aamir.Yaseen@globaldatapoint.com

    Sent: 02 June 2008 04:33 PM
    To: java-user@lucene.apache.org
    Subject: BooleanQuery Example

    Hi,

    I am new to Lucene, so asking some basic question.

    Is there any example/reference implementation available of Lucene Usage
    using BooleanQuery using API instead of QueryParser?







    Cheers

    Aamir Yaseen





    This e-mail is confidential and should not be used by anyone who is not
    the original intended recipient. Global DataPoint Limited does not
    accept liability for any statements made which are clearly the sender's
    own and not expressly made on behalf of Global DataPoint Limited. No
    contracts may be concluded on behalf of Global DataPoint Limited by
    means of e-mail communication. Global DataPoint Limited Registered in
    England and Wales with registered number 3739752 Registered Office
    Middlesex House, 34-42 Cleveland Street, London W1T 4LB


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Ian Lea at Jun 3, 2008 at 10:04 am
    Hi


    It's pretty straightforward. Create a BooleanQuery and add other
    queries to it e.g.

    BooleanQuery bq = new BooleanQuery();
    TermQuery tq = new TermQuery(new Term(k, v));
    RangeQuery rq = new RangeQuery(new Term(k1, v0),
    new Term(k1, v1),
    true);
    ...
    bq.add(tq, BooleanClause.Occur.MUST);
    bq.add(rq, BooleanClause.Occur.SHOULD);
    ...
    searcher.search(bq, ...);


    You can probably find other examples via Google or in the lucene unit
    tests, or best of all, Lucene In Action section 3.4.


    --
    Ian.

    On Tue, Jun 3, 2008 at 10:23 AM, wrote:
    Hi all,
    Sorry for bothering again,

    I am referring Lucene Documentation at
    http://lucene.apache.org/java/docs/queryparsersyntax.html
    that suggests
    If you are programmatically generating a query string and then
    parsing it with the query parser then you >>should seriously consider
    building your queries directly with the query API. In other words, the
    query parser >>is designed for human-entered text, not for
    program-generated text.

    Is there any sample implementation of Lucene Implementation of
    BooleanQuery using API instead of QueryParser?



    Cheers
    Aamir Yaseen



    -----Original Message-----
    From: Aamir.Yaseen@globaldatapoint.com

    Sent: 02 June 2008 04:33 PM
    To: java-user@lucene.apache.org
    Subject: BooleanQuery Example

    Hi,

    I am new to Lucene, so asking some basic question.

    Is there any example/reference implementation available of Lucene Usage
    using BooleanQuery using API instead of QueryParser?







    Cheers

    Aamir Yaseen
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedJun 2, '08 at 3:34p
activeJun 3, '08 at 10:04a
posts3
users2
websitelucene.apache.org

2 users in discussion

Aamir Yaseen: 2 posts Ian Lea: 1 post

People

Translate

site design / logo © 2022 Grokbase