You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The order of the fields is important: a record that matches on a field earlier in the list is considered more relevant than a record matched on a field later in the list.
Would be helpful to customize this, even in the simplest manner of multiple fields holding same weight, e.g. 'query_by' => [ [ 'text', 'author' ], 'description' ]
Seems like a pretty common case for a search box not to know what type the user is necessarily searching for.
Steps to reproduce
Expected Behavior
score multiple fields with same weight
Actual Behavior
no way to do this now
Metadata
Typsense Version: 0.9.1
OS: all
btw, typesense is very impressive! Great work! If I can contribute in any way, let me know, and I will try.
The text was updated successfully, but these errors were encountered:
@stefangomez Good idea - definitely see this being useful. There are 2 potential ways to achieve this:
Allow the weights to be specified in the query_by parameter in the following format: text:2,author:2,description:1
Have a separate query_by_weights parameter that sets the respective weights for the fields mentioned in the query_by parameter, e.g. query_by=text,author,description&query_by_weights=2,2,1
For eg: query_by_weights: 1,1,2 with query_by: field_a,field_b,field_c will give equal weightage to field_a and field_b, and will give twice the weightage to field_c comparatively.
Description
Right now, according to docs:
Would be helpful to customize this, even in the simplest manner of multiple fields holding same weight, e.g.
'query_by' => [ [ 'text', 'author' ], 'description' ]
Seems like a pretty common case for a search box not to know what type the user is necessarily searching for.
Steps to reproduce
Expected Behavior
score multiple fields with same weight
Actual Behavior
no way to do this now
Metadata
Typsense Version: 0.9.1
OS: all
btw, typesense is very impressive! Great work! If I can contribute in any way, let me know, and I will try.
The text was updated successfully, but these errors were encountered: