searching on multiple indices elasticsearchclient(nodejs module)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

searching on multiple indices elasticsearchclient(nodejs module)

Aruna
Hi,
     i am using elasticsearch, river couchdb plugin and node elasticsearch client to search data from my couchdb. my code like this for searching data using one index

testSearch = function() {
                var qryObj = {
                   "query" : {
                    "wildcard" : {
                        "_all" : contact_person
                        }
                     }
                   
            };   
elasticSearchClient.search("purchasetest", "",qryObj, size)
        .on('data', function(data) {
            console.log("Search: "+data)
            assert.ok(JSON.parse(data), "testSearch failed.")
        })
        .exec()
}

Can any body guide me ,that how can i search data from multiple indices using elasti search client.

Reply | Threaded
Open this post in threaded view
|

Re: searching on multiple indices elasticsearchclient(nodejs module)

ferhatsb
Hi Aruna,

Did you try putting other index with comma to "purchasetest" ?

For instance "purchasetest,otherIndex".

KR,

Ferhat Sobay
www.searchbox.io

On Tuesday, June 19, 2012 9:37:30 AM UTC+3, Aruna wrote:
Hi,
     i am using elasticsearch, river couchdb plugin and node elasticsearch client to search data from my couchdb. my code like this for searching data using one index

testSearch = function() {
                var qryObj = {
                   "query" : {
                    "wildcard" : {
                        "_all" : contact_person
                        }
                     }
                   
            };   
elasticSearchClient.search("purchasetest", "",qryObj, size)
        .on('data', function(data) {
            console.log("Search: "+data)
            assert.ok(JSON.parse(data), "testSearch failed.")
        })
        .exec()
}

Can any body guide me ,that how can i search data from multiple indices using elasti search client.

Reply | Threaded
Open this post in threaded view
|

Re: searching on multiple indices elasticsearchclient(nodejs module)

imad
This post has NOT been accepted by the mailing list yet.
In reply to this post by Aruna
Hi Aruna,

I am looking into creating indices for couchdb databases. Did you create indices using elasticssearchclient? If yes, can you please let me know how can we do that, i'll really appreciate that. I was not able to find how to do that.

Many thanks.