Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Support ElasticSearch Index Aliases #21

Closed
dharrigan opened this Issue · 3 comments

3 participants

@dharrigan

Hi,

I followed this example:

http://www.elasticsearch.org/blog/changing-mapping-with-zero-downtime/

Creating an index called "merchants_v1" and an alias to that index called "merchants" on ElasticSearch.

When I attempt to setup replication between Couchbase and ElasticSearch, I get the following error:

Attention - Bucket merchants not found.

It works, naturally, if no alias is used and I directly reference the index (i.e., merchants_v1).

This would be a very good feature to support as it would enable changes to mapping with zero downtime as the blog post hints at.

Thank you.

-=david=-

@mschoch
Owner

I use index aliases in Elasticsearch with the Couchbase plugin for our cbugg project. And I haven't run into any issues.

I'm not running all the latest code, so its possible something has broken. Can you verify the alias is working correctly outside of the plugin?

Also, supply the output of the following:

  1. curl http://localhost:9200/_aliases

That will list the indexes and aliases registered in ES

  1. curl -uAdministrator:password http://localhost:9091/pools/default/buckets

Replacing password with your actual password. This will list what indexes the plugin sees, which should include the aliases...

@dharrigan

Hi,

Thank you for your reply.

Couchbase 2.2.0 (Enterprise Edition)
ElasticSearch 0.90.5

 curl http://localhost:9200/_aliases
{"default":{"aliases":{}},"merchants_green":{"aliases":{"merchants":{}}}}

Which implies that the merchants_green index on my ElasticSearch node has been created and now an aliasas of "merchants" points to this index.

In Couchbase, I went to XDCR, Create Replication:

From:
Cluster: this cluster
Bucket: merchants

To:
Cluster: ElasticSearch
Bucket: merchants (i.e., the alias)

Clicked on Replicate, got this error "Attention - Bucket merchants not found."

The results from the default/buckets list is this:

[
  {
    "uri": "/pools/default/buckets/default?bucket_uuid=00000000000000000000000000000000",
    "uuid": "00000000000000000000000000000000",
    "vBucketServerMap": {
      "serverList": [
        "192.168.75.2:9091"
      ]                                                                                                                                                                                                                                      
    },  
    "name": "merchants_green",
    "nodes": [
      {   
        "hostname": "192.168.75.2:9091",
        "couchApiBase": "http://192.168.75.2:9091/merchants_green",
        "ports": {
          "direct": 9091
        }   
      }   
    ],  
    "bucketType": "membase",
    "saslPassword": "", 
    "bucketCapabilities": [
      "couchapi"
    ]   
  }
]

Doesn't seemed to have picked up the alias...that's my interperation :-)

-=david=-

@xeodou

Any updated here?

@mschoch mschoch closed this in e48b608
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.