I am using Firebase functions to create Algolia indices for the full-text search app
here is how I create an index when someone post on Firebase:
export const onListingCreated = functions.firestore
.document('Listings/{listingId}')
.onCreate((snap, ctx) => {
return index.saveObject({
objectID: snap.id,
...snap.data(),
})
})
//...snap.data() has - AdTitle:"House" Email:"example@gmail.com"
//this works well the index is created like this on algolia
But I want to avoid sharing the email
I tried it Like this:
export const onListingCreated = functions.firestore
.document('Listings/{listingId}')
.onCreate((snap, ctx) => {
return index.saveObject({
objectID: snap.id,
...snap.data().AdTitle,
})
})
//on algolia the index was created like:
//0:H
//1:o
//2:u
//3:s
//4:e
I wanted to be AdTitle: "House"
Is there a way to avoid sharing sensitive information on algolia?