Query Suggestions for Search Feature on B2B eCommerce Site
TLDR arif needed guidance on implementing query suggestions for a B2B eCommerce website. Jason suggested using Typesense's native search query tracking. After some setup and discussion about delays, it was confirmed the system was working correctly.
Jul 17, 2023 (4 months ago)
arif
09:04 AMI need another suggestion regarding Query Suggestions. My site has a large number of pages and a global Search field/widget on top of each page. The requirement is to show popular/relevant search terms/query and actual results of different types in a drop-down list. Showing search result-as-you-type is not applicable for our use-case. What'd be the most effective approach to have meaningful query suggestions along with the categorized results?
One solution comes to mind is to have a secondary index for queries submitted by the users. But this approach unreliable as someone can insert irrelevant/garbage queries in the index. So it does not seems suitable.
Please suggest some standard Typesense solution.
Please note that the search feature is very important as the website is a B2B enterprise eCommerce. So garbage/irrelevant suggestions won't be acceptable.
Thanks!
Jason
07:44 PMJul 18, 2023 (4 months ago)
arif
06:18 AMarif
06:24 AMv0.25.0.rc32
. If we upgrade to 0.25.0.rc52
, we'd get the extra collection Out-of-the-box. And we'd be able to query on this collection onward, right? Or should we also prepare the analytics rule first?Jason
04:47 PMJul 26, 2023 (4 months ago)
arif
09:55 AMAnd I don't think I have ever seen any documentation for the Analytics Rules. If there is any, could you please share the link?
arif
09:59 AM1. We have upgraded the cluster to
v0.25.0.rc53
.2. A new collection has been created with name
top_queries
3. A rule has been created as well.
{
"rules": [
{
"name": "top_queries",
"params": {
"destination": {
"collection": "top_queries"
},
"limit": 1000,
"source": {
"collections": [
"name_of_the_collection_containing_actual_data"
]
}
},
"type": "popular_queries"
}
]
}
Did I miss anything?
arif
10:04 AMJason
04:30 PMCould you DM me your cluster ID? I can check if everything was setup properly on our side
Jul 27, 2023 (4 months ago)
arif
08:43 AMThanks!
Jason
06:57 PMJason
06:57 PMJul 28, 2023 (4 months ago)
arif
07:04 AMWould you provide any details about the delay? I think sometimes queries show up almost instantly. Is it some kind of max delay?
Jason
07:50 PMTypesense
Indexed 3011 threads (79% resolved)
Similar Threads
Troubleshooting Typesense API Analytics Query Suggestions
Md was confused about implementing Typesense's Analytics Query Suggestions and experienced issues with collections returning no hits. Assistance from Kishore Nallan eventually led to the identification that analytics had to be enabled. They also discussed tracking duplicate and empty queries, resulting in Md creating a Github issue.
Resolving Typesense Analytics "top_queries" Collection Issue
Zain faced issues with typesense analytics and an empty "top_queries" collection. Jason and Kishore Nallan assisted in troubleshooting, identified a bug, and suggested a fix in `0.25.0.rc66`. The fix worked for Zain.
Typesense Query Suggestions Throttling Mechanism Discussion
Arad asked about potential abuse of Typesense's query suggestions feature. Jason explained how query uniqueness gets determined based on the `X-TYPESENSE-USER-ID` and `analytics-flush-interval`. It was mentioned creating two GitHub issues about implementing a request limit and ignoring certain search analytics.
Phrase Search Relevancy and Weights Fix
Jan reported an issue with phrase search relevancy using Typesense Instantsearch Adapter. The problem occurred when searching phrases with double quotes. The team identified the issue to be related to weights and implemented a fix, improving the search results.
Revisiting Typesense for Efficient DB Indexing and Querying
kopach experienced slow indexing and crashes with Typesense. The community suggested to use batch import and check the server's resources. Improvements were made but additional support was needed for special characters and multi-search queries.