Class FieldQuery

java.lang.Object
com.broadleafcommerce.search.api.domain.FieldQuery
All Implemented Interfaces:
Serializable

public class FieldQuery extends Object implements Serializable
Associates a FieldVariant for a field to make it searchable based on a particular query type. For example, this could enable the String variant of the Product Name field to be searched based on a word-level match. A boost amount can also be added, to weight the results based on this query.
See Also:
  • Constructor Details

    • FieldQuery

      public FieldQuery()
  • Method Details

    • getQueryType

      public String getQueryType()
      The query type which should be boosted on.
      Returns:
      the query type which should be boosted on.
    • getVariantType

      public String getVariantType()
      The field variant type which should be boosted on.
      Returns:
      the field variant type which should be boosted on.
    • getBoost

      public Double getBoost()
      The amount to boost this variant for this query type.
      Returns:
      the amount to boost
    • setQueryType

      public void setQueryType(String queryType)
      The query type which should be boosted on.
      Parameters:
      queryType - the query type which should be boosted on.
    • setVariantType

      public void setVariantType(String variantType)
      The field variant type which should be boosted on.
      Parameters:
      variantType - the field variant type which should be boosted on.
    • setBoost

      public void setBoost(Double boost)
      The amount to boost this variant for this query type.
      Parameters:
      boost - the amount to boost
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object