TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: What's the best way to add search to my website?

5 点作者 lucgagan超过 1 年前
I have a quite unique website https:&#x2F;&#x2F;ray.run&#x2F;<p>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.<p>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?

6 条评论

rovr138超过 1 年前
Add a search box, on submit, open a new tab with &#x27;site:ray.run&#x27;. You can do this on Google or DuckDuckGo,<p>- <a href="https:&#x2F;&#x2F;duckduckgo.com&#x2F;?q=site%3Aray.run+playwright+test&amp;t=ffab&amp;ia=web" rel="nofollow noreferrer">https:&#x2F;&#x2F;duckduckgo.com&#x2F;?q=site%3Aray.run+playwright+test&amp;t=f...</a><p>- <a href="https:&#x2F;&#x2F;www.google.com&#x2F;search?q=site%3Aray.run+playwright+test" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.google.com&#x2F;search?q=site%3Aray.run+playwright+te...</a><p>Keep it simple for now.
评论 #37817626 未加载
fabianholzer超过 1 年前
If 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<p>* <a href="https:&#x2F;&#x2F;stork-search.net&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;stork-search.net&#x2F;</a> (Rust&#x2F;WASM)<p>* tinysearch: <a href="https:&#x2F;&#x2F;github.com&#x2F;tinysearch&#x2F;tinysearch">https:&#x2F;&#x2F;github.com&#x2F;tinysearch&#x2F;tinysearch</a> (Rust&#x2F;WASM)<p>* <a href="https:&#x2F;&#x2F;lunrjs.com&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;lunrjs.com&#x2F;</a> (JS, simple, stable)<p>* <a href="http:&#x2F;&#x2F;elasticlunr.com&#x2F;" rel="nofollow noreferrer">http:&#x2F;&#x2F;elasticlunr.com&#x2F;</a> - based on the former, slightly more sophisticated tuning options
ezedv超过 1 年前
Your website <a href="https:&#x2F;&#x2F;ray.run&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;ray.run&#x2F;</a> does have that nostalgic early 2000s vibe, which is cool! Regarding the search functionality, you might want to explore open-source alternatives to Algolia.<p>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.<p>In case you need help or assistance with your project, feel free to contact us! <a href="https:&#x2F;&#x2F;www.ratherlabs.com" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.ratherlabs.com</a>
james-revisoai超过 1 年前
This thread makes me feel old... I remember seeing &quot;Google Custom Search&quot; 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&#x27;t tend to know of it, seems so odd...
lucgagan超过 1 年前
Looks like Google has a way of doing it <a href="https:&#x2F;&#x2F;programmablesearchengine.google.com&#x2F;controlpanel&#x2F;create" rel="nofollow noreferrer">https:&#x2F;&#x2F;programmablesearchengine.google.com&#x2F;controlpanel&#x2F;cre...</a>
评论 #37816594 未加载
dotcoma超过 1 年前
Free <a href="https:&#x2F;&#x2F;www.mojeek.com&#x2F;services&#x2F;search&#x2F;searchbox.html" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.mojeek.com&#x2F;services&#x2F;search&#x2F;searchbox.html</a><p>Paid <a href="https:&#x2F;&#x2F;www.mojeek.com&#x2F;services&#x2F;search&#x2F;site-search-api&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.mojeek.com&#x2F;services&#x2F;search&#x2F;site-search-api&#x2F;</a>
评论 #37817203 未加载