elastic / elasticsearch-dsl-py

High level Python client for Elasticsearch
http://elasticsearch-dsl.readthedocs.org
Apache License 2.0
3.83k stars 801 forks source link

Critical parts of the API are undocumented #1312

Open macdjord opened 4 years ago

macdjord commented 4 years ago

My first tasks, when I started working with Elasticsearch-DSL, were to create a couple of custom field-types - one which was stored as a keyword but mapped to an instance of an Enum class, and another which was stored as a list of keywords but mapped to a Python set - and implement a document class that required some inter-field validation (e.g. start_date < end_date).

In order to do this, I had to figure out:

Now, at this point, I've figured out the answers to all of these question (I think) by reading the code and experimenting, but I should have been able to find all of this by looking at the documentation. Each of these methods should have a docstring which explains its purpose, contract, and the context in which it is used, while the class members (name, _coerce, etc.) should have a descriptive comment at their point of declaration.

ctiller15 commented 4 years ago

Just wanted to also say I'm running into the same sort of problem here. Going through the documentation isn't as useful as it could be, and for some, (what should be pretty trivial), issues I find myself having to dig into the actual source code to get any answers.

It would be fantastic if the documentation could be more robust. Is anyone currently working on this?

sethmlarson commented 4 years ago

@ctiller15 Hey! I agree the docs can definitely be improved. I don't think there's anyone working on this now.

I'm currently using all my time on two other projects but if you're willing to submit a patch making improvements I'd gladly review them :)

Thanks for your interest!