{"id":14969817,"url":"https://github.com/solutions-territoire/caoutsearch","last_synced_at":"2025-10-26T09:31:05.432Z","repository":{"id":59892795,"uuid":"536972544","full_name":"solutions-territoire/caoutsearch","owner":"solutions-territoire","description":"An alternative approach to index \u0026 search with Elasticsearch \u0026 Ruby on Rails","archived":false,"fork":false,"pushed_at":"2024-08-27T20:09:04.000Z","size":989,"stargazers_count":2,"open_issues_count":3,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-09-28T12:04:18.018Z","etag":null,"topics":["elasticsearch","index","rails","ruby","search"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/solutions-territoire.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":"2022-09-15T10:21:50.000Z","updated_at":"2024-08-27T20:06:11.000Z","dependencies_parsed_at":"2024-08-27T21:28:36.723Z","dependency_job_id":null,"html_url":"https://github.com/solutions-territoire/caoutsearch","commit_stats":{"total_commits":106,"total_committers":3,"mean_commits":"35.333333333333336","dds":0.1132075471698113,"last_synced_commit":"add8862fe686d8a245e766daab77663ff88880c5"},"previous_names":["solutions-territoire/caoutsearch","mon-territoire/caoutsearch"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutions-territoire%2Fcaoutsearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutions-territoire%2Fcaoutsearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutions-territoire%2Fcaoutsearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutions-territoire%2Fcaoutsearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solutions-territoire","download_url":"https://codeload.github.com/solutions-territoire/caoutsearch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219863299,"owners_count":16555950,"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":["elasticsearch","index","rails","ruby","search"],"created_at":"2024-09-24T13:42:26.568Z","updated_at":"2025-10-26T09:31:00.075Z","avatar_url":"https://github.com/solutions-territoire.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Caoutsearch [\\ˈkawt͡ˈsɝtʃ\\\\](http://ipa-reader.xyz/?text=ˈkawt͡ˈsɝtʃ)\n\n\u003cspan\u003e[![Gem Version](https://badge.fury.io/rb/caoutsearch.svg)](https://rubygems.org/gems/caoutsearch)\u003c/span\u003e \u003cspan\u003e\n[![CI Status](https://github.com/solutions-territoire/caoutsearch/actions/workflows/ci.yml/badge.svg)](https://github.com/solutions-territoire/caoutsearch/actions/workflows/ci.yml)\u003c/span\u003e \u003cspan\u003e\n[![Ruby Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/testdouble/standard)\u003c/span\u003e \u003cspan\u003e\n[![Maintainability](https://api.codeclimate.com/v1/badges/fbe73db3fd8be9a10e12/maintainability)](https://codeclimate.com/github/solutions-territoire/caoutsearch/maintainability)\u003c/span\u003e \u003cspan\u003e\n[![Test Coverage](https://api.codeclimate.com/v1/badges/fbe73db3fd8be9a10e12/test_coverage)](https://codeclimate.com/github/solutions-territoire/caoutsearch/test_coverage)\u003c/span\u003e\n\n\u003cspan\u003e[![JRuby](https://github.com/solutions-territoire/caoutsearch/actions/workflows/jruby.yml/badge.svg)](https://github.com/solutions-territoire/caoutsearch/actions/workflows/jruby.yml)\u003c/span\u003e \u003cspan\u003e\n[![Truffle Ruby](https://github.com/solutions-territoire/caoutsearch/actions/workflows/truffle_ruby.yml/badge.svg)](https://github.com/solutions-territoire/caoutsearch/actions/workflows/truffle_ruby.yml)\u003c/span\u003e\n\n**!! Gem under development before public release !!**\n\nCaoutsearch is a new Elasticsearch integration for Ruby and/or Rails.  \nIt provides a simple but powerful DSL to perform complex indexing and searching, while securely exposing search criteria to a public and chainable API, without overwhelming your models.\n\nCaoutsearch only supports Elasticsearch 8.x right now.  \nIt is used in production in a robust application, updated and maintained for several years at [Solutions \u0026 Territoire](https://solutions-territoire.fr).\n\nCaoutsearch was inspired by awesome gems such as [elasticsearch-rails](https://github.com/elastic/elasticsearch-rails) or [search_flip](https://github.com/mrkamel/search_flip).  \nDepending on your search scenarios, they may better suite your needs.\n\n## Documentation\n\nVisit our [offical documentation](https://solutions-territoire.github.io/caoutsearch) to understand how to use Caoutsearch.\n\n## Installation\n\nAdd the gem in your Gemfile:\n\n```bash\nbundle add caoutsearch\n```\n\n## Overview\n\nCaoutsearch let you create `Index` and `Search` classes to manipulate your data :\n\n```ruby\nclass ArticleIndex \u003c Caoutsearch::Index::Base\n  property :title\n  property :published_on\n  property :tags\n\n  def tags\n    records.tags.public.map(\u0026:to_s)\n  end\nend\n\nArticleIndex.reindex(:tags)\n```\n\n```ruby\nclass ArticleSearch \u003c Caoutsearch::Search::Base\n  filter :title, as: :match\n  filter :published_on, as: :date\n  filter :tags\n\n  has_aggregation :popular_tags, {\n    filter: { term: { published: true } },\n    aggs: {\n      published: {\n        terms: { field: :tags, size: 10 }\n      }\n    }\n  }\nend\n\nArticleSearch.search(published_on: [[\"now-1y\", nil]]).aggregate(:popular_tags)\n```\n\n## Contributing\n\n1. Don't hesitate to submit your feature/idea/fix in [issues](https://github.com/solutions-territoire/caoutsearch/issues)\n2. Fork the [repository](https://github.com/solutions-territoire/caoutsearch)\n3. Create your feature branch\n4. Ensure RSpec \u0026 Rubocop are passing\n4. Create a pull request\n\n### Tests \u0026 lint\n\n```bash\nbundle exec rspec\nbundle exec rubocop\nbundle exec standardrb\n```\n\nTo run RSpec against various version of Rails dependencies:\n```bash\nbundle exec appraisal install\nbundle exec appraisal rspec\n```\n\nAll of them can be run with:\n\n```bash\nbundle exec rake\n```\n\n## License \u0026 credits\n\nPlease see [LICENSE](https://github.com/solutions-territoire/caoutsearch/blob/main/LICENSE) for further details.\n\nContributors: [./graphs/contributors](https://github.com/solutions-territoire/caoutsearch/graphs/contributors)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolutions-territoire%2Fcaoutsearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolutions-territoire%2Fcaoutsearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolutions-territoire%2Fcaoutsearch/lists"}