Packages

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

Aggregates.vectorSearch

Atlas Search

Atlas Search aggregation pipeline stages

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. search
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. type AddSearchScoreExpression = com.mongodb.client.model.search.AddSearchScoreExpression

    Annotations
    @Sealed() @Beta()
    See also

    SearchScoreExpression.addExpression

  2. type AutocompleteSearchOperator = com.mongodb.client.model.search.AutocompleteSearchOperator

    Annotations
    @Sealed() @Beta()
    See also

    SearchOperator.autocomplete(String, FieldSearchPath)

    SearchOperator.autocomplete(Iterable, FieldSearchPath)

  3. type CompoundSearchOperator = com.mongodb.client.model.search.CompoundSearchOperator

    Annotations
    @Sealed() @Beta()
    See also

    SearchOperator.compound()

  4. 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
    @Sealed() @Beta()
    See also

    SearchOperator.compound()

  5. type ConstantSearchScore = com.mongodb.client.model.search.ConstantSearchScore

    Annotations
    @Sealed() @Beta()
    See also

    SearchScore.constant

  6. type ConstantSearchScoreExpression = com.mongodb.client.model.search.ConstantSearchScoreExpression

    Annotations
    @Sealed() @Beta()
    See also

    SearchScoreExpression.constantExpression

  7. type DateNearSearchOperator = com.mongodb.client.model.search.DateNearSearchOperator

    Annotations
    @Sealed() @Beta()
    See also

    SearchOperator.near

  8. type DateRangeSearchOperator = com.mongodb.client.model.search.DateRangeSearchOperator

    Annotations
    @Sealed() @Beta()
    See also

    SearchOperator.dateRange

  9. 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
    @Sealed() @Beta()
    See also

    SearchOperator.dateRange

  10. type DateSearchFacet = com.mongodb.client.model.search.DateSearchFacet

    Annotations
    @Sealed() @Beta()
    See also

    SearchFacet.dateFacet(String, FieldSearchPath, Iterable)

  11. type ExistsSearchOperator = com.mongodb.client.model.search.ExistsSearchOperator

    Annotations
    @Sealed() @Beta()
    See also

    SearchOperator.exists(FieldSearchPath)

  12. type FacetSearchCollector = com.mongodb.client.model.search.FacetSearchCollector

    Annotations
    @Sealed() @Beta()
    See also

    SearchCollector.facet(SearchOperator, Iterable)

  13. type FieldSearchPath = com.mongodb.client.model.search.FieldSearchPath

    Annotations
    @Sealed() @Beta()
    See also

    SearchPath.fieldPath(String)

  14. 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
    @Sealed() @Beta()
    See also

    CompoundSearchOperatorBase.filter(Iterable)

  15. type FunctionSearchScore = com.mongodb.client.model.search.FunctionSearchScore

    Annotations
    @Sealed() @Beta()
    See also

    SearchScore.function

  16. 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
    @Sealed() @Beta()
    See also

    autocomplete operator

    text operator

  17. type GaussSearchScoreExpression = com.mongodb.client.model.search.GaussSearchScoreExpression

    Annotations
    @Sealed() @Beta()
    See also

    SearchScoreExpression.gaussExpression

  18. type GeoNearSearchOperator = com.mongodb.client.model.search.GeoNearSearchOperator

    Annotations
    @Sealed() @Beta()
    See also

    SearchOperator.near

  19. type Log1pSearchScoreExpression = com.mongodb.client.model.search.Log1pSearchScoreExpression

    Annotations
    @Sealed() @Beta()
    See also

    SearchScoreExpression.log1p

  20. type LogSearchScoreExpression = com.mongodb.client.model.search.LogSearchScoreExpression

    Annotations
    @Sealed() @Beta()
    See also

    SearchScoreExpression.log

  21. type LowerBoundSearchCount = com.mongodb.client.model.search.LowerBoundSearchCount

    Annotations
    @Sealed() @Beta()
    See also

    SearchCount.lowerBound()

  22. type MultiplySearchScoreExpression = com.mongodb.client.model.search.MultiplySearchScoreExpression

    Annotations
    @Sealed() @Beta()
    See also

    SearchScoreExpression.multiplyExpression

  23. 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
    @Sealed() @Beta()
    See also

    CompoundSearchOperatorBase.must(Iterable)

  24. 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
    @Sealed() @Beta()
    See also

    CompoundSearchOperatorBase.mustNot(Iterable)

  25. type NumberNearSearchOperator = com.mongodb.client.model.search.NumberNearSearchOperator

    Annotations
    @Sealed() @Beta()
    See also

    SearchOperator.near

  26. type NumberRangeSearchOperator = com.mongodb.client.model.search.NumberRangeSearchOperator

    Annotations
    @Sealed() @Beta()
    See also

    SearchOperator.numberRange

  27. 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
    @Sealed() @Beta()
    See also

    SearchOperator.numberRange

  28. type NumberSearchFacet = com.mongodb.client.model.search.NumberSearchFacet

    Annotations
    @Sealed() @Beta()
    See also

    SearchFacet.numberFacet(String, FieldSearchPath, Iterable)

  29. type PathBoostSearchScore = com.mongodb.client.model.search.PathBoostSearchScore

    Annotations
    @Sealed() @Beta()
    See also

    SearchScore.boost(FieldSearchPath)

  30. type PathSearchScoreExpression = com.mongodb.client.model.search.PathSearchScoreExpression

    Annotations
    @Sealed() @Beta()
    See also

    SearchScoreExpression.pathExpression

  31. type RelevanceSearchScoreExpression = com.mongodb.client.model.search.RelevanceSearchScoreExpression

    Annotations
    @Sealed() @Beta()
    See also

    SearchScoreExpression.relevanceExpression

  32. 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
    @Sealed() @Beta()
    See also

    Search collectors

  33. 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
    @Sealed() @Beta()
    See also

    Counting

  34. type SearchFacet = com.mongodb.client.model.search.SearchFacet

    A facet definition for FacetSearchCollector.

    A facet definition for FacetSearchCollector.

    Annotations
    @Sealed() @Beta()
    See also

    Facet definition

  35. 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
    @Sealed() @Beta()
    See also

    Highlighting

  36. 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
    @Sealed() @Beta()
    See also

    Search operators

  37. 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
    @Sealed() @Beta()
    See also

    $search syntax

  38. type SearchPath = com.mongodb.client.model.search.SearchPath

    A specification of fields to be searched.

    A specification of fields to be searched.

    Despite SearchPath being Bson, its value conforming to the correct syntax must be obtained via either SearchPath.toBsonValue or FieldSearchPath.toValue.

    Annotations
    @Sealed() @Beta()
    See also

    Path

  39. 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
    @Sealed() @Beta()
    See also

    Scoring

  40. type SearchScoreExpression = com.mongodb.client.model.search.SearchScoreExpression

    Annotations
    @Sealed() @Beta()
    See also

    SearchScore.function

    Expressions for the function score modifier

  41. 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
    @Sealed() @Beta()
    See also

    CompoundSearchOperatorBase.should(Iterable)

  42. type StringSearchFacet = com.mongodb.client.model.search.StringSearchFacet

    Annotations
    @Sealed() @Beta()
    See also

    SearchFacet.stringFacet(String, FieldSearchPath)

  43. type TextSearchOperator = com.mongodb.client.model.search.TextSearchOperator

    Annotations
    @Sealed() @Beta()
    See also

    SearchOperator.text(String, SearchPath)

    SearchOperator.text(Iterable, Iterable)

  44. type TotalSearchCount = com.mongodb.client.model.search.TotalSearchCount

    Annotations
    @Sealed() @Beta()
    See also

    SearchCount.total()

  45. type ValueBoostSearchScore = com.mongodb.client.model.search.ValueBoostSearchScore

    Annotations
    @Sealed() @Beta()
    See also

    SearchScore.boost(float)

  46. type VectorSearchOptions = com.mongodb.client.model.search.VectorSearchOptions

    Represents optional fields of the $vectorSearch pipeline stage of an aggregation pipeline.

    Represents optional fields of the $vectorSearch pipeline stage of an aggregation pipeline.

    Annotations
    @Sealed() @Beta()
    Since

    4.11

    Note

    Requires MongoDB 6.0.10 or greater

    See also

    $vectorSearch

  47. type WildcardSearchPath = com.mongodb.client.model.search.WildcardSearchPath

    Annotations
    @Sealed() @Beta()
    See also

    SearchPath.wildcardPath(String)

Value Members

  1. object FuzzySearchOptions

    Fuzzy search options that may be used with some SearchOperators.

    Fuzzy search options that may be used with some SearchOperators.

    Annotations
    @Beta()
    Since

    4.7

    See also

    autocomplete operator

    text operator

  2. 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. 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
    @Beta()
    Since

    4.7

    See also

    Search collectors

  3. 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

    Counting

  4. object SearchFacet

    A facet definition for FacetSearchCollector.

    A facet definition for FacetSearchCollector.

    Annotations
    @Beta()
    Since

    4.7

    See also

    Facet definition

  5. 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

    Highlighting

  6. 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

    Search operators

  7. 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

    $search syntax

  8. 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

    Path

  9. 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

    Scoring

  10. object SearchScoreExpression

  11. object VectorSearchOptions

    Represents optional fields of the $vectorSearch pipeline stage of an aggregation pipeline.

    Represents optional fields of the $vectorSearch pipeline stage of an aggregation pipeline.

    Annotations
    @Beta()
    Since

    4.11

    Note

    Requires MongoDB 6.0.10 or greater

    See also

    $vectorSearch

Inherited from AnyRef

Inherited from Any

Ungrouped