Lucene.Net
3.0.3
Lucene.Net is a .NET port of the Java Lucene Indexing Library
|
The abstract base class for queries. Instantiable subclasses are:
Inherits ICloneable.
Inherited by Lucene.Net.Search.BooleanQuery, Lucene.Net.Search.BoostingQuery, Lucene.Net.Search.ConstantScoreQuery, Lucene.Net.Search.DisjunctionMaxQuery, Lucene.Net.Search.FilteredQuery, Lucene.Net.Search.Function.CustomScoreQuery, Lucene.Net.Search.Function.ValueSourceQuery, Lucene.Net.Search.FuzzyLikeThisQuery, Lucene.Net.Search.MatchAllDocsQuery, Lucene.Net.Search.MultiPhraseQuery, Lucene.Net.Search.MultiTermQuery, Lucene.Net.Search.PhraseQuery, Lucene.Net.Search.Similar.MoreLikeThisQuery, Lucene.Net.Search.Spans.SpanQuery, Lucene.Net.Search.TermQuery, and Lucene.Net.Spatial.Util.FunctionQuery.
Public Member Functions | |
abstract System.String | ToString (System.String field) |
Prints a query to a string, with field assumed to be the default field and omitted. The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:
| |
override System.String | ToString () |
Prints a query to a string. | |
virtual Weight | CreateWeight (Searcher searcher) |
Expert: Constructs an appropriate Weight implementation for this query. | |
virtual Weight | Weight (Searcher searcher) |
Expert: Constructs and initializes a Weight for a top-level query. | |
virtual Query | Rewrite (IndexReader reader) |
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys. | |
virtual Query | Combine (Query[] queries) |
Expert: called when re-writing queries under MultiSearcher. | |
virtual void | ExtractTerms (System.Collections.Generic.ISet< Term > terms) |
Expert: adds all terms occuring in this query to the terms set. Only works if this query is in its rewritten form. | |
virtual Similarity | GetSimilarity (Searcher searcher) |
Expert: Returns the Similarity implementation to be used for this query. Subclasses may override this method to specify their own Similarity implementation, perhaps one that delegates through that of the Searcher. By default the Searcher's Similarity implementation is returned. | |
virtual System.Object | Clone () |
Returns a clone of this query. | |
override int | GetHashCode () |
override bool | Equals (System.Object obj) |
Static Public Member Functions | |
static Query | MergeBooleanQueries (params BooleanQuery[] queries) |
Expert: merges the clauses of a set of BooleanQuery's into a single BooleanQuery. | |
Properties | |
virtual float | Boost [get, set] |
Gets or sets the boost for this query clause to b . Documents matching this clause will (in addition to the normal weightings) have their score multiplied by b . The boost is 1.0 by default. | |
The abstract base class for queries.
Instantiable subclasses are:
A parser for queries is contained in:
|
virtual |
Returns a clone of this query.
Reimplemented in Lucene.Net.Search.BooleanQuery, Lucene.Net.Search.DisjunctionMaxQuery, Lucene.Net.Search.Function.ValueSourceQuery, Lucene.Net.Search.ConstantScoreQuery, Lucene.Net.Search.Spans.SpanOrQuery, Lucene.Net.Search.Spans.SpanNotQuery, Lucene.Net.Search.Spans.SpanNearQuery, Lucene.Net.Search.Spans.SpanFirstQuery, and Lucene.Net.Search.Function.CustomScoreQuery.
Expert: called when re-writing queries under MultiSearcher.
Create a single query suitable for use by all subsearchers (in 1-1 correspondence with queries). This is an optimization of the OR of all queries. We handle the common optimization cases of equal queries and overlapping clauses of boolean OR queries (as generated by MultiTermQuery.rewrite()). Be careful overriding this method as queries[0] determines which method will be called and is not necessarily of the same type as the other queries.
Expert: Constructs an appropriate Weight implementation for this query.
Only implemented by primitive queries, which re-write to themselves.
Reimplemented in Lucene.Net.Search.Function.CustomScoreQuery, Lucene.Net.Search.BooleanQuery, Lucene.Net.Search.MultiPhraseQuery, Lucene.Net.Search.PhraseQuery, Lucene.Net.Search.FilteredQuery, Lucene.Net.Search.DisjunctionMaxQuery, Lucene.Net.Search.Function.ValueSourceQuery, Lucene.Net.Search.ConstantScoreQuery, Lucene.Net.Search.TermQuery, Lucene.Net.Spatial.Util.FunctionQuery, Lucene.Net.Search.MatchAllDocsQuery, Lucene.Net.Search.Spans.FieldMaskingSpanQuery, and Lucene.Net.Search.Spans.SpanQuery.
override bool Lucene.Net.Search.Query.Equals | ( | System.Object | obj | ) |
|
virtual |
Expert: adds all terms occuring in this query to the terms set. Only works if this query is in its rewritten form.
<throws> UnsupportedOperationException if this query is not yet rewritten </throws>
Reimplemented in Lucene.Net.Search.BooleanQuery, Lucene.Net.Search.PhraseQuery, Lucene.Net.Search.DisjunctionMaxQuery, Lucene.Net.Search.FilteredQuery, Lucene.Net.Search.TermQuery, Lucene.Net.Search.Spans.SpanOrQuery, Lucene.Net.Search.Spans.SpanNotQuery, Lucene.Net.Search.MatchAllDocsQuery, Lucene.Net.Search.Spans.SpanFirstQuery, Lucene.Net.Search.MultiPhraseQuery, Lucene.Net.Search.Function.CustomScoreQuery, Lucene.Net.Search.Spans.FieldMaskingSpanQuery, Lucene.Net.Search.Spans.SpanNearQuery, Lucene.Net.Search.Function.ValueSourceQuery, Lucene.Net.Spatial.Util.FunctionQuery, Lucene.Net.Search.Spans.SpanTermQuery, and Lucene.Net.Search.ConstantScoreQuery.
|
virtual |
Expert: Returns the Similarity implementation to be used for this query. Subclasses may override this method to specify their own Similarity implementation, perhaps one that delegates through that of the Searcher. By default the Searcher's Similarity implementation is returned.
Reimplemented in Lucene.Net.Search.BooleanQuery, and Lucene.Net.Search.Spans.FieldMaskingSpanQuery.
|
static |
Expert: merges the clauses of a set of BooleanQuery's into a single BooleanQuery.
A utility for use by Combine(Query[]) implementations.
|
virtual |
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.
Reimplemented in Lucene.Net.Search.BooleanQuery, Lucene.Net.Search.MultiTermQuery, Lucene.Net.Search.MultiPhraseQuery, Lucene.Net.Search.FuzzyLikeThisQuery, Lucene.Net.Search.FilteredQuery, Lucene.Net.Search.DisjunctionMaxQuery, Lucene.Net.Search.Spans.SpanOrQuery, Lucene.Net.Search.Spans.SpanNotQuery, Lucene.Net.Search.Spans.SpanFirstQuery, Lucene.Net.Search.Spans.SpanNearQuery, Lucene.Net.Search.FuzzyQuery, Lucene.Net.Search.Spans.FieldMaskingSpanQuery, Lucene.Net.Search.Function.CustomScoreQuery, Lucene.Net.Search.WildcardQuery, Lucene.Net.Search.BoostingQuery, Lucene.Net.Search.Similar.MoreLikeThisQuery, Contrib.Regex.SpanRegexQuery, Lucene.Net.Search.Function.ValueSourceQuery, and Lucene.Net.Search.ConstantScoreQuery.
|
pure virtual |
Prints a query to a string, with field
assumed to be the default field and omitted. The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:
Implemented in Lucene.Net.Search.BooleanQuery, Lucene.Net.Search.MultiPhraseQuery, Lucene.Net.Search.PhraseQuery, Lucene.Net.Search.DisjunctionMaxQuery, Lucene.Net.Search.FilteredQuery, Lucene.Net.Search.Spans.SpanOrQuery, Lucene.Net.Search.NumericRangeQuery< T >, Lucene.Net.Search.TermQuery, Lucene.Net.Search.Function.ValueSourceQuery, Lucene.Net.Search.FuzzyQuery, Lucene.Net.Search.Spans.SpanNotQuery, Lucene.Net.Search.MatchAllDocsQuery, Lucene.Net.Search.TermRangeQuery, Lucene.Net.Search.Spans.SpanFirstQuery, Lucene.Net.Search.Function.CustomScoreQuery, Lucene.Net.Search.Spans.FieldMaskingSpanQuery, Lucene.Net.Search.Spans.SpanNearQuery, Lucene.Net.Search.WildcardQuery, Lucene.Net.Search.PrefixQuery, and Lucene.Net.Search.Spans.SpanTermQuery.
override System.String Lucene.Net.Search.Query.ToString | ( | ) |
|
getset |