devflowinc / hn-search-RAG

Hacker News Search and RAG built using Rust actix-web, minijinja, SolidJS, Vite, and Redis queue's
https://hn.trieve.ai
23 stars 2 forks source link

bug: Try With Algolia interaction does not provide a valid `sort` option #130

Open danielsgriffin opened 1 month ago

danielsgriffin commented 1 month ago

Currently the "Try With Algolia" button splits 'sortby:{field}' into sort=by{field). There is never a match. Algolia will always default to byPopularity.

Enumerated options: hn.algolia has sort:

hn.trieve has sortby:

Proposed solutions: (1) Map the default sorting options (relevance to byPopularity and time_stamp to byDate), and others to byPopularity (2) Provide an interstitial not when user clicks this button to remind them of the features not available on the linked-to search system. I.e. provide a directly link only for num_value and time_stamp, but for the other two provide a brief popup (or maybe only a hover tooltip) that reports to the user something like: "HN Search by Algolia does not offer a comparable sort option: {Relevance, Descendants}. This will load the results according to Algolia's default: byPopularity."

There are many mismatches in feature-sets with the many options available with Trieve's discovery-focused setup. Sorting, particularly by item-level relevance, is a feature that users may expect the search system to have and so may be valuable to warn them to avoid surprise and confusion.