Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement "Create Index" of Indices API #86

Open
benashford opened this issue Sep 15, 2016 · 5 comments
Open

Implement "Create Index" of Indices API #86

benashford opened this issue Sep 15, 2016 · 5 comments
Assignees

Comments

@benashford
Copy link
Owner

https://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-create-index.html

@benashford benashford self-assigned this Sep 15, 2016
@rrichardson
Copy link

Am I reading this right that there currently is no way to create an index in rs-es? Do you have a suggested workaround?

@RoxasShadow
Copy link
Contributor

@rrichardson you can create and map an index with the mapping module, but it's not very _rs-es_ish and has some limitations (see #75).

This is why in the indices-api branch @benashford is rewriting it properly. If what has been done there so far is enough for you, then using that branch would be the best.

@benashford
Copy link
Owner Author

rs-es started as just supporting the query API and has been gradually growing outwards to include everything else in the ElasticSearch API.

As @RoxasShadow there is a preliminary module already, but this only supports a fraction of the total surface area of ElasticSearch's Indices API. This ticket is to support the rest of it.

As to the question of workarounds, it comes down to the origins of rs-es where it initially only supported querying. The first use was in projects where other scripts (e.g. Ruby scripts posting directly to the ES API) setup the project structure.

The goal is to have rs-es do everything so it can be used for, well, everything, rather than needing support scripts etc. for the initial setup.

@rrichardson
Copy link

Thanks for the info. As of yet I'm not entirely sure what is es-rs-ish in terms of APIs, but if there are some suggested API signatures, I am happy to fill them in and submit PRs.

@benashford
Copy link
Owner Author

There's not really any written rules, rather the goal to be consistent with: a) itself, b) Rust conventions, and c) ElasticSearch conventions. In reality there's a lot of conflict here, the main goals are: to be strongly typed, using builder objects. Take a look around the existing parts like querying, if it's unclear then that would be useful to know too, as either the documentation doesn't make sense (or is too sparse) or its not as consistent as I want it to be.

(Incidentally, if you haven't already found it, there's a alternative Rust ES client that does things the opposite way here: https://github.com/elastic-rs/elastic for those situations that are more dynamic)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants