Lucene.Net
3.0.3
Lucene.Net is a .NET port of the Java Lucene Indexing Library
|
Expert: A Query that sets the scores of document to the values obtained from a ValueSource. This query provides a score for each and every undeleted document in the index. The value source can be based on a (cached) value of an indexed field, but it can also be based on an external source, e.g. values read from an external database. Score is set as: Score(doc,query) = query.getBoost()2 * valueSource(doc). More...
Inherits Lucene.Net.Search.Query.
Inherited by Lucene.Net.Search.Function.FieldScoreQuery.
Classes | |
class | ValueSourceWeight |
Public Member Functions | |
ValueSourceQuery (ValueSource valSrc) | |
Create a value source query | |
override 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. | |
override 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. | |
override Weight | CreateWeight (Searcher searcher) |
Expert: Constructs an appropriate Weight implementation for this query. | |
override 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 bool | Equals (System.Object o) |
Returns true if o is equal to this. | |
override int | GetHashCode () |
Returns a hash code value for this object. | |
override System.Object | Clone () |
Returns a clone of this query. | |
Public Member Functions inherited from Lucene.Net.Search.Query | |
override System.String | ToString () |
Prints a query to a string. | |
virtual Weight | Weight (Searcher searcher) |
Expert: Constructs and initializes a Weight for a top-level query. | |
virtual Query | Combine (Query[] queries) |
Expert: called when re-writing queries under MultiSearcher. | |
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. | |
override int | GetHashCode () |
override bool | Equals (System.Object obj) |
Additional Inherited Members | |
Static Public Member Functions inherited from Lucene.Net.Search.Query | |
static Query | MergeBooleanQueries (params BooleanQuery[] queries) |
Expert: merges the clauses of a set of BooleanQuery's into a single BooleanQuery. | |
Properties inherited from Lucene.Net.Search.Query | |
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. | |
Expert: A Query that sets the scores of document to the values obtained from a ValueSource.
This query provides a score for each and every undeleted document in the index.
The value source can be based on a (cached) value of an indexed field, but it can also be based on an external source, e.g. values read from an external database.
Score is set as: Score(doc,query) = query.getBoost()2 * valueSource(doc).
<font color="#FF0000"> WARNING: The status of the Search.Function package is experimental. The APIs introduced here might change in the future and will not be supported anymore in such a case.</font>
Definition at line 44 of file ValueSourceQuery.cs.
Lucene.Net.Search.Function.ValueSourceQuery.ValueSourceQuery | ( | ValueSource | valSrc | ) |
Create a value source query
valSrc | provides the values defines the function to be used for scoring |
Definition at line 51 of file ValueSourceQuery.cs.
|
virtual |
Returns a clone of this query.
Reimplemented from Lucene.Net.Search.Query.
Definition at line 230 of file ValueSourceQuery.cs.
|
virtual |
Expert: Constructs an appropriate Weight implementation for this query.
Only implemented by primitive queries, which re-write to themselves.
Reimplemented from Lucene.Net.Search.Query.
Definition at line 203 of file ValueSourceQuery.cs.
override bool Lucene.Net.Search.Function.ValueSourceQuery.Equals | ( | System.Object | o | ) |
Returns true if o
is equal to this.
Definition at line 214 of file ValueSourceQuery.cs.
|
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 from Lucene.Net.Search.Query.
Definition at line 63 of file ValueSourceQuery.cs.
override int Lucene.Net.Search.Function.ValueSourceQuery.GetHashCode | ( | ) |
Returns a hash code value for this object.
Definition at line 225 of file ValueSourceQuery.cs.
|
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 from Lucene.Net.Search.Query.
Definition at line 57 of file ValueSourceQuery.cs.
|
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:
Implements Lucene.Net.Search.Query.
Definition at line 208 of file ValueSourceQuery.cs.