marko/search

Search interfaces and value objects for Marko Framework

Maintainers

Package info

github.com/marko-php/marko-search

Type:marko-module

pkg:composer/marko/search

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

0.0.1 2026-03-25 17:53 UTC

This package is auto-updated.

Last update: 2026-03-25 21:07:35 UTC


README

Generic search abstraction--add full-text search to any entity with a database driver included and support for Elasticsearch, Meilisearch, and Typesense drivers.

Installation

composer require marko/search

Quick Example

use Marko\Search\Driver\DatabaseSearchDriver;
use Marko\Search\Value\SearchCriteria;

$driver = new DatabaseSearchDriver(
    connection: $connection,
    tableName: 'posts',
    searchable: new Post(),
);

$result = $driver->search(
    query: 'php tutorial',
    criteria: SearchCriteria::create('php tutorial')
        ->withSort('created_at', 'desc')
        ->withPage(1)
        ->withPerPage(10),
);

Documentation

Full usage, API reference, and examples: marko/search