6 ms·
Ask HN: What's the best way to add search to my website?
I have a quite unique website https://ray.run/
I tried to create a website like the ones I remember browsing back in early 2000s. It has questions from the users, discord forum archive, dev tools, videos, etc.
I want to find a way to add search for users. I see it on the other websites, and usually they use Algolia. However, my community is entirely free and their product is paid. What can I do instead?
- lucgagan 3y agoLooks like Google has a way of doing it https://programmablesearchengine.google.com/controlpanel/create https://programmablesearchengine.google.com/controlpanel/cre...
- lucgagan 3y agoVery interesting. You are even allowed to upload your own search annotations, i.e. suggestions for search results. https://cse.google.com/cse?cx=210b5e0b95aee4c07#gsc.tab=0 https://cse.google.com/cse?cx=210b5e0b95aee4c07#gsc.tab=0 The end result is not too bad considering it is entirely free!
- lucgagan 3y agoThe only downside is that it seems you cannot disable promotions/ads
- lucgagan 3y agoIt honestly looks not too bad! Took a bit of time to customize it, but you can match your website style pretty closely. https://cse.google.com/cse?cx=210b5e0b95aee4c07&q=test#gsc.tab=0&gsc.q=Detecting%20and%20fixing%20flaky%20tests%20in%20Playwright https://cse.google.com/cse?cx=210b5e0b95aee4c07&q=test#gsc.t...
- rovr138 3y agoAdd a search box, on submit, open a new tab with 'site:ray.run'. You can do this on Google or DuckDuckGo, - https://duckduckgo.com/?q=site%3Aray.run+playwright+test&t=ffab&ia=web https://duckduckgo.com/?q=site%3Aray.run+playwright+test&t=f... - https://www.google.com/search?q=site%3Aray.run+playwright+test https://www.google.com/search?q=site%3Aray.run+playwright+te... Keep it simple for now.
- ggeorgovassilis 3y agoI feel stupid and embarrassed after spending a weekend implementing my own elastic-based solution.
- solardev 3y agoAt least you can tinker with it and add your own weights and such to float better results, hopefully?
- dotcoma 3y agoFree https://www.mojeek.com/services/search/searchbox.html https://www.mojeek.com/services/search/searchbox.html Paid https://www.mojeek.com/services/search/site-search-api/ https://www.mojeek.com/services/search/site-search-api/
- lucgagan 3y agoTheir demo crashes when I try to use it
- fabianholzer 3y agoIf your content is mostly static, you might want to consider pre-building an index and shipping it as a whole. You could look into something like * https://stork-search.net/ https://stork-search.net/ (Rust/WASM) * tinysearch: https://github.com/tinysearch/tinysearch https://github.com/tinysearch/tinysearch (Rust/WASM) * https://lunrjs.com/ https://lunrjs.com/ (JS, simple, stable) * http://elasticlunr.com/ http://elasticlunr.com/ - based on the former, slightly more sophisticated tuning options
- james-revisoai 3y agoThis thread makes me feel old... I remember seeing "Google Custom Search" with Custom Search in grey on so many websites just maybe 12-15 years ago - for it to be so unusual that people on HN don't tend to know of it, seems so odd...
- ezedv 3y agoYour website https://ray.run/ https://ray.run/ does have that nostalgic early 2000s vibe, which is cool! Regarding the search functionality, you might want to explore open-source alternatives to Algolia. Projects like Elasticsearch, Solr, or even using Google Custom Search can provide search capabilities without the cost. They might require a bit more setup and maintenance, but they can be budget-friendly options for a free community. In case you need help or assistance with your project, feel free to contact us! https://www.ratherlabs.com https://www.ratherlabs.com