Skip to content

Commit

Permalink
Expose getting aliases for an index.
Browse files Browse the repository at this point in the history
  • Loading branch information
erickt committed Nov 2, 2011
1 parent ff18d01 commit 4a797bd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/elasticsearch/client/admin_index.rb
Expand Up @@ -55,6 +55,10 @@ def alias_index(operations, options={})
execute(:alias_index, alias_ops, options)
end

def get_aliases(index, options={})
execute(:get_aliases, index, options)
end

# options: ignore_conflicts
def update_mapping(mapping, options={})
index, type, options = extract_required_scope(options)
Expand Down
4 changes: 4 additions & 0 deletions lib/elasticsearch/transport/base_protocol.rb
Expand Up @@ -121,6 +121,10 @@ def alias_index(operations, options={})
standard_request(:post, {:op => "_aliases"}, {}, encoder.encode(operations))
end

def get_aliases(index, options={})
standard_request(:get, {:index => index, :op => "_aliases"}, options)
end

def update_mapping(index, type, mapping, options)
standard_request(:put, {:index => index, :type => type, :op => "_mapping"}, options, encoder.encode(mapping))
end
Expand Down

0 comments on commit 4a797bd

Please sign in to comment.