{"id":13502398,"url":"https://github.com/superdesk/eve-elastic","last_synced_at":"2025-04-13T00:43:28.479Z","repository":{"id":11922554,"uuid":"14489530","full_name":"superdesk/eve-elastic","owner":"superdesk","description":"Elasticsearch data layer for eve framework","archived":false,"fork":false,"pushed_at":"2025-04-11T08:32:26.000Z","size":440,"stargazers_count":69,"open_issues_count":3,"forks_count":22,"subscribers_count":9,"default_branch":"elastic7","last_synced_at":"2025-04-11T10:42:19.711Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/superdesk.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","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":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-11-18T10:39:19.000Z","updated_at":"2025-04-08T05:36:27.000Z","dependencies_parsed_at":"2024-03-11T12:08:02.056Z","dependency_job_id":"3b4a29db-bed9-444c-95f6-cd4c3473ba7a","html_url":"https://github.com/superdesk/eve-elastic","commit_stats":{"total_commits":254,"total_committers":16,"mean_commits":15.875,"dds":0.5196850393700787,"last_synced_commit":"ed0fdd4353452ecc9652f2a8df412ec3a2ebae3b"},"previous_names":["superdesk/eve-elastic","petrjasek/eve-elastic"],"tags_count":66,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superdesk%2Feve-elastic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superdesk%2Feve-elastic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superdesk%2Feve-elastic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superdesk%2Feve-elastic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/superdesk","download_url":"https://codeload.github.com/superdesk/eve-elastic/tar.gz/refs/heads/elastic7","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248383563,"owners_count":21094601,"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-07-31T22:02:12.658Z","updated_at":"2025-04-13T00:43:28.455Z","avatar_url":"https://github.com/superdesk.png","language":"Python","readme":"Eve-Elastic\n===========\n\n.. image:: https://travis-ci.org/petrjasek/eve-elastic.png?branch=elastic7\n   :target: https://travis-ci.org/petrjasek/eve-elastic\n\nEve-Elastic is `elastic \u003chttp://www.elasticsearch.org\u003e`_ data layer for `eve REST framework \u003chttp://python-eve.org\u003e`_.\n\nFeatures\n--------\n\n- fulltext search\n- filtering via elasticsearch filter dsl\n- facets support\n- aggregations support\n- elasticsearch mapping generator for schema\n\nLicense\n-------\nEve-Elastic is `GPLv3 \u003chttp://www.gnu.org/licenses/gpl-3.0.txt\u003e`_ licensed.\n\nSupported elastic versions\n--------------------------\n\nIt supports elastic ``7`` versions. \n\nInstall\n-------\n\n.. code-block:: bash\n\n   $ pip install Eve-Elastic\n\nUsage\n-----\nSet elastic as your eve data layer.\n\n.. code-block:: python\n\n    import eve\n    from eve_elastic import Elastic\n\n    app = eve.Eve(data=Elastic)\n    app.run()\n\nConfig\n------\nThere are 2 options for Eve-Elastic taken from ``app.config``:\n\n- ``ELASTICSEARCH_URL`` (default: ``'http://localhost:9200/'``) - this can be either single url or list of urls\n- ``ELASTICSEARCH_INDEX`` - (default: ``'eve'``)\n- ``ELASTICSEARCH_INDEXES`` - (default: ``{}``) - ``resource`` to ``index`` mapping\n- ``ELASTICSEARCH_FORCE_REFRESH`` - (default: ``True``) - force index refresh after every modification\n- ``ELASTICSEARCH_AUTO_AGGREGATIONS`` - (default: ``True``) - return aggregates on every search if configured for resource\n\nQuery params\n------------\nEve-Elastic supports eve like queries via ``where`` param which work as `term \u003chttp://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-term-filter.html\u003e`_ filter.\n\nOn top of this, there is a predefined `query_string \u003chttp://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html\u003e`_ query which does fulltext search.\n\n.. code-block:: bash\n\n    $ curl http://localhost:5000/items?q=foo\u0026df=name\n\n- ``q`` - query (default: ``*``)\n- ``df`` - default field (default: ``_all``)\n\nFiltering\n---------\nFor more sophisticated filtering, you can use ``filter`` query param which will be used as filter for the query,\nusing elastic `filter dsl \u003chttp://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-filters.html\u003e`_.\n\nFacets\n------\nTo add a facets support for specific resource, add ``facets`` into its ``datasource``:\n\n.. code-block:: python\n\n    DOMAIN = {\n        'contacts': {\n            'datasource':\n                'facets': {\n                    'urgency': {'terms': {'field': 'urgency'}},\n                    'versioncreated': {'date_histogram': {'field': 'versioncreated', 'interval': 'hour'}}\n                }\n            }\n        }\n\nYou will find more info about facets in `elasticsearch docs \u003chttp://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets.html\u003e`_.\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperdesk%2Feve-elastic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperdesk%2Feve-elastic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperdesk%2Feve-elastic/lists"}