{"id":15403409,"url":"https://github.com/mbj/esearch","last_synced_at":"2025-04-16T03:16:17.980Z","repository":{"id":5214514,"uuid":"6390417","full_name":"mbj/esearch","owner":"mbj","description":"A ruby driver for elasticsearch that is ONLY A DRIVER.","archived":false,"fork":false,"pushed_at":"2014-04-11T15:28:04.000Z","size":785,"stargazers_count":11,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-16T03:15:48.411Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"dsxNiubility/SXWaveAnimate","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mbj.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-25T16:25:49.000Z","updated_at":"2014-04-11T15:28:06.000Z","dependencies_parsed_at":"2022-09-11T07:11:28.395Z","dependency_job_id":null,"html_url":"https://github.com/mbj/esearch","commit_stats":null,"previous_names":["mbj/elasticsearch"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbj%2Fesearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbj%2Fesearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbj%2Fesearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbj%2Fesearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbj","download_url":"https://codeload.github.com/mbj/esearch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249188431,"owners_count":21227015,"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-01T16:08:24.970Z","updated_at":"2025-04-16T03:16:17.951Z","avatar_url":"https://github.com/mbj.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"esearch\n=======\n\n[![Build Status](https://secure.travis-ci.org/mbj/esearch.png?branch=master)](http://travis-ci.org/mbj/esearch)\n[![Dependency Status](https://gemnasium.com/mbj/esearch.png)](https://gemnasium.com/mbj/esearch)\n[![Code Climate](https://codeclimate.com/github/mbj/esearch.png)](https://codeclimate.com/github/mbj/esearch)\n\nTerminate the [esearch API](http://www.esearch.org/guide/reference/api/) in a friendly ruby PORO api.\n\nInstallation\n------------\n\nInstall the gem `esearch` via your preferred method.\n\nExamples\n--------\n\n```ruby\n# Settings suitable for operation on single node\nsettings = {\n  :settings =\u003e {\n    :number_of_shards =\u003e 1,\n    :number_of_replicas =\u003e 0\n  }\n)\n\n# Connect to a cluster\ncluster = Esearch::Cluster.connect(uri, Logger.new($stderr, :debug)) }\n\n# Create index \nindex_a = cluster.index('test-a')\nindex_a.exist? # =\u003e false, does not exist jet\nindex_a.create(settings) \nindex_a.exist? # =\u003e true\n\n# Create another index\nindex_b = cluster.index('test-b')\nindex_b.create(SINGLE_NODE_SETTINGS)\n\n# Wait for cluster initialization\ncluster.health(:wait_for_status =\u003e :green, :timeout =\u003e '10s')\n\n# Access many indexes at once\nindices = cluster.indices(%w(test-a test-b))\n\n# Index some data\nresult_a = index_a.type('type-a').index({'foo' =\u003e 'bar'})\nresult_b = index_b.type('type-b').index({'foo' =\u003e 'baz'})\n\n# Refresh indices\nindices.refresh\n\n# Query all documents in index a\nresult = index_a.search({:query =\u003e { :match_all =\u003e {}}})\nresult.hits.map(\u0026:source) # =\u003e [{'foo' =\u003e 'bar'}]\n\n# Query all documents across two indexes\nresult = indices.search({:query =\u003e { :match_all =\u003e {}}})\nresult.hits.map(\u0026:source) # =\u003e [{'foo' =\u003e 'bar'}, {'foo' =\u003e 'baz'}]\n\n# Delete a document\nindex_a.type('type-a').document(result_a.id).delete\n\n# Query a document by id\ndocument = index_b.type('type-b').document(result_b.id).get\ndocument.source # =\u003e {'foo' =\u003e 'baz'}\n```\n\nCompatibility\n-------------\n\nTested under {mri,jruby,rbx} \u003e 1.8.\n\nCredits\n-------\n\n* [Markus Schirp (mbj)](https://github.com/mbj) Author\n\nContributing\n-------------\n\n* Fork the project.\n* Make your feature addition or bug fix.\n* Add tests for it. This is important so I don't break it in a\n  future version unintentionally.\n* Commit, do not mess with Rakefile or version\n  (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)\n* Send me a pull request. Bonus points for topic branches.\n\nLicense\n-------\n\nThis gem is published under the MIT license. See LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbj%2Fesearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbj%2Fesearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbj%2Fesearch/lists"}