FAQ
Hi,
As per the Grouping discussion in the URL below:
http://lucene.apache.org/java/3_0_3/queryparsersyntax.html
(jakarta OR apache) AND website query means website must exist and either term jakarta or apache may exist.

If we write query like (jakarta AND apache) OR website what happen?
Is it possible that we can get the document that contains 'jakarta' AND 'apache'. Also document may contain 'website'?
Is it possible that if the document do not contains 'jakarta' AND 'apache', but contains 'website', the search result will give the result for document that contains 'website'?

Another example:

If you search for "(a AND b)" it will return x results
If you search for "c" it will return y results
If you search for "(a and b) or c" the number of results cannot be less than the larger of x or y. But this is not happening. Please help how should I proceed to implement this?

Any help or suggestion will be appreciated!!!
Thanks & Regards,
Ranjit Kumar
=================================================================================================== Private, Confidential and Privileged. This e-mail and any files and attachments transmitted with it are confidential and/or privileged. They are intended solely for the use of the intended recipient. The content of this e-mail and any file or attachment transmitted with it may have been changed or altered without the consent of the author. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, circulation or Transmission of this e-mail and/or any file or attachment transmitted with it, is prohibited and may be unlawful. If you have received this e-mail or any file or attachment transmitted with it in error please notify OTS Solutions at info@otssolutions.com ===================================================================================================

Search Discussions

  • Ranjit Kumar at Jun 3, 2011 at 9:25 am
    Hi,
    As per the Grouping discussion in the URL below:
    http://lucene.apache.org/java/3_0_3/queryparsersyntax.html
    (jakarta OR apache) AND website query means website must exist and either term jakarta or apache may exist.

    If we write query like (jakarta AND apache) OR website what happen?
    Is it possible that we can get the document that contains 'jakarta' AND 'apache'. Also document may contain 'website'?
    Is it possible that if the document do not contains 'jakarta' AND 'apache', but contains 'website', the search result will give the result for document that contains 'website'?

    Another example:

    If you search for "(a AND b)" it will return x results
    If you search for "c" it will return y results
    If you search for "(a and b) or c" the number of results cannot be less than the larger of x or y. But this is not happening. Please help how should I proceed to implement this?

    Any help or suggestion will be appreciated!!!
    Thanks & Regards,
    Ranjit Kumar
    =================================================================================================== Private, Confidential and Privileged. This e-mail and any files and attachments transmitted with it are confidential and/or privileged. They are intended solely for the use of the intended recipient. The content of this e-mail and any file or attachment transmitted with it may have been changed or altered without the consent of the author. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, circulation or Transmission of this e-mail and/or any file or attachment transmitted with it, is prohibited and may be unlawful. If you have received this e-mail or any file or attachment transmitted with it in error please notify OTS Solutions at info@otssolutions.com ===================================================================================================
  • Jayendra Patil at Jun 3, 2011 at 6:04 pm
    The Boolean operators provided basically map to MUST (+), SHOULD (no
    symbol) and NOT (-)

    If we write query like (jakarta AND apache) OR website what happen?
    It will return results with documents having Jakarta & Apache or Website
    Is it possible that we can get the document that contains 'jakarta'
    AND 'apache'. Also document may contain 'website'?
    +jakarta + apache website should do the trick
    Is it possible that if the document do not contains 'jakarta' AND
    'apache', but contains 'website', the search result will give the
    result for document that contains 'website'?
    something like this should work -(+jakarta +apache) +website
    Another example:

    If you search for "(a AND b)" it will return x results
    If you search for "c" it will return y results
    If you search for "(a and b) or c" the number of results cannot be
    less than the larger of x or y. But this is not happening. Please help
    how should I proceed to implement this?
    Should not happen, you may just want to check the query that got executed.
    Regards,
    Jayendra

    On Fri, Jun 3, 2011 at 5:20 AM, Ranjit Kumar
    wrote:
    Hi,
    As per the Grouping discussion in the URL below:
    http://lucene.apache.org/java/3_0_3/queryparsersyntax.html
    (jakarta OR apache) AND website query means website must exist and either term jakarta or apache may exist.

    If we write query like (jakarta AND apache) OR website what happen?
    Is it possible that we can get the document that contains 'jakarta' AND 'apache'. Also document may contain 'website'?
    Is it possible that if the document do not contains 'jakarta' AND 'apache', but contains 'website', the search result will give the result for document that contains 'website'?

    Another example:

    If you search for "(a AND b)" it will return x results
    If you search for "c" it will return y results
    If you search for "(a and b) or c" the number of results cannot be less than the larger of x or y. But this is not happening. Please help how should I proceed to implement this?

    Any help or suggestion will be appreciated!!!
    Thanks & Regards,
    Ranjit Kumar
    =================================================================================================== Private, Confidential and Privileged. This e-mail and any files and attachments transmitted with it are confidential and/or privileged. They are intended solely for the use of the intended recipient. The content of this e-mail and any file or attachment transmitted with it may have been changed or altered without the consent of the author. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, circulation or Transmission of this e-mail and/or any file or attachment transmitted with it, is prohibited and may be unlawful. If you have received this e-mail or any file or attachment transmitted with it in error please notify OTS Solutions at info@otssolutions.com ===================================================================================================
    ---------------------------------------------------------------------
    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 3, '11 at 9:22a
activeJun 3, '11 at 6:04p
posts3
users2
websitelucene.apache.org

2 users in discussion

Ranjit Kumar: 2 posts Jayendra Patil: 1 post

People

Translate

site design / logo © 2022 Grokbase