{"id":18045322,"url":"https://github.com/dpb587/elasticsearch-in-memory-filter.php","last_synced_at":"2025-04-05T03:41:46.225Z","repository":{"id":138804294,"uuid":"77556151","full_name":"dpb587/elasticsearch-in-memory-filter.php","owner":"dpb587","description":"Reuse elasticsearch filters for matching in-memory arrays.","archived":false,"fork":false,"pushed_at":"2017-11-21T15:11:27.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-10T11:48:32.861Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dpb587.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-28T19:28:06.000Z","updated_at":"2016-12-28T19:29:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"0626e86c-33b5-4192-b354-a343fb79884d","html_url":"https://github.com/dpb587/elasticsearch-in-memory-filter.php","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpb587%2Felasticsearch-in-memory-filter.php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpb587%2Felasticsearch-in-memory-filter.php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpb587%2Felasticsearch-in-memory-filter.php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpb587%2Felasticsearch-in-memory-filter.php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dpb587","download_url":"https://codeload.github.com/dpb587/elasticsearch-in-memory-filter.php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284914,"owners_count":20913691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-30T18:12:53.266Z","updated_at":"2025-04-05T03:41:46.198Z","avatar_url":"https://github.com/dpb587.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# elasticsearch-in-memory-filter.php\n\nReuse elasticsearch filters for matching in-memory arrays.\n\n## Example\n\n```php\nuse DPB\\ElasticsearchInMemoryFilter as _;\n\n$doc = [\n  'name' =\u003e 'Dublin Pizza Company',\n  'type' =\u003e 'restaurant',\n  'categories' =\u003e [\n    [ 'id' =\u003e 12345,\n      'name' =\u003e 'pizza' ] ] ];\n\n$esFilter = [\n  'and' =\u003e [\n    [ 'term' =\u003e [\n        'type' =\u003e 'restaurant' ] ],\n    [ 'nested' =\u003e [\n        'path' =\u003e 'categories',\n        'filter' =\u003e [\n          'term' =\u003e [\n            'categories.name' =\u003e 'pizza' ] ] ] ] ] ];\n\n$filter = _\\Transformer::transform($esFilter);\n\nvar_export($filter-\u003ematch($doc));\n// true\n\n$filter = new _\\Filter\\TermFilter([ 'type' =\u003e 'restaurant' ]);\n\nvar_export($filter-\u003ematch($doc));\n// true\n\nvar_export($filter-\u003ematch([ 'type' =\u003e 'cafe' ]));\n// false\n```\n\n## License\n\n[MIT License](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpb587%2Felasticsearch-in-memory-filter.php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdpb587%2Felasticsearch-in-memory-filter.php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpb587%2Felasticsearch-in-memory-filter.php/lists"}