This PR adds the defined: true option to the index method allowing to only index documents having the given field.
class MyDoc
include NoBrainer::Document
# Using the field options
field :field1, index: { defined: true }
field :field2
field :field3
# Using the index method
index :field2, defined: true
end
The following queries will use the above declared indexes:
This PR adds the
defined: true
option to theindex
method allowing to only index documents having the given field.The following queries will use the above declared indexes: