doc的代碼以下:clientMethod: 'mget'
api
search的代碼以下:clientMethod: 'msearch'
code
經過查詢api能夠發現:隊列
client.mget({ body: { docs: [ { _index: 'indexA', _type: 'typeA', _id: '1' }, { _index: 'indexB', _type: 'typeB', _id: '1' }, { _index: 'indexC', _type: 'typeC', _id: '1' } ] } }, function(error, response){ // ... });
或者get
client.mget({ index: 'myindex', type: 'mytype', body: { ids: [1, 2, 3] } }, function(error, response){ // ... });
client.msearch({ body: [ // match all query, on all indices and types {}, { query: { match_all: {} } }, // query_string query, on index/mytype { _index: 'myindex', _type: 'mytype' }, { query: { query_string: { query: '"Test 1"' } } } ] });