Doesn't show my search result

Hello there,
According to docs, i’m setup in my astro project but it not showing any results yet. see this picture where i’m searching something its are empty (see my payload).

first time i’m using maybe something missing or else. can anyone help me out from this?

Hi @elecabunaser and welcome!

A few baseline things to check:

  • Did you a do a re-deploy of your Netlify site after installing the plugin?
  • Did the crawl of your site complete successfully in the Crawler Admin Console
  • Do you see records in your index?

You can see all of these steps here: Quickstart for Using Algolia on Netlify | Algolia

HI Chuck,
Yes i followed these steps, just checked again, also re-deployed but its not take any records from my site.
I’m using astro build for UI and it also translate with 2 languages.
any required instructions for multi-languages?

after build successfully, it says me Unauthorized
when i click this link (https://crawler.algolia.com/api/1/netlify/crawl) .
maybe its not properly authorized what did you say?

Thank you so much

Hmmm… If you have records in your index, I wonder if it’s an issue with the index configuration? What attributes do you have configured as searchable?

manually i’m not configured anything, just follow the quick install guide and setup front end.

please see this pic:

configuration option:

Hi @elecabunaser – In that first screen shot it says “No (number of) records: 0” and “No records yet”. It looks like your record crawl has either failed, or the records are going to another index.

Hi chuck,
what should i do now?
remove this one and reinstall it ? or if the records save another index how can i find that records?
whats your suggestions for me?

I would check to see if your crawler was successful indexing your site. Go back to the crawler dashboard and check the status. It should look like this

Make sure there was a successful crawl, and check the record count in the right most column.

i see this screen:

Yup. Your crawler didn’t find any records. Are you working on your main branch? From the docs:

By default, Algolia solely builds the main and master branch. Algolia can still create one crawler (targeting one Algolia index) per Git branch, so that you can have, for example, a production index on master and development index on develop . You need to configure the branches plugin input to enable this feature. If you’re using Algolia for Netlify front-end library, it’s required for you to pass the branch name in the library parameters.

Next I would check your Netlify Deploy logs to see if there’s any more information there around why your crawler isn’t finding your records.

yah by default its taking main branch, when these setup not working after that i add plugins in netlify.toml

[[plugins]]
package = "@algolia/netlify-plugin-crawler"
  [plugins.inputs]
  branches = ['main', 'master', 'difference-astro']

i’m adding build logs please see this:

Hmmm… this is when you start to lose me and you should probably open a ticket with support, but I don’t like the look of that missing "dist" warning. It might be something specific to the way astro is building that breaks assumptions the Algolia plugin is making.

Hi Chuck,
I’m still stuck here, please help me to solve this, if i create a new ticket maybe it would be skip this conversation that’s why i’m reply here.

Yes i solve that error, deploy fresh app but still no records what i miss can’t understand.
please see my updates build logs:

Hey there – the crawler team had one more suggestion – they think it may be your page requires a meta refresh action to render properly. For that, you’ll need to turn Javascript on for your Crawler using Crawler: RenderJavaScript | Algolia

1 Like

Hi Chuck,
I’m clarify one thing which read about crawl and that’s need to send crawl from from frontend, i’m not implement this in my netlify app. maybe that’s the issue. cause i’m not send any records to saved in algolia index records. i’m just setup code snippet(see pic) in my latyouts otherwise nothing implement for algolia. can you clarify this for me?

If this is true how can i send crawl from frontend in my astro project?
can you give any example for this.

Thank you so much.

Hi Chuck,
Thank you so much man, finally its working properly!

Just one thing its take my all “en” articles not take any “fr”/“ar” articles. how can i define them to take all languages articles.

1 Like

Make sure you have all the variations of the article defined in your sitemap and DocSearch should find them,

You can explicitly tell DocSearch about a page’s language by adding a meta tag to your page (<meta name="docsearch:language" content="en" />). The Crawler can also pick up on the “lang” attribute of elements if you include that. This should give you an attribute in your index that you can use to filter records of a particular language.

1 Like

Hi Chuck,
Thank you so much man!

1 Like

No problem. Feel free to share what you built when it’s up and running!

1 Like

Hi Chuck,
I’m just building a test project, where i’m implement new techs(for me). it will be help center for our current project. please check it out if you’ve any suggestion, i’d love to accept.

Thank you for your co-operation

1 Like