Closed sparanoid closed 4 years ago
We (@mzanibelli and I) had the same issue just now, and we figured that the objects that we were trying to index were missing the objectID
field (which is used to compare with the existing index).
However, this could still be improved by adding a warning in this file, imo : https://github.com/chrisdmacrae/atomic-algolia/blob/master/lib/utils/idsFromIndex.js#L11
@JulienPradet @sparanoid this will be fixed today in 0.3.18.
Any hits w/o an object id are now ignored. A debug warning is now omitted, which you can see by running:
package.json
"scripts": {
"algolia": "atomic-algolia"
}
DEBUG=true npm run Algolia
I was getting an UnhandledPromisRejectionWarning: ReferenceError: debug is not defined.
As @chrisdmacrae said, this was put there to warn when the objectID is missing. But for some reason, I was getting this exception.
Anyways, it did help me fix the issue because I just added an objectID into my index'd JSON.
Output:
Part of my
algolia.json
, I can post the full json if you need it: