I am using Lucene
in android to search my content. I have two types of documents and one has a trashed
field which is either true
or false
. The other type of document does not have that field. I want to return all documents that have trashed:false
, or don't have the trashed
field.
I have tried add -trashed:true
to my query, which returns all the correct documents, but it messes up the offsets of the search surround a different word and not the one I am searching for.
EDIT:
I have to add this to every search query I perform. I have an index of approximately 20,000 documents and I would really like to not have to rebuild it because I had my users rebuild their indices my last release. Note: this is on android devices so it takes a long time and a lot of battery to reindex all of their documents.
Thanks for the help.