Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ecto.Enum type inference and map to :keyword #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

halfdan
Copy link

@halfdan halfdan commented Sep 28, 2022

This adds a new mapping for Ecto.Enum types and maps them to an ElasticSearch keyword.

@@ -11,10 +11,11 @@ defmodule ExlasticSearch.TypeInference.Base do
def infer(:float), do: :double
def infer(:string), do: :text
def infer(:binary), do: :text
def infer(Ecto.Enum), do: :keyword
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this'll work for foo: 1, bar: 2 but will it work for ~w(foo bar)a?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants