Comments (6)
Thanks for looking into it. Maybe there's something wrong in my configuration? Here is my config where I have a collection named "naics_2017_examples_en", and it has text fields "example" and "exceptions". The "naics" field is a o2m relationship field (and populates the index with the foreign key):
{
"server": {
"type": "algolia",
"appId": "*********",
"key": "********************"
},
"batchLimit": 100,
"reindexOnStart": false,
"collections": {
"naics_2017_examples_en": {
"indexName": "naics_2017_examples_en_test",
"filter": {
"status": "published"
},
"fields": ["example", "exceptions", "naics"]
}
}
}
.... and here is the Algolia index. This one index entry gets overwritten for every item in the collection when I run "npx directus extension:searchsync index" (the exceptions field is supposed to be blank in this example):
{
"example": "fruit cocktail, canned, manufacturing",
"exceptions": "",
"naics": "311420",
"objectID": "undefined"
}
from directus-extension-searchsync.
What is the name of the Primary Key field?
from directus-extension-searchsync.
I rolled back to how I had it configured when is was working for me (using a json config file). Basically, from what I now understand, the extension determines the primary key of the configured collection, and passes that value to Algolia as the objectID. This no longer happens. I wonder if something changed in the latest versions of Directus that changes how you determine the primary key for a collection. Maybe this line on create-indexer.js (line 69) no longer works?
const pk = schema.collections[collection].primary;
In my use case, the primary key of the collection I'm trying to index is "id"
from directus-extension-searchsync.
Doesn't looks as there, at least with my tests it get correct primary key name, and pass correctly to the request. I also make different tests with algolia with different primary key names, and all seems to works for me, so cannot reproduce.
Anyway, I'll continue to dig on it.
from directus-extension-searchsync.
I think it should be fixed now. The issue indeed was with the missing id field passing to algolia indexer when using filter fields.
Thanks for all the report!
from directus-extension-searchsync.
Thanks so much for your help!
from directus-extension-searchsync.
Related Issues (20)
- Couldn't register hook "directus-extension-searchsync" HOT 1
- Cannot read property 'EXTENSION_SEARCHSYNC_CONFIG_PATH' of undefined HOT 9
- Indexing multiple collections to same Algolia Index HOT 2
- Directus relationships don't seem to be working HOT 8
- Can't find binary in git HOT 2
- Config transform async
- How to configure meilisearch index settings HOT 6
- Support `deep` parameter on directus queries
- How to automatically synchronize meilisearch when updating collection data? HOT 1
- Updating related field does not trigger update. HOT 3
- Cannot find a way to start it HOT 5
- Please consider adding support for OpenSearch HOT 1
- TimeStamp / Date HOT 1
- docker installation HOT 4
- Is it possible to sync one collection to multiple meilisearch index
- Can't index image dimensions / properties HOT 1
- Fails to index fields that Directus returns as an array. HOT 1
- Meilisearch deleteItems deletes the entire index
- Reindexing collection is limited to 100 items HOT 2
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 directus-extension-searchsync.