Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Opensearch Bundle Laravel Package

bneumann/opensearch-bundle

View on GitHub
Deep Wiki
Context7

Usage

Finder services

Each index gets a finder service.

  • opensearch.finder.<index> returns hydrated results
  • opensearch.finder_raw.<index> returns raw OpenSearch response

Example service injection:

public function __construct(FinderInterface $finder) {}

Example query:

$results = $finder->find([
    'query' => [
        'match' => ['name' => 'bike'],
    ],
]);

Repository pattern

Configure a repository per index:

opensearch:
  indexes:
    products:
      repository: App\Search\ProductRepository

Repository base class:

final class ProductRepository extends Repository
{
    public function findBySku(string $sku): iterable
    {
        return $this->search([
            'query' => ['term' => ['sku' => $sku]],
        ]);
    }
}
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support