View Source ExTypesense.Search (ExTypesense v0.3.5)
Module for searching documents.
Link to this section Summary
Functions
Search from a document.
Link to this section Types
@type response() :: Ecto.Query.t() | {:ok, map()} | {:error, map()}
Link to this section Functions
Search from a document.
examples
Examples
iex> params = %{q: "umbrella", query_by: "title,description"}
iex> ExTypesense.search(Something, params)
{:ok,
%{
"facet_counts" => [],
"found" => 0,
"hits" => [],
"out_of" => 0,
"page" => 1,
"request_params" => %{
"collection_name" => "something",
"per_page" => 10,
"q" => "umbrella"
},
"search_cutoff" => false,
"search_time_ms" => 5
}
}