Search Results for

    Show / Hide Table of Contents

    Class NpgsqlFullTextSearchLinqExtensions

    Provides EF Core extension methods for Npgsql full-text search types.

    Inheritance
    object
    NpgsqlFullTextSearchLinqExtensions
    Namespace: Microsoft.EntityFrameworkCore
    Assembly: Npgsql.EntityFrameworkCore.PostgreSQL.dll
    Syntax
    public static class NpgsqlFullTextSearchLinqExtensions

    Methods

    | Improve this Doc View Source

    And(NpgsqlTsQuery, NpgsqlTsQuery)

    AND tsquerys together. Generates the "&&" operator. http://www.postgresql.org/docs/current/static/textsearch-features.html#TEXTSEARCH-MANIPULATE-TSQUERY

    Declaration
    public static NpgsqlTsQuery And(this NpgsqlTsQuery query1, NpgsqlTsQuery query2)
    Parameters
    Type Name Description
    NpgsqlTsQuery query1
    NpgsqlTsQuery query2
    Returns
    Type Description
    NpgsqlTsQuery
    | Improve this Doc View Source

    Concat(NpgsqlTsVector, NpgsqlTsVector)

    Returns a vector which combines the lexemes and positional information of vector1 and vector2 using the || tsvector operator. Positions and weight labels are retained during the concatenation. https://www.postgresql.org/docs/10/static/textsearch-features.html#TEXTSEARCH-MANIPULATE-TSVECTOR

    Declaration
    public static NpgsqlTsVector Concat(this NpgsqlTsVector vector1, NpgsqlTsVector vector2)
    Parameters
    Type Name Description
    NpgsqlTsVector vector1
    NpgsqlTsVector vector2
    Returns
    Type Description
    NpgsqlTsVector
    | Improve this Doc View Source

    Contains(NpgsqlTsQuery, NpgsqlTsQuery)

    Returns whether query1 contains query2. Generates the "@>" operator. http://www.postgresql.org/docs/current/static/functions-textsearch.html

    Declaration
    public static bool Contains(this NpgsqlTsQuery query1, NpgsqlTsQuery query2)
    Parameters
    Type Name Description
    NpgsqlTsQuery query1
    NpgsqlTsQuery query2
    Returns
    Type Description
    bool
    | Improve this Doc View Source

    Delete(NpgsqlTsVector, string)

    Return a new vector with lexeme removed from vector https://www.postgresql.org/docs/current/static/functions-textsearch.html

    Declaration
    public static NpgsqlTsVector Delete(this NpgsqlTsVector vector, string lexeme)
    Parameters
    Type Name Description
    NpgsqlTsVector vector
    string lexeme
    Returns
    Type Description
    NpgsqlTsVector
    | Improve this Doc View Source

    Delete(NpgsqlTsVector, string[])

    Return a new vector with lexemes removed from vector https://www.postgresql.org/docs/current/static/functions-textsearch.html

    Declaration
    public static NpgsqlTsVector Delete(this NpgsqlTsVector vector, string[] lexemes)
    Parameters
    Type Name Description
    NpgsqlTsVector vector
    string[] lexemes
    Returns
    Type Description
    NpgsqlTsVector
    | Improve this Doc View Source

    Filter(NpgsqlTsVector, char[])

    Returns a new vector with only lexemes having weights specified in weights. https://www.postgresql.org/docs/current/static/functions-textsearch.html

    Declaration
    public static NpgsqlTsVector Filter(this NpgsqlTsVector vector, char[] weights)
    Parameters
    Type Name Description
    NpgsqlTsVector vector
    char[] weights
    Returns
    Type Description
    NpgsqlTsVector
    | Improve this Doc View Source

    GetLength(NpgsqlTsVector)

    Returns the number of lexemes in vector. http://www.postgresql.org/docs/current/static/textsearch-features.html#TEXTSEARCH-MANIPULATE-TSVECTOR

    Declaration
    public static int GetLength(this NpgsqlTsVector vector)
    Parameters
    Type Name Description
    NpgsqlTsVector vector
    Returns
    Type Description
    int
    | Improve this Doc View Source

    GetNodeCount(NpgsqlTsQuery)

    Returns the number of lexemes plus operators in query. http://www.postgresql.org/docs/current/static/textsearch-features.html#TEXTSEARCH-MANIPULATE-TSQUERY

    Declaration
    public static int GetNodeCount(this NpgsqlTsQuery query)
    Parameters
    Type Name Description
    NpgsqlTsQuery query
    Returns
    Type Description
    int
    | Improve this Doc View Source

    GetQueryTree(NpgsqlTsQuery)

    Get the indexable part of query. http://www.postgresql.org/docs/current/static/textsearch-features.html#TEXTSEARCH-MANIPULATE-TSQUERY

    Declaration
    public static string GetQueryTree(this NpgsqlTsQuery query)
    Parameters
    Type Name Description
    NpgsqlTsQuery query
    Returns
    Type Description
    string
    | Improve this Doc View Source

    GetResultHeadline(NpgsqlTsQuery, string, string, string)

    Returns a string suitable for display containing a query match using the text search configuration specified by config. http://www.postgresql.org/docs/current/static/textsearch-controls.html#TEXTSEARCH-HEADLINE

    Declaration
    public static string GetResultHeadline(this NpgsqlTsQuery query, string config, string document, string options)
    Parameters
    Type Name Description
    NpgsqlTsQuery query
    string config
    string document
    string options
    Returns
    Type Description
    string
    | Improve this Doc View Source

    GetResultHeadline(NpgsqlTsQuery, string, string)

    Returns a string suitable for display containing a query match. http://www.postgresql.org/docs/current/static/textsearch-controls.html#TEXTSEARCH-HEADLINE

    Declaration
    public static string GetResultHeadline(this NpgsqlTsQuery query, string document, string options)
    Parameters
    Type Name Description
    NpgsqlTsQuery query
    string document
    string options
    Returns
    Type Description
    string
    | Improve this Doc View Source

    GetResultHeadline(NpgsqlTsQuery, string)

    Returns a string suitable for display containing a query match. http://www.postgresql.org/docs/current/static/textsearch-controls.html#TEXTSEARCH-HEADLINE

    Declaration
    public static string GetResultHeadline(this NpgsqlTsQuery query, string document)
    Parameters
    Type Name Description
    NpgsqlTsQuery query
    string document
    Returns
    Type Description
    string
    | Improve this Doc View Source

    IsContainedIn(NpgsqlTsQuery, NpgsqlTsQuery)

    Returns whether query1 is contained within query2. Generates the "<@" operator. http://www.postgresql.org/docs/current/static/functions-textsearch.html

    Declaration
    public static bool IsContainedIn(this NpgsqlTsQuery query1, NpgsqlTsQuery query2)
    Parameters
    Type Name Description
    NpgsqlTsQuery query1
    NpgsqlTsQuery query2
    Returns
    Type Description
    bool
    | Improve this Doc View Source

    Matches(NpgsqlTsVector, NpgsqlTsQuery)

    This method generates the "@@" match operator. http://www.postgresql.org/docs/current/static/textsearch-intro.html#TEXTSEARCH-MATCHING

    Declaration
    public static bool Matches(this NpgsqlTsVector vector, NpgsqlTsQuery query)
    Parameters
    Type Name Description
    NpgsqlTsVector vector
    NpgsqlTsQuery query
    Returns
    Type Description
    bool
    | Improve this Doc View Source

    Matches(NpgsqlTsVector, string)

    This method generates the "@@" match operator. The query parameter is assumed to be a plain search query and will be converted to a tsquery using plainto_tsquery. http://www.postgresql.org/docs/current/static/textsearch-intro.html#TEXTSEARCH-MATCHING

    Declaration
    public static bool Matches(this NpgsqlTsVector vector, string query)
    Parameters
    Type Name Description
    NpgsqlTsVector vector
    string query
    Returns
    Type Description
    bool
    | Improve this Doc View Source

    Or(NpgsqlTsQuery, NpgsqlTsQuery)

    OR tsquerys together. Generates the "||" operator. http://www.postgresql.org/docs/current/static/textsearch-features.html#TEXTSEARCH-MANIPULATE-TSQUERY

    Declaration
    public static NpgsqlTsQuery Or(this NpgsqlTsQuery query1, NpgsqlTsQuery query2)
    Parameters
    Type Name Description
    NpgsqlTsQuery query1
    NpgsqlTsQuery query2
    Returns
    Type Description
    NpgsqlTsQuery
    | Improve this Doc View Source

    Rank(NpgsqlTsVector, NpgsqlTsQuery, NpgsqlTsRankingNormalization)

    Calculates the rank of vector for query while normalizing the result according to the behaviors specified by normalization. http://www.postgresql.org/docs/current/static/textsearch-controls.html#TEXTSEARCH-RANKING

    Declaration
    public static float Rank(this NpgsqlTsVector vector, NpgsqlTsQuery query, NpgsqlTsRankingNormalization normalization)
    Parameters
    Type Name Description
    NpgsqlTsVector vector
    NpgsqlTsQuery query
    NpgsqlTsRankingNormalization normalization
    Returns
    Type Description
    float
    | Improve this Doc View Source

    Rank(NpgsqlTsVector, NpgsqlTsQuery)

    Calculates the rank of vector for query. http://www.postgresql.org/docs/current/static/textsearch-controls.html#TEXTSEARCH-RANKING

    Declaration
    public static float Rank(this NpgsqlTsVector vector, NpgsqlTsQuery query)
    Parameters
    Type Name Description
    NpgsqlTsVector vector
    NpgsqlTsQuery query
    Returns
    Type Description
    float
    | Improve this Doc View Source

    Rank(NpgsqlTsVector, float[], NpgsqlTsQuery, NpgsqlTsRankingNormalization)

    Calculates the rank of vector for query while normalizing the result according to the behaviors specified by normalization and using custom weighting for word instances depending on their labels (D, C, B or A). http://www.postgresql.org/docs/current/static/textsearch-controls.html#TEXTSEARCH-RANKING

    Declaration
    public static float Rank(this NpgsqlTsVector vector, float[] weights, NpgsqlTsQuery query, NpgsqlTsRankingNormalization normalization)
    Parameters
    Type Name Description
    NpgsqlTsVector vector
    float[] weights
    NpgsqlTsQuery query
    NpgsqlTsRankingNormalization normalization
    Returns
    Type Description
    float
    | Improve this Doc View Source

    Rank(NpgsqlTsVector, float[], NpgsqlTsQuery)

    Calculates the rank of vector for query with custom weighting for word instances depending on their labels (D, C, B or A). http://www.postgresql.org/docs/current/static/textsearch-controls.html#TEXTSEARCH-RANKING

    Declaration
    public static float Rank(this NpgsqlTsVector vector, float[] weights, NpgsqlTsQuery query)
    Parameters
    Type Name Description
    NpgsqlTsVector vector
    float[] weights
    NpgsqlTsQuery query
    Returns
    Type Description
    float
    | Improve this Doc View Source

    RankCoverDensity(NpgsqlTsVector, NpgsqlTsQuery, NpgsqlTsRankingNormalization)

    Calculates the rank of vector for query using the cover density method while normalizing the result according to the behaviors specified by normalization. http://www.postgresql.org/docs/current/static/textsearch-controls.html#TEXTSEARCH-RANKING

    Declaration
    public static float RankCoverDensity(this NpgsqlTsVector vector, NpgsqlTsQuery query, NpgsqlTsRankingNormalization normalization)
    Parameters
    Type Name Description
    NpgsqlTsVector vector
    NpgsqlTsQuery query
    NpgsqlTsRankingNormalization normalization
    Returns
    Type Description
    float
    | Improve this Doc View Source

    RankCoverDensity(NpgsqlTsVector, NpgsqlTsQuery)

    Calculates the rank of vector for query using the cover density method. http://www.postgresql.org/docs/current/static/textsearch-controls.html#TEXTSEARCH-RANKING

    Declaration
    public static float RankCoverDensity(this NpgsqlTsVector vector, NpgsqlTsQuery query)
    Parameters
    Type Name Description
    NpgsqlTsVector vector
    NpgsqlTsQuery query
    Returns
    Type Description
    float
    | Improve this Doc View Source

    RankCoverDensity(NpgsqlTsVector, float[], NpgsqlTsQuery, NpgsqlTsRankingNormalization)

    Calculates the rank of vector for query using the cover density method while normalizing the result according to the behaviors specified by normalization and using custom weighting for word instances depending on their labels (D, C, B or A). http://www.postgresql.org/docs/current/static/textsearch-controls.html#TEXTSEARCH-RANKING

    Declaration
    public static float RankCoverDensity(this NpgsqlTsVector vector, float[] weights, NpgsqlTsQuery query, NpgsqlTsRankingNormalization normalization)
    Parameters
    Type Name Description
    NpgsqlTsVector vector
    float[] weights
    NpgsqlTsQuery query
    NpgsqlTsRankingNormalization normalization
    Returns
    Type Description
    float
    | Improve this Doc View Source

    RankCoverDensity(NpgsqlTsVector, float[], NpgsqlTsQuery)

    Calculates the rank of vector for query using the cover density method with custom weighting for word instances depending on their labels (D, C, B or A). http://www.postgresql.org/docs/current/static/textsearch-controls.html#TEXTSEARCH-RANKING

    Declaration
    public static float RankCoverDensity(this NpgsqlTsVector vector, float[] weights, NpgsqlTsQuery query)
    Parameters
    Type Name Description
    NpgsqlTsVector vector
    float[] weights
    NpgsqlTsQuery query
    Returns
    Type Description
    float
    | Improve this Doc View Source

    Rewrite(NpgsqlTsQuery, NpgsqlTsQuery, NpgsqlTsQuery)

    Searches query for occurrences of target, and replaces each occurrence with a substitute. All parameters are of type tsquery. http://www.postgresql.org/docs/current/static/textsearch-features.html#TEXTSEARCH-MANIPULATE-TSQUERY

    Declaration
    public static NpgsqlTsQuery Rewrite(this NpgsqlTsQuery query, NpgsqlTsQuery target, NpgsqlTsQuery substitute)
    Parameters
    Type Name Description
    NpgsqlTsQuery query
    NpgsqlTsQuery target
    NpgsqlTsQuery substitute
    Returns
    Type Description
    NpgsqlTsQuery
    | Improve this Doc View Source

    SetWeight(NpgsqlTsVector, Weight, string[])

    Assign weight to elements of vector that are in lexemes and return a new weighted tsvector. http://www.postgresql.org/docs/current/static/textsearch-features.html#TEXTSEARCH-MANIPULATE-TSVECTOR

    Declaration
    public static NpgsqlTsVector SetWeight(this NpgsqlTsVector vector, NpgsqlTsVector.Lexeme.Weight weight, string[] lexemes)
    Parameters
    Type Name Description
    NpgsqlTsVector vector
    NpgsqlTsVector.Lexeme.Weight weight
    string[] lexemes
    Returns
    Type Description
    NpgsqlTsVector
    | Improve this Doc View Source

    SetWeight(NpgsqlTsVector, Weight)

    Assign weight to each element of vector and return a new weighted tsvector. http://www.postgresql.org/docs/current/static/textsearch-features.html#TEXTSEARCH-MANIPULATE-TSVECTOR

    Declaration
    public static NpgsqlTsVector SetWeight(this NpgsqlTsVector vector, NpgsqlTsVector.Lexeme.Weight weight)
    Parameters
    Type Name Description
    NpgsqlTsVector vector
    NpgsqlTsVector.Lexeme.Weight weight
    Returns
    Type Description
    NpgsqlTsVector
    | Improve this Doc View Source

    SetWeight(NpgsqlTsVector, char, string[])

    Assign weight to elements of vector that are in lexemes and return a new weighted tsvector. http://www.postgresql.org/docs/current/static/textsearch-features.html#TEXTSEARCH-MANIPULATE-TSVECTOR

    Declaration
    public static NpgsqlTsVector SetWeight(this NpgsqlTsVector vector, char weight, string[] lexemes)
    Parameters
    Type Name Description
    NpgsqlTsVector vector
    char weight
    string[] lexemes
    Returns
    Type Description
    NpgsqlTsVector
    | Improve this Doc View Source

    SetWeight(NpgsqlTsVector, char)

    Assign weight to each element of vector and return a new weighted tsvector. http://www.postgresql.org/docs/current/static/textsearch-features.html#TEXTSEARCH-MANIPULATE-TSVECTOR

    Declaration
    public static NpgsqlTsVector SetWeight(this NpgsqlTsVector vector, char weight)
    Parameters
    Type Name Description
    NpgsqlTsVector vector
    char weight
    Returns
    Type Description
    NpgsqlTsVector
    | Improve this Doc View Source

    ToNegative(NpgsqlTsQuery)

    Negate a tsquery. Generates the "!!" operator. http://www.postgresql.org/docs/current/static/textsearch-features.html#TEXTSEARCH-MANIPULATE-TSQUERY

    Declaration
    public static NpgsqlTsQuery ToNegative(this NpgsqlTsQuery query)
    Parameters
    Type Name Description
    NpgsqlTsQuery query
    Returns
    Type Description
    NpgsqlTsQuery
    | Improve this Doc View Source

    ToPhrase(NpgsqlTsQuery, NpgsqlTsQuery, int)

    Returns a tsquery that searches for a match to query1 followed by a match to query2 at a distance of distance lexemes using the <N> tsquery operator http://www.postgresql.org/docs/current/static/textsearch-features.html#TEXTSEARCH-MANIPULATE-TSQUERY

    Declaration
    public static NpgsqlTsQuery ToPhrase(this NpgsqlTsQuery query1, NpgsqlTsQuery query2, int distance)
    Parameters
    Type Name Description
    NpgsqlTsQuery query1
    NpgsqlTsQuery query2
    int distance
    Returns
    Type Description
    NpgsqlTsQuery
    | Improve this Doc View Source

    ToPhrase(NpgsqlTsQuery, NpgsqlTsQuery)

    Returns a tsquery that searches for a match to query1 followed by a match to query2. http://www.postgresql.org/docs/current/static/textsearch-features.html#TEXTSEARCH-MANIPULATE-TSQUERY

    Declaration
    public static NpgsqlTsQuery ToPhrase(this NpgsqlTsQuery query1, NpgsqlTsQuery query2)
    Parameters
    Type Name Description
    NpgsqlTsQuery query1
    NpgsqlTsQuery query2
    Returns
    Type Description
    NpgsqlTsQuery
    | Improve this Doc View Source

    ToStripped(NpgsqlTsVector)

    Removes weights and positions from vector and returns a new stripped tsvector. http://www.postgresql.org/docs/current/static/textsearch-features.html#TEXTSEARCH-MANIPULATE-TSVECTOR

    Declaration
    public static NpgsqlTsVector ToStripped(this NpgsqlTsVector vector)
    Parameters
    Type Name Description
    NpgsqlTsVector vector
    Returns
    Type Description
    NpgsqlTsVector
    • Improve this Doc
    • View Source
    In This Article
    Back to top © Copyright 2023 The Npgsql Development Team