![]() I added every available method according to elasticsearch documentation to the DSL classes. $queryDSL->match('field', 'value') // returns Elastica\Query\Match If you don't want the Version-check you could just use this classes: $queryDSL = new \Elastica\QueryBuilder\DSL\Query() This is the heart of QueryBuilder and all other stuff is optional. You can find this classes in Elastica\QueryBuilder\DSL. I created one class for each elasticsearch DSL part (Query, Filter, Aggregation, Suggesters) which constructs every existent Elastica-Object with a convenient method definition. So I only had to create wrapper classes to easily access/construct these classes. The existent command classes in Elastica can be used for QueryBuilder because they have a fluent interface. My implementation is different in some ways: DSL part classes To execute a command via Client-Class predis uses _call() magic function to check whether or not that command is supported in configured version.They have Profile-Classes (I called them Version) which contains all supported commands of a Version.Every redis command is represented by a class in predis (like in Elastica: every Query/Filter/. ![]() I took the idea from predis, because they have a similar situation:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |