Closed baumannzone closed 1 year ago
Please let me know if there is any further information or details I can provide to assist with troubleshooting this issue."
your index needs the lang
information too as we are filtering based on that
Hi, @brc-dd! Thanks for your reply.
Where should I put that lang
key and what values does it accept, any link to the doc?
My question is, why does it work through the API?
I'm not sure how you're creating that index, but if you'd run algolia's crawler it would've indexed the html lang attribute too.
It's working through the API because you haven't specified facetFilters: ['lang:en-US']
in your request.
Im using the free quote, I don't have access to the crawler. I'm completely new to Algolia, I may be missing something (?)
Just a clarification on our side: we only support https://docsearch.algolia.com/ (docsearch is free for open-source libraries). If that's the case for you, then you can use https://crawler.algolia.com/admin/ to access crawler configuration.
If that's not the case, then you will need to build your own search component or use any of the ones mentioned at #670
Thanks for your clarification. It's a public repo and it's open source. Here is the website and this is the repo.
So if I'm not wrong, I should have access to the algolia crawler, right?
Yeah, you should have, can you try logging in that admin dashboard?
Thank you. Actually, I dont have access. But it looks like an auth error. I will try later.
If it's a blocker than try downgrading to vitepress@1.0.0-alpha.36
or older. Those versions should work. Or you can also patch vitepress to delete this line:
I just requested access to the crawler. It seems to be that was the problem. If that doesn't solve my problem, I'll be creating a custom search component. Let's keep this issue open until I figure out what's going on.
As feedback, I think Vitepress docs should provide more context about how Algolia should work.
If you really need a fast solution and you need the newest vitepress version you can try vitepress-plugin-search
.
It is an offline search so you dont need to register anything, in the meantime you can try to configure angolia.
//vite.config.ts
import { SearchPlugin } from "vitepress-plugin-search";
import { defineConfig } from "vite";
//default options
var options = {
...flexSearchIndexOptions,
previewLength: 62,
buttonLabel: "Search",
placeholder: "Search docs",
};
export default defineConfig({
plugins: [SearchPlugin(options)],
});
As feedback, I think Vitepress docs should provide more context about how Algolia should work.
Yeah, the docs are missing many things. I agree that it's sort of ironic considering we are building a docs-centered framework 😅. But yeah we will update that with an official crawler config and hopefully support for local search as well.
After you get access, try adding attributesForFaceting (ref. https://github.com/vuejs/vitepress/issues/1935#issuecomment-1433765099)
Thank you very mucho, amigo. I'll let you know how it goes.
@MarkusKeck I want to try using the default search component, I'll try your solution if I can't get it to work.
I just got a message, it says my site won't be accepted bcs is under construction and has tons of lorem ipsum
s text. But I think when I finish creating the website, I will be given access to the tool.
Let's move this to discussion. If there is any issue you need some help you can directly post in our discord too.
Describe the bug
I am experiencing an issue with the integrated search component (Algolia). The search function is not working properly, as it returns zero results when I use the web interface in my recently created project with Vitepress.
However, if I perform a search using the API or on Algolia's website, the search function works correctly and returns results.
It's possible that there may be an issue with the search component in Vitepress that's causing this problem.
I wanted to bring this to your attention in the hopes that it can be addressed and fixed as soon as possible.
Reproduction
Expected behavior
Show results after searching
System Info
Additional context
UI Request:
Request Method:
POST
Status Code:200 OK
API Request (Node.js)
Validations