Lucene.NET - Find documents that do not contain a specified field
- by Brandon
Let's say I have 2 instance of a class called 'Animal'.
Animal has 3 fields: Name, Age, and Type
The name field is nullable, so before I insert an instance of Animal as a Lucene indexed document, I check if Animal.Name == null, and if it does, I do not insert it as a field in my document. If I were to retrieve all animals, I would see that the…