smallhomelab/lucene-query-parser
Composer 安装命令:
composer require smallhomelab/lucene-query-parser
包简介
Basic Lucene Query Parser for Search and Filter
README 文档
README
Lucene query string parser to be used as web api query or filter string. Base code is come from https://github.com/ralphschindler/basic-query-filter
Example queries in this language:
name: appleprice: > 100price: > 100 AND active: = 1product.price: > 100 AND category.id: = 7name:=~ "Foo%"created_at: > "2017-01-01" and created_at: < "2017-01-31"status:= 1 AND (name:= "PHP Rocks" || name:= "I ♥ API's")
Install
composer require "smallhomelab/lucene-query-parser"
Usage
$parseTree = (new LucenenQueryParser\Parser)->parse($filter); // Getting String $str = $parseTree->toString(); // Getting Array $arr = $parseTree->toArray(); // Getting Simple Array $arrSimple = $parseTree->toSimpleArray();
统计信息
- 总下载量: 1.24k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2018-07-30