Ecto.Adapters.DynamoDB.Query.get_best_index

You're seeing just the function get_best_index, go back to Ecto.Adapters.DynamoDB.Query module for more information.
Link to this function

get_best_index(repo, tablename, search, opts)

View Source

Specs

get_best_index(Ecto.Repo.t(), table_name(), search(), query_opts()) ::
  :not_found
  | {:primary, [String.t()]}
  | {:primary_partial, [String.t()]}
  | {String.t(), [String.t()]}
  | {:secondary_partial, String.t(), [String.t()]}
  | no_return()

Given a map with a search criteria, finds the best index to search against it. Returns a tuple indicating whether it's a primary key index, or a secondary index. To query against a secondary index in Dynamo, we NEED to have it's index name, so secondary indexes are returned as a tuple with the field name, whilst the primary key uses the atom :primary to distinguish it.

| {"index_name", [indexed_fields_list]}

Exception if the index doesn't exist.