text
command was deprecated in the
2.6 version of MongoDB. Use the
$text
query operator
instead. This class will not be removed until two releases
after the MongoDB 2.6 release (e.g. 2.10 if the releases are
2.8 and 2.10).@Deprecated public static class Text.Builder extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
myLanguage
Deprecated.
The language to use when stemming the search terms.
|
protected int |
myLimit
Deprecated.
Maximum number of document to return.
|
protected Document |
myQuery
Deprecated.
A standard MongoDB query document to limit the final results.
|
protected ReadPreference |
myReadPreference
Deprecated.
The read preference to use.
|
protected Document |
myReturnFields
Deprecated.
The fields to return from the query.
|
protected String |
mySearchTerm
Deprecated.
The search terms.
|
Constructor and Description |
---|
Text.Builder()
Deprecated.
Creates a new Builder.
|
Modifier and Type | Method and Description |
---|---|
Text |
build()
Deprecated.
Creates a new
Text based on the current state of the builder. |
Text.Builder |
language(String language)
Deprecated.
Sets the language to use when stemming the search terms to the new
value.
|
Text.Builder |
limit(int limit)
Deprecated.
Sets the maximum number of document to return to the new value.
|
Text.Builder |
query(DocumentAssignable query)
Deprecated.
Sets the standard MongoDB query document to limit the final results
to the new value.
|
Text.Builder |
readPreference(ReadPreference readPreference)
Deprecated.
Sets the
ReadPreference specifying which servers may be used
to execute the Text command. |
Text.Builder |
reset()
Deprecated.
Resets the builder back to its initial state.
|
Text.Builder |
returnFields(DocumentAssignable returnFields)
Deprecated.
Sets the fields to return from the query to the new value.
|
Text.Builder |
searchTerm(String searchTerm)
Deprecated.
Sets the search term to the new value.
|
Text.Builder |
setLanguage(String language)
Deprecated.
Sets the language to use when stemming the search terms to the new
value.
|
Text.Builder |
setLimit(int limit)
Deprecated.
Sets the maximum number of document to return to the new value.
|
Text.Builder |
setQuery(DocumentAssignable query)
Deprecated.
Sets the standard MongoDB query document to limit the final results
to the new value.
|
Text.Builder |
setReadPreference(ReadPreference readPreference)
Deprecated.
Sets the
ReadPreference specifying which servers may be used
to execute the Text command. |
Text.Builder |
setReturnFields(DocumentAssignable returnFields)
Deprecated.
Sets the fields to return from the query to the new value.
|
Text.Builder |
setSearchTerm(String searchTerm)
Deprecated.
Sets the search term to the new value.
|
protected String myLanguage
protected int myLimit
protected Document myQuery
protected ReadPreference myReadPreference
protected Document myReturnFields
protected String mySearchTerm
public Text build()
Text
based on the current state of the builder.Text
based on the current state of the builder.IllegalArgumentException
- On the search term not being set.public Text.Builder language(String language)
This method delegates to setLanguage(String)
language
- The new value for the language to use when stemming the
search terms.Text.Builder
for method call chaining.public Text.Builder limit(int limit)
This method delegates to setLimit(int)
limit
- The new value for the maximum number of document to
return.Text.Builder
for method call chaining.public Text.Builder query(DocumentAssignable query)
This method delegates to setQuery(DocumentAssignable)
query
- The new value for the standard MongoDB query document to
limit the final results.Text.Builder
for method call chaining.public Text.Builder readPreference(ReadPreference readPreference)
ReadPreference
specifying which servers may be used
to execute the Text
command.
If not set or set to null
then the
MongoCollection
instance's ReadPreference
will be
used.
This method delegates to setReadPreference(ReadPreference)
.
readPreference
- The read preferences specifying which servers may be used.MongoCollection.getReadPreference()
public Text.Builder reset()
Text.Builder
for method call chaining.public Text.Builder returnFields(DocumentAssignable returnFields)
This method delegates to setReturnFields(DocumentAssignable)
returnFields
- The new value for the fields to return from the query.Text.Builder
for method call chaining.public Text.Builder searchTerm(String searchTerm)
This method delegates to setSearchTerm(String)
searchTerm
- The new value for the search terms.Text.Builder
for method call chaining.public Text.Builder setLanguage(String language)
language
- The new value for the language to use when stemming the
search terms.Text.Builder
for method call chaining.public Text.Builder setLimit(int limit)
limit
- The new value for the maximum number of document to
return.Text.Builder
for method call chaining.public Text.Builder setQuery(DocumentAssignable query)
query
- The new value for the standard MongoDB query document to
limit the final results.Text.Builder
for method call chaining.public Text.Builder setReadPreference(ReadPreference readPreference)
ReadPreference
specifying which servers may be used
to execute the Text
command.
If not set or set to null
then the
MongoCollection
instance's ReadPreference
will be
used.
readPreference
- The read preferences specifying which servers may be used.MongoCollection.getReadPreference()
public Text.Builder setReturnFields(DocumentAssignable returnFields)
returnFields
- The new value for the fields to return from the query.Text.Builder
for method call chaining.public Text.Builder setSearchTerm(String searchTerm)
searchTerm
- The new value for the search terms.Text.Builder
for method call chaining.Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.