AepfOpensearch

AepfOpensearch is an Elixir library that provides an OpenSearch data layer integration for the Ash Framework. It enables seamless interaction between Ash resources and OpenSearch, facilitating efficient data querying and indexing.

Features

Installation

Add aepf_opensearch to your list of dependencies in mix.exs:

def deps do
  [
    {:aepf_opensearch, "~> 0.1.0"}
  ]
end

Then, run:

mix deps.get

Configuration

Configure the OpenSearch client in your application's config files:

config :aepf_opensearch, AepfOpensearch.Client,
  base_url: "http://localhost:9200",
  json_library: Jason

Usage

To use AepfOpensearch as the data layer for an Ash resource:

defmodule MyApp.BlogPost do
  use Ash.Resource,
    data_layer: AepfOpensearch.DataLayer

  data_layer do
    config :index, "blog_posts"
  end

  # Define your attributes and actions here
end

Documentation

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/aepf_opensearch.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open issues or submit pull requests for any enhancements or bug fixes.