Comments (7)
Actually misunderstood you and thought to hardcode in the config file. Tracked down function in the plugin and hardcoded them and got further than I have (as I actually saw it start to index in console) but then it threw an error.
Several errors and reconfiguring later I found it was primarily a casing issue. I was trying pass appID
instead of appId
.
Thanks for your patience and assistance! I was doing a whole bunch of other things wrong haha like using the example docs instead of pulling my data from frontmatter, as I'm just using markdown files.
from gatsby-plugin-algolia.
Ok, so you have defined those variables in your .env file,
GATSBY_ALGOLIA_APP_ID and GATSBY_ALGOLIA_ADMIN_KEY, right?
Try hardcode them in the algoliasearch function.
Example:
algoliasearch('Y8WP8K7U3C', '91672f58492a3cd67dc5a386cc83c208')
Is a good idea to set your indexName anyway.
from gatsby-plugin-algolia.
Im glad to know it!
But, particularly, I found very complicated the example they passed there https://www.gatsbyjs.org/docs/adding-search-with-algolia
I'm using another plugin, forked from this here, - Gatsby plugin algolia search
Found it better because it makes partial updates, only when a new post is added, or an existing post is updated or deleted. Different from this, which updates all the records on each update.
from gatsby-plugin-algolia.
O wow yeah, the tutorial had several holes that I had to change that threw me off but I figured it was just me and being very inexperienced with search.
Thank you for pointing me to the other plugin that seems like it makes so much more sense considering the partial updates. I had read a little bit about a pull request on here to incorporate the partial updates and that seems like it should be a standard.
from gatsby-plugin-algolia.
It seems that you has not defined the application ID provided by Algolia in your environment.
Did you follow these instructions:? Gatsby plugin Algolia
from gatsby-plugin-algolia.
Sorry, should have included gatsby-config
setup:
...
{
resolve: `gatsby-plugin-algolia`,
options: {
appID: process.env.GATSBY_ALGOLIA_APP_ID,
apiKey: process.env.GATSBY_ALGOLIA_ADMIN_KEY,
queries,
chunkSize: 10000, // default: 1000
},
},
...
I know environment variables are passing correctly, as I'm using for Google Maps API. Just for some reason Algolia credentials it's not being passed on build.
I just opened up an Algolia account today - dunno if that matters. I was also following tutorial from here: https://www.gatsbyjs.org/docs/adding-search-with-algolia/
I noticed that the plugin has an option for indexName so I'll try to add that as well.
from gatsby-plugin-algolia.
Yes, had a .env
for development and production but no luck.
Good thought on hardcoding but this did not work for me either. I'll keep trying to figure out what I'm doing wrong, but it continues to suggest I'm not passing in the appID
. Tried gatsby clean
and deleting node modules to npm install
again but also no luck. Algolia is picking up that it's getting pinged in the dashboard but nothing is being indexed.
from gatsby-plugin-algolia.
Related Issues (20)
- Question re: Algolia Search HOT 6
- Unreachable hosts Error HOT 6
- Algolia transformer returns nulls for images that are correctly displayed in built site HOT 1
- Support for Gatsby 5 HOT 2
- Gatsby 4 build broken gatsby-plugin-algolia v1.0.0 HOT 2
- failed to index to Algolia Cannot read properties of undefined (reading 'contentDigest') HOT 3
- Plugin breaking in Gatsby 5 HOT 5
- JavaScript heap out of memory HOT 5
- Add indexName to the gatsby cache key HOT 4
- Why partial partial update is no more optional ? HOT 6
- Enrich your records with Google Analytics data HOT 1
- Request for skipIndexing Option to Avoid Unwanted API Access During CI Builds HOT 2
- Extracting chunks of long text as its own record HOT 2
- Adding headers to graphql query HOT 3
- Error: cannot apply the batch operation on a replica index
- Plugin is deleting Sanity document from index if edited. HOT 3
- Adding new data to existing records is ignored HOT 3
- Gatsby internal.contentDigest is a poor source for deciding whether content needs to be updated HOT 6
- Do we still need the MatchFields and enablePartialUpdate options in config? HOT 2
- Partially update not updating existing object in index HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gatsby-plugin-algolia.