You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the client.BulkAll(...) method to index a collection of entries using the bulk helpers in that method to be more efficient than looping through a collection of 7000 documents and creating a unique index request per document.
While doing so I seem unable to customize the documentId.
What solution would you like?
Ideally I would be able to pass a DocumentIdSelector function like so:
where e => e.MyCustomField) would be run on each document before it gets indexed and used to set the _id property for that document.
Do you have any additional context?
We use a specific internal identifier for each document when inserting them one at a time. By deriving that document id from the object in a deterministic way we can avoid storing generated ids per document and instead derive them whenever we need to use them (e.g. for delete requests).
The text was updated successfully, but these errors were encountered:
it looks like this would require a new property on IBulkAllRequest<T>> to support chaining a new method and attaching that selector Func<T, string> value to the request, then invoking it closer to where the actual index request gets created.
if I am on the right track here I might be able to submit a PR for consideration.
Is your feature request related to a problem?
I am using the client.BulkAll(...) method to index a collection of entries using the bulk helpers in that method to be more efficient than looping through a collection of 7000 documents and creating a unique index request per document.
While doing so I seem unable to customize the documentId.
What solution would you like?
Ideally I would be able to pass a DocumentIdSelector function like so:
where
e => e.MyCustomField)
would be run on each document before it gets indexed and used to set the_id
property for that document.Do you have any additional context?
We use a specific internal identifier for each document when inserting them one at a time. By deriving that document id from the object in a deterministic way we can avoid storing generated ids per document and instead derive them whenever we need to use them (e.g. for delete requests).
The text was updated successfully, but these errors were encountered: