public class TextCriteria extends Object implements CriteriaDefinition
CriteriaDefinition to be used for full text search.| Constructor and Description |
|---|
TextCriteria()
Creates a new
TextCriteria. |
| Modifier and Type | Method and Description |
|---|---|
TextCriteria |
caseSensitive(boolean caseSensitive)
Optionally enable or disable case sensitive search.
|
TextCriteria |
diacriticSensitive(boolean diacriticSensitive)
Optionally enable or disable diacritic sensitive search against version 3 text indexes.
|
static TextCriteria |
forDefaultLanguage()
Returns a new
TextCriteria for the default language. |
static TextCriteria |
forLanguage(String language)
For a full list of supported languages see the mongodb reference manual for
Text Search Languages.
|
com.mongodb.DBObject |
getCriteriaObject()
Get
DBObject representation. |
String |
getKey()
Get the identifying key.
|
TextCriteria |
matching(String term) |
TextCriteria |
matching(Term term)
Adds given
Term to criteria. |
TextCriteria |
matchingAny(String... words)
Configures the
TextCriteria to match any of the given words. |
TextCriteria |
matchingPhrase(String phrase)
Given value will treated as a single phrase.
|
TextCriteria |
notMatching(String term) |
TextCriteria |
notMatchingAny(String... words) |
TextCriteria |
notMatchingPhrase(String phrase)
Given value will treated as a single phrase.
|
public TextCriteria()
TextCriteria.forDefaultLanguage(),
forLanguage(String)public static TextCriteria forDefaultLanguage()
TextCriteria for the default language.public static TextCriteria forLanguage(String language)
language - public TextCriteria matchingAny(String... words)
TextCriteria to match any of the given words.words - the words to match.public TextCriteria matching(Term term)
Term to criteria.term - must not be null.public TextCriteria matching(String term)
term - public TextCriteria notMatching(String term)
term - public TextCriteria notMatchingAny(String... words)
words - public TextCriteria notMatchingPhrase(String phrase)
phrase - public TextCriteria matchingPhrase(String phrase)
phrase - public TextCriteria caseSensitive(boolean caseSensitive)
caseSensitive - boolean flag to enable/disable.public TextCriteria diacriticSensitive(boolean diacriticSensitive)
diacriticSensitive - boolean flag to enable/disable.public String getKey()
CriteriaDefinitiongetKey in interface CriteriaDefinitionpublic com.mongodb.DBObject getCriteriaObject()
CriteriaDefinitionDBObject representation.getCriteriaObject in interface CriteriaDefinitionCopyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.