public class ConnectedMoreLikeThisContext extends Object implements MoreLikeThisContext
Constructor and Description |
---|
ConnectedMoreLikeThisContext(QueryBuildingContext context) |
Modifier and Type | Method and Description |
---|---|
MoreLikeThisContext |
boostedTo(float boost)
Boost the query to a given value
Most of the time positive float:
- lower than 1 to diminish the weight
- higher than 1 to increase the weight
Could be negative but not unless you understand what is going on (advanced)
|
MoreLikeThisTerminalMatchingContext |
comparingAllFields()
Match the content using "all" of the indexed fields of the entity.
|
MoreLikeThisOpenedMatchingContext |
comparingField(String fieldName)
Match the content using the selected field of the entity.
|
MoreLikeThisOpenedMatchingContext |
comparingFields(String... fieldNames)
Match the content using the selected fields of the entity.
|
MoreLikeThisContext |
excludeEntityUsedForComparison()
Exclude the entity used for comparison from the results
|
MoreLikeThisContext |
favorSignificantTermsWithFactor(float factor)
Boost significant terms relative to their scores.
|
MoreLikeThisContext |
filteredBy(Query filter)
Filter the query results with the given Query instance
|
MoreLikeThisContext |
withConstantScore()
All results matching the query have a constant score equals to the boost
FIXME is that true?
|
public ConnectedMoreLikeThisContext(QueryBuildingContext context)
public MoreLikeThisContext excludeEntityUsedForComparison()
MoreLikeThisContext
excludeEntityUsedForComparison
in interface MoreLikeThisContext
this
for method chainingpublic MoreLikeThisContext favorSignificantTermsWithFactor(float factor)
MoreLikeThisContext
favorSignificantTermsWithFactor
in interface MoreLikeThisContext
factor
- the factor valuethis
for method chainingpublic MoreLikeThisTerminalMatchingContext comparingAllFields()
MoreLikeThisContext
comparingAllFields
in interface MoreLikeThisContext
this
for method chainingpublic MoreLikeThisOpenedMatchingContext comparingFields(String... fieldNames)
MoreLikeThisContext
comparingFields
in interface MoreLikeThisContext
fieldNames
- the names of the fields to use for the comparisonthis
for method chainingpublic MoreLikeThisOpenedMatchingContext comparingField(String fieldName)
MoreLikeThisContext
comparingField
in interface MoreLikeThisContext
fieldName
- the name of the field to comparethis
for method chainingpublic MoreLikeThisContext boostedTo(float boost)
QueryCustomization
boostedTo
in interface QueryCustomization<MoreLikeThisContext>
boost
- the value to use as boostpublic MoreLikeThisContext withConstantScore()
QueryCustomization
withConstantScore
in interface QueryCustomization<MoreLikeThisContext>
public MoreLikeThisContext filteredBy(Query filter)
QueryCustomization
filteredBy
in interface QueryCustomization<MoreLikeThisContext>
filter
- the Query to use as a filterCopyright © 2006-2017 Red Hat, Inc. All Rights Reserved