first commit

This commit is contained in:
Sven Wappler
2021-04-17 21:20:54 +02:00
parent c93ec9492a
commit cadcc8edb4
406 changed files with 4917 additions and 5157 deletions

View File

@@ -29,9 +29,9 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\RootlineUtility;
/**
* This Processor takes a PID, and resolves its rootline in solr notation.
* This Processor takes a PID, and resolves its rootline in meilisearch notation.
*
* Format of this field corresponds to http://wiki.apache.org/solr/HierarchicalFaceting
* Format of this field corresponds to http://wiki.apache.org/meilisearch/HierarchicalFaceting
*
* Let's say we have a record indexed on page 111 which is a sub page like shown in this page tree:
*
@@ -42,7 +42,7 @@ use TYPO3\CMS\Core\Utility\RootlineUtility;
*
* then we get a rootline 1/10/100/111
*
* In Solr hierarchy notation, we get
* In Meilisearch hierarchy notation, we get
*
* 0-1/
* 1-1/10/
@@ -57,7 +57,7 @@ class PageUidToHierarchy extends AbstractHierarchyProcessor implements FieldProc
{
/**
* Expects a page ID of a page. Returns a Solr hierarchy notation for the
* Expects a page ID of a page. Returns a Meilisearch hierarchy notation for the
* rootline of the page ID.
*
* @param array $values Array of values, an array because of multivalued fields
@@ -70,7 +70,7 @@ class PageUidToHierarchy extends AbstractHierarchyProcessor implements FieldProc
foreach ($values as $value) {
list($rootPageUid, $mountPoint) = GeneralUtility::trimExplode(',',
$value, true, 2);
$results[] = $this->getSolrRootlineForPageId($rootPageUid,
$results[] = $this->getMeilisearchRootlineForPageId($rootPageUid,
$mountPoint);
}
@@ -78,18 +78,18 @@ class PageUidToHierarchy extends AbstractHierarchyProcessor implements FieldProc
}
/**
* Returns a Solr hierarchy notation string for rootline of given PID.
* Returns a Meilisearch hierarchy notation string for rootline of given PID.
*
* @param int $pageId Page ID to get a rootline as Solr hierarchy for
* @param int $pageId Page ID to get a rootline as Meilisearch hierarchy for
* @param string $mountPoint The mount point parameter that will be used for building the rootline.
* @return array Rootline as Solr hierarchy array
* @return array Rootline as Meilisearch hierarchy array
*/
protected function getSolrRootlineForPageId($pageId, $mountPoint = '')
protected function getMeilisearchRootlineForPageId($pageId, $mountPoint = '')
{
$pageIdRootline = $this->buildPageIdRootline($pageId, $mountPoint);
$solrRootline = $this->buildSolrHierarchyFromIdRootline($pageIdRootline);
$meilisearchRootline = $this->buildMeilisearchHierarchyFromIdRootline($pageIdRootline);
return $solrRootline;
return $meilisearchRootline;
}
/**