Hey All, I am facing a small issue while trying to...
# community-help
n
Hey All, I am facing a small issue while trying to query the typesense API with an array of strings {{url}}/collections/{{collection_name}}/documents/search?q=[abc.com , abcd.com ]&query_by=server_name The result contains only the records of the first server_name which is abc.com. If I pass [abcd.com ,abc.com], the result contains the records of only abcd.com Any ideas on what am I missing here? Objective is to return the records from typesense collection for both abc.com and abcd.com Thanks a lot :)
Seems like the following is working for me. {{url}}/collections/{{collection_name}}/documents/search?q=*&query_by=server_name&filter_by=server_name:[abcd.com , abc.com] Please feel to suggest alternatives to the above use case.
k
👋 I wonder if this is a url encoding issue. Can you try the
multi_search
end-point? It sends the request as a POST body so no url encoding is done.
Also:
Copy code
q=[<http://abc.com|abc.com> , <http://abcd.com|abcd.com> ]
Is not a valid syntax. The
q
must be just a string. It's filter_by where you can provide list of strings.
So, actually your approach of using filter is correct.
👍 1
n
Thank You! @Kishore Nallan