Class QueryType

    • Constructor Detail

    • Method Detail

      • getInstance

        public static QueryType getInstance​(String type)
        Retrieves an QueryType based on its String representation.
        Parameters:
        type - The type
        Returns:
        The QueryType
        Throws:
        IllegalArgumentException - if the QueryType is not found
      • getTypeQuery

        public String getTypeQuery​(String query)
        Get the original query formatted to result in the desired query type with boost applied.
        Parameters:
        query - the original query
        Returns:
        query formatted for the desired query type with boost applied
      • getTypeQueryInternal

        protected abstract String getTypeQueryInternal​(String query)
        Get the original query formatted to result in the desired query type.
        Parameters:
        query - the original query
        Returns:
        query formatted for the desired query type
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getType

        public String getType()
        The named representation of the query type.
        Returns:
        named representation of the query type
      • getField

        public String getField()
        The field which is used to reference this query type for constructing Solr queries and associating boosts.
        Returns:
        field which is used to reference this query type in Solr queries
      • getBoost

        public Double getBoost()
        The amount to boost results which match this query type.
        Returns:
        amount to boost results which match this query type