public function decode($hierarchy, array $configuration = [])
    {
        $escapedHierarchy = HierarchyTool::substituteSlashes($hierarchy);

        $escapedHierarchy = substr($escapedHierarchy, 1);
        $escapedHierarchy = rtrim($escapedHierarchy, '/');
        $hierarchyItems = explode(self::DELIMITER, $escapedHierarchy);
        $filterContent = (count($hierarchyItems) - 1) . '-' . $escapedHierarchy . '/';

        $filterContent = HierarchyTool::unSubstituteSlashes($filterContent);

        return '"' . str_replace("\\", "\\\\", $filterContent) . '"';
    }
public function decode($hierarchy, array $configuration = [])
    {
        $escapedHierarchy = HierarchyTool::substituteSlashes($hierarchy);

        $escapedHierarchy = substr($escapedHierarchy, 1);
        $escapedHierarchy = rtrim($escapedHierarchy, '/');
        $hierarchyItems = explode(self::DELIMITER, $escapedHierarchy);
        $filterContent = (count($hierarchyItems) - 1) . '-' . $escapedHierarchy . '/';

        $filterContent = HierarchyTool::unSubstituteSlashes($filterContent);

        return '"' . str_replace("\\", "\\\\", $filterContent) . '"';
    }
public function decode ( $ hierarchy , array $ configuration = [ ] ) { $ escapedHierarchy = HierarchyTool :: substituteSlashes ( $ hierarchy ) ; $ escapedHierarchy = substr ( $ escapedHierarchy , 1 ) ; $ escapedHierarchy = rtrim ( $ escapedHierarchy , '/' ) ; $ hierarchyItems = explode ( self :: DELIMITER , $ escapedHierarchy ) ; $ filterContent = ( count ( $ hierarchyItems ) - 1 ) . '-' . $ escapedHierarchy . '/' ; $ filterContent = HierarchyTool :: unSubstituteSlashes ( $ filterContent ) ; return '"' . str_replace ( "\\" , "\\\\" , $ filterContent ) . '"' ; }
Parses the given hierarchy filter and returns a Solr filter query.

@param string $hierarchy The hierarchy filter query.
@param array $configuration Facet configuration
@return string Lucene query language filter to be used for querying Solr
Parses the given hierarchy filter and returns a Solr filter query .