novaway / elasticsearch-client Goto Github PK
View Code? Open in Web Editor NEWA lightweight PHP 7.0+ client for Elasticsearch, providing features over Elasticsearch-PHP
License: MIT License
A lightweight PHP 7.0+ client for Elasticsearch, providing features over Elasticsearch-PHP
License: MIT License
As soon as the filterCollection has more than one filter set, the filtering doesn't seem to work on 1.7.
I was able to obtain the desired result by replacing
$this->queryBody['query']['filtered']['filter'] = $this->filterCollection;
by
if (count($this->filterCollection) > 1) {
$this->queryBody['query']['filtered']['filter']['bool']['must'] = $this->filterCollection;
} else {
$this->queryBody['query']['filtered']['filter'] = $this->filterCollection;
}
Which seem to indicate that a BoolFilter is a good solution to that problem.
I'm not convinced that this is a good solution to the problem at hand, it seems a bit too magical and rigid.
But we could use support for BoolFilter in this branch and BoolQuery in all branches.
Port to the master branch changes made in #19 on branch 2.3 about Object Oriented queries.
GeoDistanceFilter.php currently has "km" as an hardcoded value for distance unit.
It would be useful to have a parameter.
PR #24 add Geofilters on ES2.3, this need to be ported to ES5
elasticsearch-client/src/QueryExecutor.php
Lines 28 to 34 in c7bda2c
Do you think the parameter $type could be optional in order to make search over multiple types of document ? Or do you have another way to do such kind of search ?
The release tags are not up to date, it could be interesting to follow the ES versions, the way elasticsearch-php does.
It would make it easier to know which version of the lib to use with the version of ES used.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.