{"id":29673861,"url":"https://github.com/otto-de/flummi","last_synced_at":"2025-07-22T22:08:27.402Z","repository":{"id":57730807,"uuid":"62542323","full_name":"otto-de/flummi","owner":"otto-de","description":"Flummi Elastic Search HTTP REST Client","archived":false,"fork":false,"pushed_at":"2024-12-09T08:51:15.000Z","size":608,"stargazers_count":56,"open_issues_count":6,"forks_count":28,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-03-13T01:36:51.742Z","etag":null,"topics":["elastic-search","java"],"latest_commit_sha":null,"homepage":"https://github.com/otto-de/flummi","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/otto-de.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","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-07-04T07:51:45.000Z","updated_at":"2024-12-09T08:51:19.000Z","dependencies_parsed_at":"2023-11-29T11:31:19.963Z","dependency_job_id":"378df187-3da2-4d51-a186-172b3bbc445c","html_url":"https://github.com/otto-de/flummi","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/otto-de/flummi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otto-de%2Fflummi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otto-de%2Fflummi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otto-de%2Fflummi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otto-de%2Fflummi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/otto-de","download_url":"https://codeload.github.com/otto-de/flummi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otto-de%2Fflummi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266580885,"owners_count":23951307,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":["elastic-search","java"],"created_at":"2025-07-22T22:08:26.679Z","updated_at":"2025-07-22T22:08:27.393Z","avatar_url":"https://github.com/otto-de.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Flummi Elastic Search HTTP Client\n=================================\n\n\u003ca href=\"https://travis-ci.org/otto-de/flummi\"\u003e\u003cimg src=\"https://travis-ci.org/otto-de/flummi.svg?branch=master\"\u003e\u003c/img\u003e\u003c/a\u003e\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/de.otto/flummi/badge.svg)](https://maven-badges.herokuapp.com/maven-central/de.otto/flummi)\n![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fotto-de%2Fflummi%2Fblob%2Fmaster%2FOSSMETADATA)\n\nFlummi is a client library for Elastic Search. It has been successfully tested with Elastic Search versions 6 and 7.\nIt provides a comprehensive Java query DSL API and communicates with\nthe Elastic Search Cluster via HTTP/JSON. It is licensed under the [Apache 2 License](http://www.apache.org/licenses/LICENSE-2.0.html).\n\n\nWhy should I use Flummi?\n------------------------\n\n* Flummi uses HTTP and JSON for communication with Elastic Search. Its only dependencies are Gson and AsyncHttpClient, so\n  it is good for you if you don't want to have your application depend on the full ElasticSearch JAR.\n* Flummi's API is as close as possible to the original Elmastic Search transport client API. This makes it very easy to\n  port existing client code to Flummi.\n* Flummi uses the Elastic Search Scroll API for downloading large result sets as a stream of smaller pages.\n* It supports parent-child relationships\n\n\nLimitations\n-----------\n\n* Flummi does not support cluster load balancing yet. You can use a hardware loadbalancer or HTTP Proxy such as nginx.\n* Although it supports the most common query and request types, it is not yet fully feature complete. When you need a\n  request or query type that is not yet supported by Flummi, please feel free to add it and send us a Pull Request!\n\n\nWhich version should I use?\n---------------------------\n\nFlummi versions starting with 7.x are intended for use with Elastic Search 6 and 7. Use older versions of the Library for older ES versions. \nFlummi versions starting with 8.x are intended for use with Elastic Search 8, because the field _type is not supported in ES8. \nhttps://www.elastic.co/guide/en/elasticsearch/reference/current/migrating-8.0.html#breaking-changes-8.0 \n\nHow to use Flummi\n-----------------\n\nYou can simply include Flummi in your Maven or Gradle build as follows.\n\nFor Maven users:\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003ede.otto\u003c/groupId\u003e\n        \u003cartifactId\u003eflummi\u003c/artifactId\u003e\n        \u003cversion\u003e8.0.0.0\u003c/version\u003e\n    \u003c/dependency\u003e\n\nFor gradle users:\n\n    compile \"de.otto:flummi:8.0.0.0\"\n\n\n### Getting started\n\nFor using Flummi in a Java application, initialize it as follows.\n\n    AsyncHttpClient asyncHttpClient = new AsyncHttpClient();\n    Flummi flummi = new Flummi(asyncHttpClient, \"http://elasticsearch.base.url:9200\");\n\n\n### Using Flummi with Spring\n\nFor using Flummi in a Spring or Spring Boot application, you can add a simple `@Configuration` class for\ninitialization and then autowire Flummi in your beans.\n\n    @Configuration\n    public class FlummiConfiguration {\n\n       @Bean\n       public AsyncHttpClient asyncHttpClient() {\n         return new AsyncHttpClient();\n       }\n\n       @Bean\n       public Flummi flummi() {\n         return new Flummi(asyncHttpClient(), \"http://elasticsearch.base.url:9200\");\n       }\n    }\n\n### Creating an index\n\nThe following example creates a products index with a customized analyzer for the name property.\n\n    JsonObject settings = GsonHelper.object(\n        \"analysis\", GsonHelper.object(\n            \"analyzer\", GsonHelper.object(\n                \"lowercase-analyzer\", GsonHelper.object(\n                    \"tokenizer\", \"keyword-tokenizer\",\n                    \"filter\", \"lowercase-filter\"\n                )\n            ),\n            \"tokenizer\", GsonHelper.object(\n                \"keyword-tokenizer\", GsonHelper.object(\n                    \"type\", \"keyword\"\n                )\n            ),\n            \"filter\", GsonHelper.object(\n                \"lowercase-filter\", GsonHelper.object(\n                    \"type\", \"lowercase\"\n                )\n            )\n        )\n    );\n    JsonObject mappings = GsonHelper.object(\n        \"products\", GsonHelper.object(\n            \"properties\", GsonHelper.object(\n                \"name\", GsonHelper.object(\n                    \"type\", \"string\",\n                    \"store\", \"yes\",\n                    \"analyzer\", \"lowercase-analyzer\",\n                    \"fields\", GsonHelper.object(\n                        \"raw\", GsonHelper.object(\n                          \"type\", \"string\",\n                          \"index\", \"not_analyzed\"\n                        )\n                    )\n                ),\n                \"color\", GsonHelper.object(\n                    \"type\", \"string\",\n                    \"store\", \"no\",\n                    \"index\", \"not_analyzed\"\n                )\n            )\n        )\n    );\n\n    flummi.admin().indices()\n       .prepareCreate(\"products\")\n       .setSettings(settings)\n       .setMappings(mappings)\n       .execute();\n\n\n### Indexing documents\n\nA simple example that adds a product to the products index\n\n    JsonObject bouncingBall1 = GsonHelper.object(\n       \"name\", \"Bouncing Ball small\",\n       \"color\", \"green\"\n       );\n\n    flummi.prepareIndex()\n        .setId(\"bblsml-4710\")\n        .setSource(bouncingBall1)\n        .setIndexName(\"products\")\n        .setDocumentType(\"product\")\n        .execute();\n\n\n### Bulk Requests\n\nA [bulk request](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html)\nis a single HTTP request that contains multiple actions. For indexing large amounts of data, this is\nmuch more efficient than sending one request for every document. The following simple example adds some products to the\nproduct index using a Bulk Request\n\n    JsonObject bouncingBall1 = GsonHelper.object(\n       \"name\", \"Bouncing Ball with smiley\",\n       \"color\", \"yellow\"\n       );\n    JsonObject bouncingBall2 = GsonHelper.object(\n       \"name\", \"Bouncing Ball XL extra bouncy\",\n       \"color\", \"transparent\"\n       );\n\n    flummi.prepareBulk()\n        .add(\n           new IndexActionBuilder(\"products\")\n               .setSource(bouncingBall1)\n               .setId(\"bblsmly-4711\")\n               .setType(\"product\") // type isn't supported in ES8\n               )\n        .add(\n           new IndexActionBuilder(\"products\")\n               .setSource(bouncingBall2)\n               .setId(\"bblxlxb-4712\")\n               .setType(\"product\") // type isn't supported in ES8\n               )\n        .execute();\n\n\n### Executing Queries\n\nA simple example that finds up to 10 yellow-colored products in the products index:\n\n    SearchRequestBuilder searchRequestBuilder = flummi\n       .prepareSearch(\"products\")\n       .setTypes(\"product\")\n       .setSize(10)\n       .setQuery(\n          QueryBuilders.termQuery(\"color\", \"yellow\")\n            .build()\n       )\n       .setTimeoutMillis(150);\n\n    SearchResponse searchResponse = searchRequestBuilder.execute()\n\n    System.out.println(\"Found \" + searchResponse.getHits().getTotalHits() + \" products\");\n    searchResponse.getHits()\n       .stream().map(hit -\u003e hit.getSource().get(\"name\").getAsString())\n       .forEach(name -\u003e System.out.println(\"Name: \" + name));\n\n\n#### Streaming large result sets with the Scroll API\n\nFor streaming large result sets, Flummi uses the\n[Elastic Search Scroll API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html)\nto split the result set into smaller pages and thus reduce memory usage and network bandwidth. To use it, simply\n`setScroll(\"1m\")` on your `SearchRequestBuilder` before calling `execute()`.\n\n\n### Aggregation queries\n\nThe following example shows how to do simple terms bucket aggregations.\n\n    SearchRequestBuilder searchRequestBuilder = flummi\n       .prepareSearch(\"products\")\n       .setTypes(\"product\")\n       .setSize(10)\n       .setQuery(\n          QueryBuilders.matchAll().build()\n       )\n       .addAggregation(\n          new TermsBuilder(\"Colors\").field(\"color\").size(0)\n       );\n\n    SearchResponse searchResponse = searchRequestBuilder.execute()\n\n    AggregationResult colors = searchResponse.getAggregations().get(\"Colors\");\n    colors.getBuckets().forEach(bucket -\u003e System.out.println(\n       \"Found \" + bucket.getDocCount() + \" \" + bucket.getKey() + \" products\"));\n\n\nCompatibility\n-------------\n\nFlummi version 7.x is compatible with Elastic Search 6.x and 7.x\nFlummi version 8.x is compatible with Elastic Search 8.x\n\nFlummi is build with JDK 8 \n\nContribution Guide\n------------------\n\nYou want to contribute new features to Flummi? Great!\n\nFlummi is built using the gradle wrapper `gradlew`. After cloning the git repository, you can create an IntelliJ Idea\nproject file with the following command\n\n    ./bin/gradlew idea\n\nBefore you push, you might want to run all the unit tests with the following command\n\n    ./bin/gradlew clean check\n\nAnd don't forget to send us your pull request!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotto-de%2Fflummi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fotto-de%2Fflummi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotto-de%2Fflummi/lists"}