All of my Lucene.net (2.9.2) documents have two fields:
- categoryid
- bodytext
bodytext
is the default field, and is where all of the document's text is stored (using Field.Store.NO , Field.Index.ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS
).
categoryid
is just a numeric field stored as text: Field.Store.YES, Field.Index.NOT_ANALYZED
When this query is executed, it only returns documents with that category ID: categoryid:1
However when I perform this query: categoryid:1 foo bar
it returns documents from other categories other than 1.
Why is this? And how can I force it to respect the original categoryid:N
query term?