How are you implementing site search


#83

Yes. I know I’m getting to be a bit like a dog with a bone about this. But it’s driving me mad. Today, I was trying to find some info for someone on one of the blogs where I implemented DuckDuckGo Search way back [according to my first posts in this thread] in March 2016. That’s a full two years ago!

…and it’s still returning results pointing to URLs which date from the time the blog was hosted on WordPress, which is even longer ago than that. This is in spite of the fact that I have submitted XML sitemaps to Yandex [who power DDG Search] on numerous occasions and jumped through every “webmaster” hoop they offer.

How can a search engine be so bad at updating its index? As I’ve said ad nauseam Google updates search results for my sites almost instantly without me doing anything. DuckDuckGo / Yandex can’t even do it when given over two years and me guiding them along the way!

Here are the results for searching for ‘gear linkage’ on the site. The top two results are URLs from prior to March 2016, when the site was running on WordPress. It’s not til the 3rd and 4th results that we get a couple of the newer Hugo URLs. This mess carries on throughout all the search results for any search made on the site.


#84

Funny that this thread is revived just about as I am done adding (finally) search to my site. I just posted about that here:

Spoiler: This Fuse.js method for implementing the site is very simple, and works great! :smiley:


Fuzzy Search with Fuse, Vue and Mark
#85

Fuse is cool and it’s very fast. My only gripe so far is that it’s not designed for exact matches. In other words, if the user searches for privacy policy and the JSON blob contains items with privacy or policy those’ll be returned in the result set.

Interested in seeing a vanilla JS implementation which filters the Fuse result set for an optional exact match.

UPDATE: Rolled a vanilla implementation. After Dark now supports fuzzy search with Fuse. See the After Dark docs for more info.

Demo time: https://hackcabin.com/search/?s=secure