Couchbase .NET SDK | 3.8.0
Search Results for

    Show / Hide Table of Contents

    Class PhraseQuery

    The phrase query allows to query for exact term phrases in the index. The provided terms must exist in the correct order, at the correct index offsets, in the specified field (as no analyzer are applied to the terms). Queried field must have been indexed with includeTermVectors set to true. It is generally more useful in debugging scenarios, and the Match Phrase Query should usually be preferred for real-world use cases.

    Inheritance
    object
    SearchQueryBase
    PhraseQuery
    Implements
    ISearchQuery
    Inherited Members
    SearchQueryBase.Boost(double)
    SearchQueryBase.BoostValue
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Couchbase.Search.Queries.Simple
    Assembly: Couchbase.NetClient.dll
    Syntax
    public sealed class PhraseQuery : SearchQueryBase, ISearchQuery

    Constructors

    | Edit this page View Source

    PhraseQuery(params string[])

    Declaration
    public PhraseQuery(params string[] terms)
    Parameters
    Type Name Description
    string[] terms

    Methods

    | Edit this page View Source

    AsReadOnly()

    Declaration
    public PhraseQuery.ReadOnly AsReadOnly()
    Returns
    Type Description
    PhraseQuery.ReadOnly
    | Edit this page View Source

    Deconstruct(out IReadOnlyList<string>, out string)

    Declaration
    public void Deconstruct(out IReadOnlyList<string> terms, out string field)
    Parameters
    Type Name Description
    IReadOnlyList<string> terms
    string field
    | Edit this page View Source

    Export()

    Gets a JSON object representing this query instance />

    Declaration
    public override JObject Export()
    Returns
    Type Description
    JObject
    Overrides
    SearchQueryBase.Export()
    | Edit this page View Source

    Field(string)

    The field to search against.

    Declaration
    public PhraseQuery Field(string field)
    Parameters
    Type Name Description
    string field

    The field.

    Returns
    Type Description
    PhraseQuery

    Implements

    ISearchQuery

    See Also

    SearchQueryBase
    • Edit this page
    • View Source
    In this article
    Back to top © 2025 Couchbase, Inc.