We are trying to search whether documents have a particular field value in a collection of possible values,
field:[value1, value2, value3, ..., valueN]
which would return the element if it matches any of the input values, similar to SQL's IN()
operator.
This would be similar to a range
query, but the elements do not necessarily describe a range.
An example using Lucene.Net API would be,
var query = new QueryParser(version, "FieldName", analyzer).In("value1", "value2", "value3");
Is this possible in Lucene.Net?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…