Flowpack.ElasticSearch.ContentRepositoryAdaptor icon indicating copy to clipboard operation
Flowpack.ElasticSearch.ContentRepositoryAdaptor copied to clipboard

FEATURE: Add Node-Type Filter

Open erkenes opened this issue 3 years ago • 2 comments

Create a method which allows to create a nodetype filter to include and exclude specific nodetypes

erkenes avatar Sep 28 '22 10:09 erkenes

Simplified example:


public function getVehiclePages(NodeInterface $siteNode)
{
        $filter = [
                'Foo.Bar:Document.Vehicle',
                'Foo.Bar:Document.Motorcyle',
                '!Neos.Neos:Document' // this nodetype will be excluded
        ];

        $queryBuilder = new ElasticSearchQueryBuilder();
        $queryBuilder->query($siteNode);
        $queryBuilder->nodeTypeFilter(implode(',', $filter));
        
        // [...]
}

erkenes avatar Sep 28 '22 10:09 erkenes

@Sebobo @daniellienert can you review this PR?

erkenes avatar Feb 16 '23 08:02 erkenes