简体   繁体   中英

ElasticSearch - search inside 3 indices from Javascript

I would like to create an ElasticSearch model which looks inside 3 distinct indices. The code I have for just one index is:

var searchModel = new ElasticSearchModel({
    search_url: "http://localhost:9002/myIndex/doc/_search"  
});
var searchApp = new SearchApp({model: searchModel, el: $("#resultsNew")});

I would like, if possible, to specify 3 distinct search_urls and append them the same searchApp. I have tried specifying lists for the model and el properties of the SearchApp, but it did not work. Are there any workarounds for this? Thank you!

使用下面的url在三个不同的indices搜索doc类型。

search_url:http://localhost:9200/myIndex1,myIndex2,myIndex2/doc/_search

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM