org.apache.lucene.search
Class Query
java.lang.Object
|
+--org.apache.lucene.search.Query
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- BooleanQuery, MultiTermQuery, PhraseQuery, PrefixQuery, RangeQuery, TermQuery
- public abstract class Query
- extends Object
- implements Serializable
The abstract base class for queries.
Instantiable subclasses are:
A parser for queries is contained in:
- See Also:
- Serialized Form
Field Summary |
protected float |
boost
|
Constructor Summary |
Query()
|
Method Summary |
float |
getBoost()
Gets the boost for this term. |
void |
setBoost(float b)
Sets the boost for this term to b . |
abstract String |
toString(String field)
Prints a query to a string, with field as the default field
for terms. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
boost
protected float boost
Query
public Query()
setBoost
public void setBoost(float b)
- Sets the boost for this term to
b
. Documents containing
this term will (in addition to the normal weightings) have their score
multiplied by b
.
getBoost
public float getBoost()
- Gets the boost for this term. Documents containing
this term will (in addition to the normal weightings) have their score
multiplied by
b
. The boost is 1.0 by default.
toString
public abstract String toString(String field)
- Prints a query to a string, with
field
as the default field
for terms.
The representation used is one that is readable by
QueryParser
(although, if the query was created by the parser, the printed
representation may not be exactly what was parsed).
Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.