Skip to content

Commit

Permalink
NGSTACK-836: restructure parent-child indexing ancestor resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
pspanja committed May 29, 2024
1 parent ebafc0a commit e839822
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@
use Ibexa\Contracts\Core\Persistence\Content\Location;
use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException;
use Ibexa\Contracts\Core\Search\VersatileHandler;
use Netgen\IbexaSearchExtra\Core\Search\Solr\ParentChildReindexAncestorResolver;

final class AncestorIndexer
{
public function __construct(
private readonly VersatileHandler $searchHandler,
private readonly ContentHandler $contentHandler,
private readonly ParentChildReindexAncestorResolver $ancestorResolver,
private readonly ParentChildIndexingAncestorResolver $ancestorResolver,
) {}

public function indexSingle(Location $location): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

declare(strict_types=1);

namespace Netgen\IbexaSearchExtra\Core\Search\Solr;
namespace Netgen\IbexaSearchExtra\Core\Search\Common\Messenger\MessageHandler\Search\ParentChildIndexing;

use Ibexa\Contracts\Core\Persistence\Content\Handler as ContentHandler;
use Ibexa\Contracts\Core\Persistence\Content\Location;
use Ibexa\Contracts\Core\Persistence\Content\Location\Handler as LocationHandler;
use Ibexa\Contracts\Core\Persistence\Content\Type\Handler as ContentTypeHandler;
use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException;

use function array_merge;
use function array_shift;
use function count;
Expand All @@ -21,7 +20,7 @@
use function mb_strlen;
use function str_starts_with;

final class ParentChildReindexAncestorResolver
final class ParentChildIndexingAncestorResolver
{
/**
* @var string[]|null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ services:
tags:
- { name: ibexa.search.solr.field.mapper.content.translation }

netgen_search_extra.parent_child_indexing.parent_child_reindex_ancestor_resolver:
class: Netgen\IbexaSearchExtra\Core\Search\Solr\ParentChildReindexAncestorResolver
netgen_search_extra.parent_child_indexing.ancestor_resolver:
class: Netgen\IbexaSearchExtra\Core\Search\Common\Messenger\MessageHandler\Search\ParentChildIndexing\ParentChildIndexingAncestorResolver
arguments:
- '@Ibexa\Core\Persistence\Legacy\Content\Handler'
- '@Ibexa\Contracts\Core\Persistence\Content\Type\Handler'
Expand All @@ -33,4 +33,4 @@ services:
arguments:
- '@Ibexa\Contracts\Core\Search\VersatileHandler'
- '@Ibexa\Core\Persistence\Legacy\Content\Handler'
- '@netgen_search_extra.parent_child_indexing.parent_child_reindex_ancestor_resolver'
- '@netgen_search_extra.parent_child_indexing.ancestor_resolver'

0 comments on commit e839822

Please sign in to comment.