Hello, I've 2 questions. 1. Given the data like t...
# community-help
p
Hello, I've 2 questions. 1. Given the data like this
Copy code
{
   "invoice_number": "inv123456",
   "company_name": "company name",
}
for query
inv
, I get expected result
<mark>inv</mark>123456
but for the query
inv company
, I get a match only for the company name, expected is to match both fields am I missing something here? 2. We are doing multi search on 4 collections, whats the best to sort results for a combined array ? is
text_match
is enough for this? Thank you 🙂
Any help would be appreciated @Kishore Nallan @Jason Bosco 🙏
k
Typesense does prefix search only for the last word in the query. Since
inv
is the first word in the query
inv company
it won't match
inv123456
For sorting, you can use the text match value in the text_match_info object associated with each it.
p
Typesense does prefix search only for the last word in the query. Since
inv
is the first word in the query
inv company
it won't match
inv123456
@Kishore Nallan is there a way/option to change this behaviour and make it match both fields ?
k
No that's not possible.
👍 1
j
Can this possibly be solved by using
filter_by=invoice_number:inv
instead of putting
inv
in the search query?
k
No filtering does not support any prefix searching.
1
j
@Pankaj Adhyapak Could you add your example as a comment to this issue: https://github.com/typesense/typesense/issues/920