org.hibernate.search.query.dsl.impl

## Class ConnectedMoreLikeThisMatchingContext

- java.lang.Object
- - org.hibernate.search.query.dsl.impl.ConnectedMoreLikeThisMatchingContext

- All Implemented Interfaces:
    FieldCustomization<MoreLikeThisOpenedMatchingContext>, MoreLikeThisMatchingContext, MoreLikeThisOpenedMatchingContext, MoreLikeThisTerminalMatchingContext

      public class ConnectedMoreLikeThisMatchingContext
      extends Object
      implements MoreLikeThisOpenedMatchingContext, MoreLikeThisTerminalMatchingContext

  Author:
    Emmanuel Bernard

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConnectedMoreLikeThisMatchingContext(String[] fieldNames, MoreLikeThisQueryContext moreLikeThisContext, org.hibernate.search.query.dsl.impl.QueryCustomizer queryCustomizer, QueryBuildingContext queryContext)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ConnectedMoreLikeThisMatchingContext

          public ConnectedMoreLikeThisMatchingContext(String[] fieldNames,
                                                      MoreLikeThisQueryContext moreLikeThisContext,
                                                      org.hibernate.search.query.dsl.impl.QueryCustomizer queryCustomizer,
                                                      QueryBuildingContext queryContext)

  - ### Method Detail

    - #### andField

          public MoreLikeThisOpenedMatchingContext andField(String fieldname)

      Description copied from interface: `MoreLikeThisOpenedMatchingContext`
      Add one field to the fields selected to match the content. An exception is thrown if the field are neither storing the term vectors nor physically stored. We highly recommend to store the term vectors if you plan on using More Like This queries.
      Specified by:
        `andField` in interface `MoreLikeThisOpenedMatchingContext`
      Parameters:
        `fieldname` - the name of the field
      Returns:
        `this` for method chaining

    - #### boostedTo

          public MoreLikeThisOpenedMatchingContext boostedTo(float boost)

      Description copied from interface: `FieldCustomization`
      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)
      Specified by:
        `boostedTo` in interface `FieldCustomization<MoreLikeThisOpenedMatchingContext>`
      Parameters:
        `boost` - the boost value, it can be negative (advance)
      Returns:
        an instance of T for method chaining

    - #### ignoreAnalyzer

          public MoreLikeThisOpenedMatchingContext ignoreAnalyzer()

      Description copied from interface: `FieldCustomization`
      Advanced Do not execute the analyzer on the text. (It is usually a good idea to apply the analyzer)
      Specified by:
        `ignoreAnalyzer` in interface `FieldCustomization<MoreLikeThisOpenedMatchingContext>`
      Returns:
        an instance of T for method chaining

    - #### ignoreFieldBridge

          public MoreLikeThisOpenedMatchingContext ignoreFieldBridge()

      Description copied from interface: `FieldCustomization`
      Do not try and find the field bridge nor apply the object / string conversion matching objects should be of type String in this case.
      Specified by:
        `ignoreFieldBridge` in interface `FieldCustomization<MoreLikeThisOpenedMatchingContext>`
      Returns:
        an instance of T for method chaining

    - #### toEntityWithId

          public MoreLikeThisTermination toEntityWithId(Object id)

      Description copied from interface: `MoreLikeThisMatchingContext`
      Find other entities looking like the entity with the given id. Only the selected fields will be used for comparison.
      Specified by:
        `toEntityWithId` in interface `MoreLikeThisMatchingContext`
      Parameters:
        `id` - the identifier of the entity
      Returns:
        `this` for method chaining

    - #### toEntity

          public MoreLikeThisToEntityContentAndTermination toEntity(Object entity)

      Specified by:
        `toEntity` in interface `MoreLikeThisMatchingContext`

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved