Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class MoreLikeThisQuery

    A simple wrapper for MoreLikeThis for use in scenarios where a Lucene.Net.Search.Query object is required eg in custom QueryParser extensions. At query.Rewrite() time the reader is used to construct the actual MoreLikeThis object and obtain the real Lucene.Net.Search.Query object.

    Inheritance
    object
    Query
    MoreLikeThisQuery
    Inherited Members
    Query.Boost
    Query.ToString()
    Query.CreateWeight(IndexSearcher)
    Query.ExtractTerms(ISet<Term>)
    Query.Clone()
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Lucene.Net.Queries.Mlt
    Assembly: Lucene.Net.Queries.dll
    Syntax
    public class MoreLikeThisQuery : Query

    Constructors

    MoreLikeThisQuery(string, string[], Analyzer, string)

    A simple wrapper for MoreLikeThis for use in scenarios where a Lucene.Net.Search.Query object is required eg in custom QueryParser extensions. At query.Rewrite() time the reader is used to construct the actual MoreLikeThis object and obtain the real Lucene.Net.Search.Query object.

    Declaration
    public MoreLikeThisQuery(string likeText, string[] moreLikeFields, Analyzer analyzer, string fieldName)
    Parameters
    Type Name Description
    string likeText
    string[] moreLikeFields

    fields used for similarity measure

    Analyzer analyzer
    string fieldName

    Properties

    Analyzer

    A simple wrapper for MoreLikeThis for use in scenarios where a Lucene.Net.Search.Query object is required eg in custom QueryParser extensions. At query.Rewrite() time the reader is used to construct the actual MoreLikeThis object and obtain the real Lucene.Net.Search.Query object.

    Declaration
    public virtual Analyzer Analyzer { get; set; }
    Property Value
    Type Description
    Analyzer

    LikeText

    A simple wrapper for MoreLikeThis for use in scenarios where a Lucene.Net.Search.Query object is required eg in custom QueryParser extensions. At query.Rewrite() time the reader is used to construct the actual MoreLikeThis object and obtain the real Lucene.Net.Search.Query object.

    Declaration
    public virtual string LikeText { get; set; }
    Property Value
    Type Description
    string

    MaxQueryTerms

    A simple wrapper for MoreLikeThis for use in scenarios where a Lucene.Net.Search.Query object is required eg in custom QueryParser extensions. At query.Rewrite() time the reader is used to construct the actual MoreLikeThis object and obtain the real Lucene.Net.Search.Query object.

    Declaration
    public virtual int MaxQueryTerms { get; set; }
    Property Value
    Type Description
    int

    MinDocFreq

    A simple wrapper for MoreLikeThis for use in scenarios where a Lucene.Net.Search.Query object is required eg in custom QueryParser extensions. At query.Rewrite() time the reader is used to construct the actual MoreLikeThis object and obtain the real Lucene.Net.Search.Query object.

    Declaration
    public virtual int MinDocFreq { get; set; }
    Property Value
    Type Description
    int

    MinTermFrequency

    A simple wrapper for MoreLikeThis for use in scenarios where a Lucene.Net.Search.Query object is required eg in custom QueryParser extensions. At query.Rewrite() time the reader is used to construct the actual MoreLikeThis object and obtain the real Lucene.Net.Search.Query object.

    Declaration
    public virtual int MinTermFrequency { get; set; }
    Property Value
    Type Description
    int

    MoreLikeFields

    A simple wrapper for MoreLikeThis for use in scenarios where a Lucene.Net.Search.Query object is required eg in custom QueryParser extensions. At query.Rewrite() time the reader is used to construct the actual MoreLikeThis object and obtain the real Lucene.Net.Search.Query object.

    Declaration
    public virtual string[] MoreLikeFields { get; set; }
    Property Value
    Type Description
    string[]

    PercentTermsToMatch

    A simple wrapper for MoreLikeThis for use in scenarios where a Lucene.Net.Search.Query object is required eg in custom QueryParser extensions. At query.Rewrite() time the reader is used to construct the actual MoreLikeThis object and obtain the real Lucene.Net.Search.Query object.

    Declaration
    public virtual float PercentTermsToMatch { get; set; }
    Property Value
    Type Description
    float

    StopWords

    A simple wrapper for MoreLikeThis for use in scenarios where a Lucene.Net.Search.Query object is required eg in custom QueryParser extensions. At query.Rewrite() time the reader is used to construct the actual MoreLikeThis object and obtain the real Lucene.Net.Search.Query object.

    Declaration
    public virtual ISet<string> StopWords { get; set; }
    Property Value
    Type Description
    ISet<string>

    Methods

    Equals(object)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current object.

    Returns
    Type Description
    bool

    true if the specified object is equal to the current object; otherwise, false.

    Overrides
    Query.Equals(object)

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    Overrides
    Lucene.Net.Search.Query.GetHashCode()

    Rewrite(IndexReader)

    Expert: called to re-write queries into primitive queries. For example, a Lucene.Net.Search.PrefixQuery will be rewritten into a Lucene.Net.Search.BooleanQuery that consists of Lucene.Net.Search.TermQuerys.

    Declaration
    public override Query Rewrite(IndexReader reader)
    Parameters
    Type Name Description
    IndexReader reader
    Returns
    Type Description
    Query
    Overrides
    Lucene.Net.Search.Query.Rewrite(Lucene.Net.Index.IndexReader)

    ToString(string)

    ToString(string)

    Declaration
    public override string ToString(string field)
    Parameters
    Type Name Description
    string field
    Returns
    Type Description
    string
    Overrides
    Query.ToString(string)
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.