mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
⚡ Add also "simple" option to Document->GetAll
This commit is contained in:
@@ -169,6 +169,17 @@ export class Elasticsearch implements INodeType {
|
||||
responseData = await elasticsearchApiRequest.call(this, 'GET', `/${indexId}/_search`, body, qs);
|
||||
responseData = responseData.hits.hits;
|
||||
|
||||
const simple = this.getNodeParameter('simple', 0) as IDataObject;
|
||||
|
||||
if (simple) {
|
||||
responseData = responseData.map((item: IDataObject) => {
|
||||
return {
|
||||
_id: item._id,
|
||||
...(item._source as Object),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
} else if (operation === 'create') {
|
||||
|
||||
// ----------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user