You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by Vineeth Jose <vi...@rediffmail.com> on 2008/05/26 07:44:57 UTC

Problem after combining queries

Hi all,
I have to implement searching for the following criteria:

"search all documents with 'status' approved and 'createddate' within the
given range."
       where 'status' and 'createddate'  are two fields.

for this i created a field query for 'status' with occurance 'Must' and a
range query for 'createddate'.
Then i combined that two and searched.

But the search results contains documents which are not approved.[Approved
documents comes first followed by others !!!]

If i remove the range query, results will contain only approved documents.

How to solve this?
-- 
View this message in context: http://www.nabble.com/Problem-after-combining-queries-tp17466089p17466089.html
Sent from the Lucene - General mailing list archive at Nabble.com.


Re: Problem after combining queries

Posted by Chris Hostetter <ho...@fucit.org>.
FYI: your questions sems to be about using the Lucene Java API.  You 
should probably post your question to the java-user@lucene mailing list if 
you have questions about using that API.

Posting actaul code (instead of just a description of what your code is 
suppose to do) can also help people figure out why it's not working as you 
expect.

: Hi all,
: I have to implement searching for the following criteria:
: 
: "search all documents with 'status' approved and 'createddate' within the
: given range."
:        where 'status' and 'createddate'  are two fields.
: 
: for this i created a field query for 'status' with occurance 'Must' and a
: range query for 'createddate'.
: Then i combined that two and searched.
: 
: But the search results contains documents which are not approved.[Approved
: documents comes first followed by others !!!]
: 
: If i remove the range query, results will contain only approved documents.
: 
: How to solve this?


-Hoss