ExTypesense.Stopwords (ExTypesense v2.0.0)
View SourceStopwords are keywords which will be removed from search query while searching.
During indexing
Stopwords are NOT dropped during indexing.
More here: https://typesense.org/docs/latest/api/stopwords.html
Summary
Functions
Permanently deletes a stopwords set, given it's name.
Retrieve the details of a stopwords set, given it's name.
Retrieves all stopwords sets.
Same as list_stopwords/0
Upserts a stopwords set.
Functions
@spec delete_stopword(String.t()) :: {:ok, map()} | {:error, OpenApiTypesense.ApiResponse.t()}
Permanently deletes a stopwords set, given it's name.
@spec delete_stopword( String.t(), keyword() ) :: {:ok, map()} | {:error, OpenApiTypesense.ApiResponse.t()}
Same as delete_stopword/1
Options
conn
: The custom connection map or struct you passed
Examples
iex> conn = %{api_key: xyz, host: ...}
iex> ExTypesense.delete_stopword("stopword_set_countries", conn: conn)
iex> conn = OpenApiTypesense.Connection.new()
iex> ExTypesense.delete_stopword("stopword_set_countries", conn: conn)
iex> opts = [conn: conn]
iex> ExTypesense.delete_stopword("stopword_set_countries", opts)
@spec get_stopword(String.t()) :: {:ok, OpenApiTypesense.StopwordsSetRetrieveSchema.t()} | {:error, OpenApiTypesense.ApiResponse.t()}
Retrieve the details of a stopwords set, given it's name.
@spec get_stopword( String.t(), keyword() ) :: {:ok, OpenApiTypesense.StopwordsSetRetrieveSchema.t()} | {:error, OpenApiTypesense.ApiResponse.t()}
Same as get_stopword/1
Options
conn
: The custom connection map or struct you passed
Examples
iex> conn = %{api_key: xyz, host: ...}
iex> ExTypesense.get_stopword("stopword_set_countries", conn: conn)
iex> conn = OpenApiTypesense.Connection.new()
iex> ExTypesense.get_stopword("stopword_set_countries", conn: conn)
iex> opts = [conn: conn]
iex> ExTypesense.get_stopword("stopword_set_countries", opts)
@spec list_stopwords() :: {:ok, OpenApiTypesense.StopwordsSetsRetrieveAllSchema.t()} | :error
Retrieves all stopwords sets.
@spec list_stopwords(keyword()) :: {:ok, OpenApiTypesense.StopwordsSetsRetrieveAllSchema.t()} | :error
Same as list_stopwords/0
Options
conn
: The custom connection map or struct you passed
Examples
iex> conn = %{api_key: xyz, host: ...}
iex> ExTypesense.list_stopwords(conn: conn)
iex> conn = OpenApiTypesense.Connection.new()
iex> ExTypesense.list_stopwords(conn: conn)
iex> opts = [conn: conn]
iex> ExTypesense.list_stopwords(opts)
@spec upsert_stopword(String.t(), map()) :: {:ok, OpenApiTypesense.StopwordsSetSchema.t()} | {:error, OpenApiTypesense.ApiResponse.t()}
Upserts a stopwords set.
Examples
iex> body = %{
...> "stopwords" => [
...> "Bustin Jieber",
...> "Pelvis Presly",
...> "Tinus Lorvalds",
...> "Britney Smears"
...> ],
...> "locale" => "en"
...> }
iex> ExTypesense.upsert_override("stopwords-famous-person", body)
@spec upsert_stopword(String.t(), map(), keyword()) :: {:ok, OpenApiTypesense.StopwordsSetSchema.t()} | {:error, OpenApiTypesense.ApiResponse.t()}
Same as upsert_stopword/2
Options
conn
: The custom connection map or struct you passed
Examples
iex> conn = %{api_key: xyz, host: ...}
iex> ExTypesense.upsert_stopword("stopword_set_countries", body, conn: conn)
iex> conn = OpenApiTypesense.Connection.new()
iex> ExTypesense.upsert_stopword("stopword_set_countries", body, conn: conn)
iex> opts = [conn: conn]
iex> ExTypesense.upsert_stopword("stopword_set_countries", body, opts)