Class BoostQuery
- java.lang.Object
-
- com.lucidworks.search.dsl.DslBase
-
- com.lucidworks.search.dsl.request.DslCloneable
-
- com.lucidworks.search.dsl.request.query.Query
-
- com.lucidworks.search.dsl.request.query.BoostQuery
-
public class BoostQuery extends Query
A boost query. BoostsgetQuery()
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringTYPE
-
Constructor Summary
Constructors Constructor Description BoostQuery(Query boostedQuery, java.lang.Double boost)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BoostQueryclone()java.lang.DoublegetBoost()java.util.List<Query>getChildQueries()Returns all the children of the query in question.QuerygetQuery()booleanisEmptyQuery()booleanremoveChildQuery(Query toRemove)Remove 'toRemove', if 'toRemove' is currently a child of this Query object.booleanreplaceChildQuery(Query toReplace, Query replacement)Swap 'replacement' in as a replacement, if 'toReplace' is currently a child of this Query object.voidsetBoost(double boost)-
Methods inherited from class com.lucidworks.search.dsl.request.DslCloneable
clone, deepClone
-
-
-
-
Field Detail
-
TYPE
public static final java.lang.String TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BoostQuery
public BoostQuery(Query boostedQuery, java.lang.Double boost)
-
-
Method Detail
-
getQuery
public Query getQuery()
- Returns:
- a query to be boosted
-
getBoost
public java.lang.Double getBoost()
- Returns:
- a boost value
-
setBoost
public void setBoost(double boost)
-
getChildQueries
public java.util.List<Query> getChildQueries()
Description copied from class:QueryReturns all the children of the query in question. The returnedListis provided as a copy - changes made to it do not impact the originating Query object in any way.- Specified by:
getChildQueriesin classQuery
-
replaceChildQuery
public boolean replaceChildQuery(Query toReplace, Query replacement)
Description copied from class:QuerySwap 'replacement' in as a replacement, if 'toReplace' is currently a child of this Query object. Because a tree of Query objects might conceivably have repeated clauses, this method is implemented to test 'toReplace' using reference-equality instead of value-equality.- Specified by:
replaceChildQueryin classQuery- Returns:
- true if a replacement was made, false otherwise.
-
removeChildQuery
public boolean removeChildQuery(Query toRemove)
Description copied from class:QueryRemove 'toRemove', if 'toRemove' is currently a child of this Query object. Because a tree of Query objects might conceivably have repeated clauses, this method is implemented to test 'toRemove' using reference-equality instead of value-equality.- Specified by:
removeChildQueryin classQuery- Returns:
- true if a removal was made, false otherwise.
-
isEmptyQuery
public boolean isEmptyQuery()
- Specified by:
isEmptyQueryin classQuery- Returns:
- true if this query is now essentially "empty" (doesn't affect query logic at all) and can now be removed from the query tree. This can happen, for example, if all child queries were removed and the query logic depends on having at least one child query.
-
clone
public BoostQuery clone()
-
-