public class ConnectedMoreLikeThisMatchingContext extends Object implements MoreLikeThisOpenedMatchingContext, MoreLikeThisTerminalMatchingContext
Constructor and Description |
---|
ConnectedMoreLikeThisMatchingContext(String[] fieldNames,
MoreLikeThisQueryContext moreLikeThisContext,
org.hibernate.search.query.dsl.impl.QueryCustomizer queryCustomizer,
QueryBuildingContext queryContext) |
Modifier and Type | Method and Description |
---|---|
MoreLikeThisOpenedMatchingContext |
andField(String fieldname)
Add one field to the fields selected to match the content.
|
MoreLikeThisOpenedMatchingContext |
boostedTo(float boost)
Boost the field 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)
|
MoreLikeThisOpenedMatchingContext |
ignoreAnalyzer()
Advanced
Do not execute the analyzer on the text.
|
MoreLikeThisOpenedMatchingContext |
ignoreFieldBridge()
Do not try and find the field bridge nor apply the object / string conversion
matching objects should be of type String in this case.
|
MoreLikeThisToEntityContentAndTermination |
toEntity(Object entity) |
MoreLikeThisTermination |
toEntityWithId(Object id)
Find other entities looking like the entity with the given id.
|
public ConnectedMoreLikeThisMatchingContext(String[] fieldNames, MoreLikeThisQueryContext moreLikeThisContext, org.hibernate.search.query.dsl.impl.QueryCustomizer queryCustomizer, QueryBuildingContext queryContext)
public MoreLikeThisOpenedMatchingContext andField(String fieldname)
MoreLikeThisOpenedMatchingContext
andField
in interface MoreLikeThisOpenedMatchingContext
fieldname
- the name of the fieldthis
for method chainingpublic MoreLikeThisOpenedMatchingContext boostedTo(float boost)
FieldCustomization
boostedTo
in interface FieldCustomization<MoreLikeThisOpenedMatchingContext>
boost
- the boost value, it can be negative (advance)public MoreLikeThisOpenedMatchingContext ignoreAnalyzer()
FieldCustomization
ignoreAnalyzer
in interface FieldCustomization<MoreLikeThisOpenedMatchingContext>
public MoreLikeThisOpenedMatchingContext ignoreFieldBridge()
FieldCustomization
ignoreFieldBridge
in interface FieldCustomization<MoreLikeThisOpenedMatchingContext>
public MoreLikeThisTermination toEntityWithId(Object id)
MoreLikeThisMatchingContext
toEntityWithId
in interface MoreLikeThisMatchingContext
id
- the identifier of the entitythis
for method chainingpublic MoreLikeThisToEntityContentAndTermination toEntity(Object entity)
toEntity
in interface MoreLikeThisMatchingContext
Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved