Hi, this is my first time using this library and sphinx so i do not know if this is an issue with my usage/configuration or due to a sphinx update or something.
When trying to call get_doc_ids with the result of a sphinxql response, this match fails
defp get_doc_ids([query_attr|tail], accum) do
{doc_id, _} = query_attr # fail!!
new_accum = [doc_id|accum]
get_doc_ids(tail, new_accum)
end
I've changed the code to this to make it work
defp get_doc_ids([query_attr|tail], accum) do
doc_id = query_attr
new_accum = [doc_id|accum]
get_doc_ids(tail, new_accum)
end
Now the question i have is this: Did sphinx change something with the returned matches field (using sphinx 3.0.2) which would cause this error now, or are my results just different due to a misconfiguration which would make this code edit breaking on other installs?
I'm new to elixir but if the original code's intention was to get the id from the list why not just do doc_id = hd(query_attr) which would return what the documentation shows ([1, 4, 6, 12, ..])
Hi, this is my first time using this library and sphinx so i do not know if this is an issue with my usage/configuration or due to a sphinx update or something.
When trying to call
get_doc_ids
with the result of a sphinxql response, this match failsResponse:
I've changed the code to this to make it work
Now the question i have is this: Did sphinx change something with the returned
matches
field (using sphinx 3.0.2) which would cause this error now, or are my results just different due to a misconfiguration which would make this code edit breaking on other installs?I'm new to elixir but if the original code's intention was to get the id from the list why not just do
doc_id = hd(query_attr)
which would return what the documentation shows ([1, 4, 6, 12, ..]
)