定制 shyim/opensearch-php-dsl 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

shyim/opensearch-php-dsl

最新稳定版本:1.1.2

Composer 安装命令:

composer require shyim/opensearch-php-dsl

包简介

OpenSearch/Elasticsearch DSL library

README 文档

README

Introducing OpenSearch DSL library to provide objective query builder for opensearch-php client. You can easily build any Opensearch query and transform it to an array.

This is a fork of ongr-io/ElasticsearchDSL, which will be more regularly updated. Thanks for ongr-io for building this Library!

If you need any help, Github issues is the preferred and recommended way to ask support questions.

Test codecov Latest Stable Version Total Downloads

Version matrix

OpenSearch version OpenSearchDSL version
>= 1.0 >= 1.0
>= 2.0 >= 1.0

Documentation

The online documentation of the bundle is here

Try it!

Installation

Install library with composer:

$ composer require shyim/opensearch-php-dsl

elasticsearch-php client is defined in the composer requirements, no need to install it.

Search

The library is standalone and is not coupled with any framework. You can use it in any PHP project, the only requirement is composer. Here's the example:

Create search:

<?php

require 'vendor/autoload.php'; //Composer autoload

$client = ClientBuilder::create()->build(); //opensearch-php client

$matchAll = new OpenSearchDSL\Query\MatchAllQuery();

$search = new OpenSearchDSL\Search();
$search->addQuery($matchAll);

$params = [
'index' => 'your_index',
'body' => $search->toArray(),
];

$results = $client->search($params);

Opensearch DSL covers every Opensearch query, all examples can be found in the documentation

统计信息

  • 总下载量: 5.12M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 16
  • 点击次数: 3
  • 依赖项目数: 9
  • 推荐数: 1

GitHub 信息

  • Stars: 16
  • Watchers: 2
  • Forks: 204
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固