public function getContentsBySlugsFunction($slugs, $keepOrder = false)
    {
        $search = $this->repository->createSearch();
        $search->addQuery(new TermsQuery('slug', $slugs), 'should');

        $result = $this->repository->execute($search);

        if ($keepOrder) {
            $orderedResult = [];
            foreach ($slugs as $slug) {
                foreach ($result as $document) {
                    if ($document->slug == $slug) {
                        $orderedResult[] = $document;
                    }
                }
            }

            $result = $orderedResult;
        }

        return $result;
    }