Class SolrNativeJoinQuery

java.lang.Object
org.ametys.cms.search.query.SolrNativeJoinQuery
All Implemented Interfaces:
Query
Direct Known Subclasses:
ContentPageQuery

public class SolrNativeJoinQuery extends Object implements Query
The use of this Query is discouraged. If possible (when from=id), use JoinQuery instead.
Represents a Solr Join Query
  • Field Details

    • _fromField

      protected String _fromField
      The "from" field of the join (the query is done on docs which hold this field)
    • _toField

      protected String _toField
      The "to" field of the join (returned docs hold this field)
    • _subQuery

      protected Query _subQuery
      The query to apply on joined docs
  • Constructor Details

    • SolrNativeJoinQuery

      public SolrNativeJoinQuery(String from, String to, Query subQuery)
      The use of this Query is discouraged. If possible (when from=id), use JoinQuery instead.
      Build a solr join query
      Parameters:
      from - The "from" field of the join (the query is done on docs which hold this field)
      to - The "to" field of the join (returned docs holds this field)
      subQuery - The sub query (query to apply on joined docs)
  • Method Details

    • build

      Description copied from interface: Query
      Build the solr query string representing the Query object.
      Specified by:
      build in interface Query
      Returns:
      the solr query string representing the Query object.
      Throws:
      QuerySyntaxException - if the query can't be built because of a syntax error.
    • buildAsJson

      Description copied from interface: Query
      Build the solr query representing the Query object.
      The return type may be either String or Map<String, Object> following the Solr JSON Query DSL.
      Specified by:
      buildAsJson in interface Query
      Returns:
      the solr query representing the Query object.
      Throws:
      QuerySyntaxException - if the query can't be built because of a syntax error.
    • toString

      public String toString(int indent)
      Description copied from interface: Query
      Gets a representation of this Query, for pretty-printing for logging and debugging purposes
      Specified by:
      toString in interface Query
      Parameters:
      indent - The current indentation. Base indentation is 2 (for printing a sub-level)
      Returns:
      a representation of this Query
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object