{"id":21806395,"url":"https://github.com/svilborg/elasticsearch-model","last_synced_at":"2026-04-29T13:37:01.992Z","repository":{"id":72400408,"uuid":"136366436","full_name":"svilborg/elasticsearch-model","owner":"svilborg","description":"Elasticsearch Client Wrapper for creating Models","archived":false,"fork":false,"pushed_at":"2018-06-07T10:20:31.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-30T19:16:51.034Z","etag":null,"topics":["crud","elasticsearch","index","library","model","php","type","wrapper"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/svilborg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2018-06-06T17:56:08.000Z","updated_at":"2018-06-07T10:20:32.000Z","dependencies_parsed_at":"2023-03-16T05:30:24.508Z","dependency_job_id":null,"html_url":"https://github.com/svilborg/elasticsearch-model","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/svilborg/elasticsearch-model","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svilborg%2Felasticsearch-model","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svilborg%2Felasticsearch-model/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svilborg%2Felasticsearch-model/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svilborg%2Felasticsearch-model/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svilborg","download_url":"https://codeload.github.com/svilborg/elasticsearch-model/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svilborg%2Felasticsearch-model/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32427996,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T13:34:34.882Z","status":"ssl_error","status_checked_at":"2026-04-29T13:34:29.830Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["crud","elasticsearch","index","library","model","php","type","wrapper"],"created_at":"2024-11-27T12:19:23.387Z","updated_at":"2026-04-29T13:37:01.980Z","avatar_url":"https://github.com/svilborg.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# elasticsearch-model\nElasticsearch Models creation Library\n\n#### Usage\n\nSimple model definition\n\n```php\n\nclass Item extends ModelBase implements Gettable, Indexable, Updatable, Deletable, Searchable\n{\n    use Get, Index, Update, Delete, Search, Management;\n\n    /**\n     *\n     * @var string\n     */\n    protected $index = \"inventory\";\n\n    /**\n     *\n     * @var string\n     */\n    protected $type = \"items\";\n\n}\n\n```\n\nCreating a Document\n\n```php\n$item = new Item();\n\n $response = $item-\u003eindexDocument(15, [\n            \"name\" =\u003e \"blue\",\n            \"count\" =\u003e 24\n ]);\n```\n\n\nExended Model Definition\n\n```php\n\nclass Item extends ModelBase implements Gettable, Indexable, Updatable, Deletable, Searchable\n{\n    use Get, Index, Update, Delete, Search, Management;\n\n    /**\n     *\n     * @var string\n     */\n    protected $index = \"inventory\";\n\n    /**\n     *\n     * @var string\n     */\n    protected $type = \"items\";\n\n    protected $settings = [\n        'number_of_shards' =\u003e 1,\n        'number_of_replicas' =\u003e 0\n    ];\n\n    protected $mapping = [\n        '_default_' =\u003e [\n            'properties' =\u003e [\n                'name' =\u003e [\n                    'type' =\u003e 'keyword',\n                    'copy_to' =\u003e 'combined'\n                ],\n                'count' =\u003e [\n                    'type' =\u003e 'keyword',\n                    'copy_to' =\u003e 'combined'\n                ],\n                'combined' =\u003e [\n                    'type' =\u003e 'keyword',\n                ]\n            ]\n        ]\n    ];\n}\n\n```\n\nInitlaizing an Index with mapping\n\n```php\n\n$item = new Item();\n\n$response = $item-\u003einitIndex();\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvilborg%2Felasticsearch-model","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvilborg%2Felasticsearch-model","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvilborg%2Felasticsearch-model/lists"}