| Constructor and Description |
|---|
TextQuery(String wordsAndPhrases)
|
TextQuery(String wordsAndPhrases,
Locale locale)
Creates new
TextQuery using the locales language. |
TextQuery(String wordsAndPhrases,
String language)
Creates new
TextQuery in language. |
TextQuery(TextCriteria criteria)
Creates new
TextQuery for given TextCriteria. |
| Modifier and Type | Method and Description |
|---|---|
org.bson.Document |
getFieldsObject() |
String |
getScoreFieldName()
Get the fieldname used for scoring
|
org.bson.Document |
getSortObject() |
TextQuery |
includeScore()
Add field score holding the documents textScore to the returned fields.
|
TextQuery |
includeScore(String fieldname)
Include text search document score in returned fields using the given fieldname.
|
boolean |
isSorted()
Returns true if the
Query has a sort parameter. |
static TextQuery |
queryText(TextCriteria criteria)
Creates new
TextQuery searching for given TextCriteria. |
void |
setScoreFieldName(String fieldName)
Set the fieldname used for scoring.
|
TextQuery |
sortByScore()
Add sorting by text score.
|
addCriteria, allowDiskUse, allowSecondaryReads, collation, comment, cursorBatchSize, equals, exhaust, fields, getCollation, getCriteria, getHint, getLimit, getMeta, getQueryObject, getRestrictedTypes, getSkip, hashCode, isRestrictedTypeKey, limit, maxTime, maxTime, maxTimeMsec, noCursorTimeout, of, partialResults, query, querySettingsEquals, restrict, setMeta, skip, slaveOk, toString, with, with, withHint, withHintpublic TextQuery(String wordsAndPhrases)
wordsAndPhrases - TextCriteria.matching(String)public TextQuery(String wordsAndPhrases, @Nullable String language)
TextQuery in language. wordsAndPhrases - language - TextCriteria.forLanguage(String),
TextCriteria.matching(String)public TextQuery(String wordsAndPhrases, @Nullable Locale locale)
TextQuery using the locales language.wordsAndPhrases - must not be null.locale - can be null.public TextQuery(TextCriteria criteria)
TextQuery for given TextCriteria.criteria - must not be null.public static TextQuery queryText(TextCriteria criteria)
TextQuery searching for given TextCriteria.criteria - must not be null.TextQuery.public TextQuery sortByScore()
includeScore()public TextQuery includeScore()
public TextQuery includeScore(String fieldname)
fieldname - must not be null.public void setScoreFieldName(String fieldName)
fieldName - must not be null.public String getScoreFieldName()
public org.bson.Document getFieldsObject()
getFieldsObject in class QueryDocument.public org.bson.Document getSortObject()
getSortObject in class QueryDocument.public boolean isSorted()
QueryQuery has a sort parameter.isSorted in class QuerySort.isSorted()Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.