Skip to content

Commit

Permalink
fix: Searches for climbs should consider parent areas, not descriptions
Browse files Browse the repository at this point in the history
When searching for a climb, it is useful to be able to narrow the number
of results by including the parent areas' names.  open-tacos does not
include parent area names as a field when querying, so this did not work.
On the other hand, it does include descriptions, which results in many
spurious matches.

Fix this by searching on route names and area names instead of route
names and descriptions.

Fixes #907
  • Loading branch information
musoke committed Jul 12, 2023
1 parent 68efdd9 commit aaaa13c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/js/typesense/TypesenseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ export async function multiSearch (query: string): Promise<MultisearchReturnType
searches: [
{
q: query,
query_by: 'climbName, climbDesc',
query_by: 'climbName, areaNames',
collection: 'climbs',
exclude_fields: 'climbDesc',
page: 1,
per_page: 7
},
Expand Down

0 comments on commit aaaa13c

Please sign in to comment.