Skip to content

Commit 2ee575e

Browse files
committed
Parsing results from using multi search unions
1 parent 5684996 commit 2ee575e

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## major.minor.patch (yyyy.mm.dd)
99

10+
## 0.7.1 (2025.04.06)
11+
12+
### Fixed
13+
14+
* Parsing results from using multi search [unions](https://typesense.org/docs/28.0/api/federated-multi-search.html#union-search)
15+
1016
## 0.7.0 (2025.04.06)
1117

1218
### Changed ([#28](https://github.com/jaeyson/open_api_typesense/pull/28))

lib/open_api_typesense/client.ex

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,16 @@ defmodule OpenApiTypesense.Client do
205205
end
206206
end
207207

208+
defp parse_values(
209+
code,
210+
{module, _func_name} = _values,
211+
%{hits: results, union_request_params: _} = _body
212+
) do
213+
status = if code in 200..299, do: :ok, else: :error
214+
215+
{status, struct(module, %{results: results})}
216+
end
217+
208218
defp parse_values(code, {module, _func_name} = _values, body) do
209219
status = if code in 200..299, do: :ok, else: :error
210220

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule OpenApiTypesense.MixProject do
33

44
@source_url "https://github.com/jaeyson/open_api_typesense"
55
@hex_url "https://hexdocs.pm/open_api_typesense"
6-
@version "0.7.0"
6+
@version "0.7.1"
77

88
def project do
99
[

0 commit comments

Comments
 (0)