package search
Query building API for MongoDB Atlas full-text search.
While all the building blocks of this API, such as
SearchOptions
, SearchHighlight
, etc.,
are not necessary immutable, they are unmodifiable due to methods like
SearchHighlight.maxCharsToExamine
returning new instances instead of modifying the instance
on which they are called. This allows storing and using such instances as templates.
- Since
4.7
- See also
Aggregates.search
- Alphabetic
- By Inheritance
- search
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- type AddSearchScoreExpression = com.mongodb.client.model.search.AddSearchScoreExpression
- Annotations
- @Evolving() @Beta()
- See also
SearchScoreExpression.addExpression
- type AutocompleteSearchOperator = com.mongodb.client.model.search.AutocompleteSearchOperator
- Annotations
- @Evolving() @Beta()
- See also
SearchOperator.autocomplete(String, FieldSearchPath)
SearchOperator.autocomplete(Iterable, FieldSearchPath)
- type CompoundSearchOperator = com.mongodb.client.model.search.CompoundSearchOperator
- Annotations
- @Evolving() @Beta()
- See also
SearchOperator.compound()
- type CompoundSearchOperatorBase = com.mongodb.client.model.search.CompoundSearchOperatorBase
A base for a CompoundSearchOperator which allows creating instances of this operator.
A base for a CompoundSearchOperator which allows creating instances of this operator. This interface is a technicality and does not represent a meaningful element of the full-text search query syntax.
- Annotations
- @Evolving() @Beta()
- See also
SearchOperator.compound()
- type ConstantSearchScore = com.mongodb.client.model.search.ConstantSearchScore
- Annotations
- @Evolving() @Beta()
- See also
SearchScore.constant
- type ConstantSearchScoreExpression = com.mongodb.client.model.search.ConstantSearchScoreExpression
- Annotations
- @Evolving() @Beta()
- See also
SearchScoreExpression.constantExpression
- type DateNearSearchOperator = com.mongodb.client.model.search.DateNearSearchOperator
- Annotations
- @Evolving() @Beta()
- See also
SearchOperator.near
- type DateRangeSearchOperator = com.mongodb.client.model.search.DateRangeSearchOperator
- Annotations
- @Evolving() @Beta()
- See also
SearchOperator.dateRange
- type DateRangeSearchOperatorBase = com.mongodb.client.model.search.DateRangeSearchOperatorBase
A base for a DateRangeSearchOperatorBase which allows creating instances of this operator.
A base for a DateRangeSearchOperatorBase which allows creating instances of this operator. This interface is a technicality and does not represent a meaningful element of the full-text search query syntax.
- Annotations
- @Evolving() @Beta()
- See also
SearchOperator.dateRange
- type DateSearchFacet = com.mongodb.client.model.search.DateSearchFacet
- Annotations
- @Evolving() @Beta()
- See also
SearchFacet.dateFacet(String, FieldSearchPath, Iterable)
- type ExistsSearchOperator = com.mongodb.client.model.search.ExistsSearchOperator
- Annotations
- @Evolving() @Beta()
- See also
SearchOperator.exists(FieldSearchPath)
- type FacetSearchCollector = com.mongodb.client.model.search.FacetSearchCollector
- Annotations
- @Evolving() @Beta()
- See also
SearchCollector.facet(SearchOperator, Iterable)
- type FieldSearchPath = com.mongodb.client.model.search.FieldSearchPath
- Annotations
- @Evolving() @Beta()
- See also
SearchPath.fieldPath(String)
- type FilterCompoundSearchOperator = com.mongodb.client.model.search.FilterCompoundSearchOperator
A representation of a CompoundSearchOperator that allows changing
filter
-specific options, if any.A representation of a CompoundSearchOperator that allows changing
filter
-specific options, if any. This interface is a technicality and does not represent a meaningful element of the full-text search query syntax.- Annotations
- @Evolving() @Beta()
- See also
CompoundSearchOperatorBase.filter(Iterable)
- type FunctionSearchScore = com.mongodb.client.model.search.FunctionSearchScore
- Annotations
- @Evolving() @Beta()
- See also
SearchScore.function
- type FuzzySearchOptions = com.mongodb.client.model.search.FuzzySearchOptions
Fuzzy search options that may be used with some SearchOperators.
Fuzzy search options that may be used with some SearchOperators.
- Annotations
- @Evolving() @Beta()
- See also
- type GaussSearchScoreExpression = com.mongodb.client.model.search.GaussSearchScoreExpression
- Annotations
- @Evolving() @Beta()
- See also
SearchScoreExpression.gaussExpression
- type GeoNearSearchOperator = com.mongodb.client.model.search.GeoNearSearchOperator
- Annotations
- @Evolving() @Beta()
- See also
SearchOperator.near
- type Log1pSearchScoreExpression = com.mongodb.client.model.search.Log1pSearchScoreExpression
- Annotations
- @Evolving() @Beta()
- See also
SearchScoreExpression.log1p
- type LogSearchScoreExpression = com.mongodb.client.model.search.LogSearchScoreExpression
- Annotations
- @Evolving() @Beta()
- See also
SearchScoreExpression.log
- type LowerBoundSearchCount = com.mongodb.client.model.search.LowerBoundSearchCount
- Annotations
- @Evolving() @Beta()
- See also
SearchCount.lowerBound()
- type MultiplySearchScoreExpression = com.mongodb.client.model.search.MultiplySearchScoreExpression
- Annotations
- @Evolving() @Beta()
- See also
SearchScoreExpression.multiplyExpression
- type MustCompoundSearchOperator = com.mongodb.client.model.search.MustCompoundSearchOperator
A representation of a CompoundSearchOperator that allows changing
must
-specific options, if any.A representation of a CompoundSearchOperator that allows changing
must
-specific options, if any. This interface is a technicality and does not represent a meaningful element of the full-text search query syntax.- Annotations
- @Evolving() @Beta()
- See also
CompoundSearchOperatorBase.must(Iterable)
- type MustNotCompoundSearchOperator = com.mongodb.client.model.search.MustNotCompoundSearchOperator
A representation of a CompoundSearchOperator that allows changing
mustNot
-specific options, if any.A representation of a CompoundSearchOperator that allows changing
mustNot
-specific options, if any. This interface is a technicality and does not represent a meaningful element of the full-text search query syntax.- Annotations
- @Evolving() @Beta()
- See also
CompoundSearchOperatorBase.mustNot(Iterable)
- type NumberNearSearchOperator = com.mongodb.client.model.search.NumberNearSearchOperator
- Annotations
- @Evolving() @Beta()
- See also
SearchOperator.near
- type NumberRangeSearchOperator = com.mongodb.client.model.search.NumberRangeSearchOperator
- Annotations
- @Evolving() @Beta()
- See also
SearchOperator.numberRange
- type NumberRangeSearchOperatorBase = com.mongodb.client.model.search.NumberRangeSearchOperatorBase
A base for a NumberRangeSearchOperatorBase which allows creating instances of this operator.
A base for a NumberRangeSearchOperatorBase which allows creating instances of this operator. This interface is a technicality and does not represent a meaningful element of the full-text search query syntax.
- Annotations
- @Evolving() @Beta()
- See also
SearchOperator.numberRange
- type NumberSearchFacet = com.mongodb.client.model.search.NumberSearchFacet
- Annotations
- @Evolving() @Beta()
- See also
SearchFacet.numberFacet(String, FieldSearchPath, Iterable)
- type PathBoostSearchScore = com.mongodb.client.model.search.PathBoostSearchScore
- Annotations
- @Evolving() @Beta()
- See also
SearchScore.boost(FieldSearchPath)
- type PathSearchScoreExpression = com.mongodb.client.model.search.PathSearchScoreExpression
- Annotations
- @Evolving() @Beta()
- See also
SearchScoreExpression.pathExpression
- type RelevanceSearchScoreExpression = com.mongodb.client.model.search.RelevanceSearchScoreExpression
- Annotations
- @Evolving() @Beta()
- See also
SearchScoreExpression.relevanceExpression
- type SearchCollector = com.mongodb.client.model.search.SearchCollector
The core part of the
$search
pipeline stage of an aggregation pipeline.The core part of the
$search
pipeline stage of an aggregation pipeline. SearchCollectors allow returning metadata together with the matching search results. You may use the$$SEARCH_META
variable, e.g., via Projections.computedSearchMeta, to extract this metadata.- Annotations
- @Evolving() @Beta()
- See also
- type SearchCount = com.mongodb.client.model.search.SearchCount
Counting options.
Counting options. You may use the
$$SEARCH_META
variable, e.g., via Projections.computedSearchMeta, to extract the results of counting. You may use Projections.computedSearchMeta to extract the count results.- Annotations
- @Evolving() @Beta()
- See also
- type SearchFacet = com.mongodb.client.model.search.SearchFacet
A facet definition for FacetSearchCollector.
A facet definition for FacetSearchCollector.
- Annotations
- @Evolving() @Beta()
- See also
- type SearchHighlight = com.mongodb.client.model.search.SearchHighlight
Highlighting options.
Highlighting options. You may use the
$meta: "searchHighlights"
expression, e.g., via Projections.metaSearchHighlights, to extract the results of highlighting.- Annotations
- @Evolving() @Beta()
- See also
- type SearchOperator = com.mongodb.client.model.search.SearchOperator
The core part of the
$search
pipeline stage of an aggregation pipeline.The core part of the
$search
pipeline stage of an aggregation pipeline.- Annotations
- @Evolving() @Beta()
- See also
- type SearchOptions = com.mongodb.client.model.search.SearchOptions
Represents optional fields of the
$search
pipeline stage of an aggregation pipeline.Represents optional fields of the
$search
pipeline stage of an aggregation pipeline.- Annotations
- @Evolving() @Beta()
- See also
- type SearchPath = com.mongodb.client.model.search.SearchPath
A specification of fields to be searched.
A specification of fields to be searched.
Despite
SearchPath
beingBson
, its value conforming to the correct syntax must be obtained via eitherSearchPath.toBsonValue
orFieldSearchPath.toValue
.- Annotations
- @Evolving() @Beta()
- See also
- type SearchScore = com.mongodb.client.model.search.SearchScore
A modifier of the relevance score.
A modifier of the relevance score. You may use the
$meta: "searchScore"
expression, e.g., via Projections.metaSearchScore, to extract the relevance score assigned to each found document.- Annotations
- @Evolving() @Beta()
- See also
- type SearchScoreExpression = com.mongodb.client.model.search.SearchScoreExpression
- Annotations
- @Evolving() @Beta()
- See also
SearchScore.function
- type ShouldCompoundSearchOperator = com.mongodb.client.model.search.ShouldCompoundSearchOperator
A representation of a CompoundSearchOperator that allows changing
should
-specific options, if any.A representation of a CompoundSearchOperator that allows changing
should
-specific options, if any. This interface is a technicality and does not represent a meaningful element of the full-text search query syntax.- Annotations
- @Evolving() @Beta()
- See also
CompoundSearchOperatorBase.should(Iterable)
- type StringSearchFacet = com.mongodb.client.model.search.StringSearchFacet
- Annotations
- @Evolving() @Beta()
- See also
SearchFacet.stringFacet(String, FieldSearchPath)
- type TextSearchOperator = com.mongodb.client.model.search.TextSearchOperator
- Annotations
- @Evolving() @Beta()
- See also
SearchOperator.text(String, SearchPath)
SearchOperator.text(Iterable, Iterable)
- type TotalSearchCount = com.mongodb.client.model.search.TotalSearchCount
- Annotations
- @Evolving() @Beta()
- See also
SearchCount.total()
- type ValueBoostSearchScore = com.mongodb.client.model.search.ValueBoostSearchScore
- Annotations
- @Evolving() @Beta()
- See also
SearchScore.boost(float)
- type WildcardSearchPath = com.mongodb.client.model.search.WildcardSearchPath
- Annotations
- @Evolving() @Beta()
- See also
SearchPath.wildcardPath(String)
Value Members
- object FuzzySearchOptions
Fuzzy search options that may be used with some
SearchOperator
s.Fuzzy search options that may be used with some
SearchOperator
s.- Annotations
- @Beta()
- Since
4.7
- See also
- object SearchCollector
The core part of the
$search
pipeline stage of an aggregation pipeline.The core part of the
$search
pipeline stage of an aggregation pipeline.SearchCollector
s allow returning metadata together with the matching search results. You may use the$$SEARCH_META
variable, e.g., via Projections.computedSearchMeta, to extract this metadata.- Annotations
- @Beta()
- Since
4.7
- See also
- object SearchCount
Counting options.
Counting options. You may use the
$$SEARCH_META
variable, e.g., via Projections.computedSearchMeta, to extract the results of counting.- Annotations
- @Beta()
- Since
4.7
- See also
- object SearchFacet
A facet definition for FacetSearchCollector.
A facet definition for FacetSearchCollector.
- Annotations
- @Beta()
- Since
4.7
- See also
- object SearchHighlight
Highlighting options.
Highlighting options. You may use the
$meta: "searchHighlights"
expression, e.g., via Projections.metaSearchHighlights, to extract the results of highlighting.- Annotations
- @Beta()
- Since
4.7
- See also
- object SearchOperator
The core part of the
$search
pipeline stage of an aggregation pipeline.The core part of the
$search
pipeline stage of an aggregation pipeline.- Annotations
- @Beta()
- Since
4.7
- See also
- object SearchOptions
Represents optional fields of the
$search
pipeline stage of an aggregation pipeline.Represents optional fields of the
$search
pipeline stage of an aggregation pipeline.- Annotations
- @Beta()
- Since
4.7
- See also
- object SearchPath
A specification of fields to be searched.
A specification of fields to be searched.
Depending on the context, one of the following methods may be used to get a representation of a
SearchPath
with the correct syntax:SearchPath.toBsonDocument
,SearchPath.toBsonValue
,FieldSearchPath.toValue
.- Annotations
- @Beta()
- Since
4.7
- See also
- object SearchScore
A modifier of the relevance score.
A modifier of the relevance score. You may use the
$meta: "searchScore"
expression, e.g., via Projections.metaSearchScore, to extract the relevance score assigned to each found document.- Annotations
- @Beta()
- Since
4.7
- See also
- object SearchScoreExpression
- Annotations
- @Beta()
- Since
4.7
- See also
This is the documentation for the MongoDB Scala driver.
Driver structure
The mongodb scala driver.
To get started you need a MongoClient instance, either from a connection string or via a org.mongodb.scala.MongoClientSettings.
Notable packages include: