Created
January 10, 2022 13:00
-
-
Save rafaltrojanowski/a669f23721d0c4a2648220ff458be17a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Local fix of type: | |
index = "answers" | |
{:ok, response} = Domain.Env.get(:elasticsearch_url) |> URI.merge("/#{index}/_mapping?pretty") |> URI.to_string() |> Elastix.HTTP.get() | |
body = response.body | |
Map.keys(body["answers"]["mappings"]["properties"]["label_ids_with_keywords"]["properties"]) |> Enum.count |
can use Elastic API to to most of the operations, but not sure if all are supported thought (I'd like to get all indexes to check those for a specific organizations) like this:
curl -X GET "localhost:9200/_cat/indices/*?v&s=index&pretty"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Update mapping: