Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class SpanNearClauseFactory

    SpanNearClauseFactory:

    Operations:
    • create for a field name and an indexreader.
    • add a weighted Term - this should add a corresponding SpanTermQuery, or increase the weight of an existing one.
    • add a weighted subquery SpanNearQuery
    • create a clause for SpanNearQuery from the things added above.

    For this, create an array of SpanQuery's from the added ones. The clause normally is a SpanOrQuery over the added subquery SpanNearQuery the SpanTermQuery's for the added Term's

    When it is necessary to suppress double subqueries as much as possible: GetHashCode() and Equals() on unweighted SpanQuery are needed (possibly via GetTerms(), the terms are individually hashable). Idem SpanNearQuery: hash on the subqueries and the slop. Evt. merge SpanNearQuery's by adding the weights of the corresponding subqueries.

    To be determined: Are SpanQuery weights handled correctly during search by Lucene? Should the resulting SpanOrQuery be sorted? Could other SpanQueries be added for use in this factory: - SpanOrQuery: in principle yes, but it only has access to it's terms via getTerms(); are the corresponding weights available? - SpanFirstQuery: treat similar to subquery SpanNearQuery. (ok?) - SpanNotQuery: treat similar to subquery SpanNearQuery. (ok?)

    Factory for Lucene.Net.Search.Spans.SpanOrQuery

    Inheritance
    object
    SpanNearClauseFactory
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.QueryParsers.Surround.Query
    Assembly: Lucene.Net.QueryParser.dll
    Syntax
    public class SpanNearClauseFactory

    Constructors

    SpanNearClauseFactory(IndexReader, string, BasicQueryFactory)

    SpanNearClauseFactory:

    Operations:
    • create for a field name and an indexreader.
    • add a weighted Term - this should add a corresponding SpanTermQuery, or increase the weight of an existing one.
    • add a weighted subquery SpanNearQuery
    • create a clause for SpanNearQuery from the things added above.

    For this, create an array of SpanQuery's from the added ones. The clause normally is a SpanOrQuery over the added subquery SpanNearQuery the SpanTermQuery's for the added Term's

    When it is necessary to suppress double subqueries as much as possible: GetHashCode() and Equals() on unweighted SpanQuery are needed (possibly via GetTerms(), the terms are individually hashable). Idem SpanNearQuery: hash on the subqueries and the slop. Evt. merge SpanNearQuery's by adding the weights of the corresponding subqueries.

    To be determined: Are SpanQuery weights handled correctly during search by Lucene? Should the resulting SpanOrQuery be sorted? Could other SpanQueries be added for use in this factory: - SpanOrQuery: in principle yes, but it only has access to it's terms via getTerms(); are the corresponding weights available? - SpanFirstQuery: treat similar to subquery SpanNearQuery. (ok?) - SpanNotQuery: treat similar to subquery SpanNearQuery. (ok?)

    Factory for Lucene.Net.Search.Spans.SpanOrQuery

    Declaration
    public SpanNearClauseFactory(IndexReader reader, string fieldName, BasicQueryFactory qf)
    Parameters
    Type Name Description
    IndexReader reader
    string fieldName
    BasicQueryFactory qf

    Properties

    BasicQueryFactory

    SpanNearClauseFactory:

    Operations:
    • create for a field name and an indexreader.
    • add a weighted Term - this should add a corresponding SpanTermQuery, or increase the weight of an existing one.
    • add a weighted subquery SpanNearQuery
    • create a clause for SpanNearQuery from the things added above.

    For this, create an array of SpanQuery's from the added ones. The clause normally is a SpanOrQuery over the added subquery SpanNearQuery the SpanTermQuery's for the added Term's

    When it is necessary to suppress double subqueries as much as possible: GetHashCode() and Equals() on unweighted SpanQuery are needed (possibly via GetTerms(), the terms are individually hashable). Idem SpanNearQuery: hash on the subqueries and the slop. Evt. merge SpanNearQuery's by adding the weights of the corresponding subqueries.

    To be determined: Are SpanQuery weights handled correctly during search by Lucene? Should the resulting SpanOrQuery be sorted? Could other SpanQueries be added for use in this factory: - SpanOrQuery: in principle yes, but it only has access to it's terms via getTerms(); are the corresponding weights available? - SpanFirstQuery: treat similar to subquery SpanNearQuery. (ok?) - SpanNotQuery: treat similar to subquery SpanNearQuery. (ok?)

    Factory for Lucene.Net.Search.Spans.SpanOrQuery

    Declaration
    public virtual BasicQueryFactory BasicQueryFactory { get; }
    Property Value
    Type Description
    BasicQueryFactory

    Count

    SpanNearClauseFactory:

    Operations:
    • create for a field name and an indexreader.
    • add a weighted Term - this should add a corresponding SpanTermQuery, or increase the weight of an existing one.
    • add a weighted subquery SpanNearQuery
    • create a clause for SpanNearQuery from the things added above.

    For this, create an array of SpanQuery's from the added ones. The clause normally is a SpanOrQuery over the added subquery SpanNearQuery the SpanTermQuery's for the added Term's

    When it is necessary to suppress double subqueries as much as possible: GetHashCode() and Equals() on unweighted SpanQuery are needed (possibly via GetTerms(), the terms are individually hashable). Idem SpanNearQuery: hash on the subqueries and the slop. Evt. merge SpanNearQuery's by adding the weights of the corresponding subqueries.

    To be determined: Are SpanQuery weights handled correctly during search by Lucene? Should the resulting SpanOrQuery be sorted? Could other SpanQueries be added for use in this factory: - SpanOrQuery: in principle yes, but it only has access to it's terms via getTerms(); are the corresponding weights available? - SpanFirstQuery: treat similar to subquery SpanNearQuery. (ok?) - SpanNotQuery: treat similar to subquery SpanNearQuery. (ok?)

    Factory for Lucene.Net.Search.Spans.SpanOrQuery

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

    FieldName

    SpanNearClauseFactory:

    Operations:
    • create for a field name and an indexreader.
    • add a weighted Term - this should add a corresponding SpanTermQuery, or increase the weight of an existing one.
    • add a weighted subquery SpanNearQuery
    • create a clause for SpanNearQuery from the things added above.

    For this, create an array of SpanQuery's from the added ones. The clause normally is a SpanOrQuery over the added subquery SpanNearQuery the SpanTermQuery's for the added Term's

    When it is necessary to suppress double subqueries as much as possible: GetHashCode() and Equals() on unweighted SpanQuery are needed (possibly via GetTerms(), the terms are individually hashable). Idem SpanNearQuery: hash on the subqueries and the slop. Evt. merge SpanNearQuery's by adding the weights of the corresponding subqueries.

    To be determined: Are SpanQuery weights handled correctly during search by Lucene? Should the resulting SpanOrQuery be sorted? Could other SpanQueries be added for use in this factory: - SpanOrQuery: in principle yes, but it only has access to it's terms via getTerms(); are the corresponding weights available? - SpanFirstQuery: treat similar to subquery SpanNearQuery. (ok?) - SpanNotQuery: treat similar to subquery SpanNearQuery. (ok?)

    Factory for Lucene.Net.Search.Spans.SpanOrQuery

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

    IndexReader

    SpanNearClauseFactory:

    Operations:
    • create for a field name and an indexreader.
    • add a weighted Term - this should add a corresponding SpanTermQuery, or increase the weight of an existing one.
    • add a weighted subquery SpanNearQuery
    • create a clause for SpanNearQuery from the things added above.

    For this, create an array of SpanQuery's from the added ones. The clause normally is a SpanOrQuery over the added subquery SpanNearQuery the SpanTermQuery's for the added Term's

    When it is necessary to suppress double subqueries as much as possible: GetHashCode() and Equals() on unweighted SpanQuery are needed (possibly via GetTerms(), the terms are individually hashable). Idem SpanNearQuery: hash on the subqueries and the slop. Evt. merge SpanNearQuery's by adding the weights of the corresponding subqueries.

    To be determined: Are SpanQuery weights handled correctly during search by Lucene? Should the resulting SpanOrQuery be sorted? Could other SpanQueries be added for use in this factory: - SpanOrQuery: in principle yes, but it only has access to it's terms via getTerms(); are the corresponding weights available? - SpanFirstQuery: treat similar to subquery SpanNearQuery. (ok?) - SpanNotQuery: treat similar to subquery SpanNearQuery. (ok?)

    Factory for Lucene.Net.Search.Spans.SpanOrQuery

    Declaration
    public virtual IndexReader IndexReader { get; }
    Property Value
    Type Description
    IndexReader

    Methods

    AddSpanQuery(Query)

    SpanNearClauseFactory:

    Operations:
    • create for a field name and an indexreader.
    • add a weighted Term - this should add a corresponding SpanTermQuery, or increase the weight of an existing one.
    • add a weighted subquery SpanNearQuery
    • create a clause for SpanNearQuery from the things added above.

    For this, create an array of SpanQuery's from the added ones. The clause normally is a SpanOrQuery over the added subquery SpanNearQuery the SpanTermQuery's for the added Term's

    When it is necessary to suppress double subqueries as much as possible: GetHashCode() and Equals() on unweighted SpanQuery are needed (possibly via GetTerms(), the terms are individually hashable). Idem SpanNearQuery: hash on the subqueries and the slop. Evt. merge SpanNearQuery's by adding the weights of the corresponding subqueries.

    To be determined: Are SpanQuery weights handled correctly during search by Lucene? Should the resulting SpanOrQuery be sorted? Could other SpanQueries be added for use in this factory: - SpanOrQuery: in principle yes, but it only has access to it's terms via getTerms(); are the corresponding weights available? - SpanFirstQuery: treat similar to subquery SpanNearQuery. (ok?) - SpanNotQuery: treat similar to subquery SpanNearQuery. (ok?)

    Factory for Lucene.Net.Search.Spans.SpanOrQuery

    Declaration
    public virtual void AddSpanQuery(Query q)
    Parameters
    Type Name Description
    Query q

    AddSpanQueryWeighted(SpanQuery, float)

    SpanNearClauseFactory:

    Operations:
    • create for a field name and an indexreader.
    • add a weighted Term - this should add a corresponding SpanTermQuery, or increase the weight of an existing one.
    • add a weighted subquery SpanNearQuery
    • create a clause for SpanNearQuery from the things added above.

    For this, create an array of SpanQuery's from the added ones. The clause normally is a SpanOrQuery over the added subquery SpanNearQuery the SpanTermQuery's for the added Term's

    When it is necessary to suppress double subqueries as much as possible: GetHashCode() and Equals() on unweighted SpanQuery are needed (possibly via GetTerms(), the terms are individually hashable). Idem SpanNearQuery: hash on the subqueries and the slop. Evt. merge SpanNearQuery's by adding the weights of the corresponding subqueries.

    To be determined: Are SpanQuery weights handled correctly during search by Lucene? Should the resulting SpanOrQuery be sorted? Could other SpanQueries be added for use in this factory: - SpanOrQuery: in principle yes, but it only has access to it's terms via getTerms(); are the corresponding weights available? - SpanFirstQuery: treat similar to subquery SpanNearQuery. (ok?) - SpanNotQuery: treat similar to subquery SpanNearQuery. (ok?)

    Factory for Lucene.Net.Search.Spans.SpanOrQuery

    Declaration
    protected virtual void AddSpanQueryWeighted(SpanQuery sq, float weight)
    Parameters
    Type Name Description
    SpanQuery sq
    float weight

    AddTermWeighted(Term, float)

    SpanNearClauseFactory:

    Operations:
    • create for a field name and an indexreader.
    • add a weighted Term - this should add a corresponding SpanTermQuery, or increase the weight of an existing one.
    • add a weighted subquery SpanNearQuery
    • create a clause for SpanNearQuery from the things added above.

    For this, create an array of SpanQuery's from the added ones. The clause normally is a SpanOrQuery over the added subquery SpanNearQuery the SpanTermQuery's for the added Term's

    When it is necessary to suppress double subqueries as much as possible: GetHashCode() and Equals() on unweighted SpanQuery are needed (possibly via GetTerms(), the terms are individually hashable). Idem SpanNearQuery: hash on the subqueries and the slop. Evt. merge SpanNearQuery's by adding the weights of the corresponding subqueries.

    To be determined: Are SpanQuery weights handled correctly during search by Lucene? Should the resulting SpanOrQuery be sorted? Could other SpanQueries be added for use in this factory: - SpanOrQuery: in principle yes, but it only has access to it's terms via getTerms(); are the corresponding weights available? - SpanFirstQuery: treat similar to subquery SpanNearQuery. (ok?) - SpanNotQuery: treat similar to subquery SpanNearQuery. (ok?)

    Factory for Lucene.Net.Search.Spans.SpanOrQuery

    Declaration
    public virtual void AddTermWeighted(Term t, float weight)
    Parameters
    Type Name Description
    Term t
    float weight

    Clear()

    SpanNearClauseFactory:

    Operations:
    • create for a field name and an indexreader.
    • add a weighted Term - this should add a corresponding SpanTermQuery, or increase the weight of an existing one.
    • add a weighted subquery SpanNearQuery
    • create a clause for SpanNearQuery from the things added above.

    For this, create an array of SpanQuery's from the added ones. The clause normally is a SpanOrQuery over the added subquery SpanNearQuery the SpanTermQuery's for the added Term's

    When it is necessary to suppress double subqueries as much as possible: GetHashCode() and Equals() on unweighted SpanQuery are needed (possibly via GetTerms(), the terms are individually hashable). Idem SpanNearQuery: hash on the subqueries and the slop. Evt. merge SpanNearQuery's by adding the weights of the corresponding subqueries.

    To be determined: Are SpanQuery weights handled correctly during search by Lucene? Should the resulting SpanOrQuery be sorted? Could other SpanQueries be added for use in this factory: - SpanOrQuery: in principle yes, but it only has access to it's terms via getTerms(); are the corresponding weights available? - SpanFirstQuery: treat similar to subquery SpanNearQuery. (ok?) - SpanNotQuery: treat similar to subquery SpanNearQuery. (ok?)

    Factory for Lucene.Net.Search.Spans.SpanOrQuery

    Declaration
    public virtual void Clear()

    MakeSpanClause()

    SpanNearClauseFactory:

    Operations:
    • create for a field name and an indexreader.
    • add a weighted Term - this should add a corresponding SpanTermQuery, or increase the weight of an existing one.
    • add a weighted subquery SpanNearQuery
    • create a clause for SpanNearQuery from the things added above.

    For this, create an array of SpanQuery's from the added ones. The clause normally is a SpanOrQuery over the added subquery SpanNearQuery the SpanTermQuery's for the added Term's

    When it is necessary to suppress double subqueries as much as possible: GetHashCode() and Equals() on unweighted SpanQuery are needed (possibly via GetTerms(), the terms are individually hashable). Idem SpanNearQuery: hash on the subqueries and the slop. Evt. merge SpanNearQuery's by adding the weights of the corresponding subqueries.

    To be determined: Are SpanQuery weights handled correctly during search by Lucene? Should the resulting SpanOrQuery be sorted? Could other SpanQueries be added for use in this factory: - SpanOrQuery: in principle yes, but it only has access to it's terms via getTerms(); are the corresponding weights available? - SpanFirstQuery: treat similar to subquery SpanNearQuery. (ok?) - SpanNotQuery: treat similar to subquery SpanNearQuery. (ok?)

    Factory for Lucene.Net.Search.Spans.SpanOrQuery

    Declaration
    public virtual SpanQuery MakeSpanClause()
    Returns
    Type Description
    SpanQuery
    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.