Search doesn't return document via query
----------------------------------------

                 Key: LUCENE-2861
                 URL: https://issues.apache.org/jira/browse/LUCENE-2861
             Project: Lucene - Java
          Issue Type: Bug
          Components: Search
    Affects Versions: 3.0.3, 2.9.4, 2.9.1
         Environment: Doesn't depend on enviroment
            Reporter: Zenoviy Veres


The query doesn't return document that contain all words from query in correct 
order.

The issue might be within mechanism how do SpanQuerys actually match results 
(http://www.lucidimagination.com/blog/2009/07/18/the-spanquery/)

Please refer for details below. The example text wasn't passed through snowball 
analyzer, however the issue exists after analyzing too

Query:
(intend within 3 of message) within 5 of message within 3 of addressed.  

Text within document:
The contents of this e-mail message and
any attachments are intended solely for the
addressee(s) and may contain confidential
and/or legally privileged information. If you
are not the intended recipient of this message
or if this message has been addressed to you
in error, please immediately alert the sender
 by reply e-mail and then delete this message
and any attachments

Result query:

        SpanNearQuery spanNear = new SpanNearQuery(new SpanQuery[] {
                new SpanTermQuery(new Term(BODY, "intended")),
                new SpanTermQuery(new Term(BODY, "message"))},
                4,
                false);
        SpanNearQuery spanNear2 = new SpanNearQuery(new SpanQuery[] {spanNear, 
new SpanTermQuery(new Term(BODY, "message"))}, 5, false);
        SpanNearQuery spanNear3 = new SpanNearQuery(new SpanQuery[] {spanNear2, 
new SpanTermQuery(new Term(BODY, "addressed"))}, 3, false);


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to