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

[BUG] DSL doesn't seem to be documented, or if it is it's hard to find. #855

Open
stuaxo opened this issue Nov 27, 2024 · 8 comments
Open
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@stuaxo
Copy link

stuaxo commented Nov 27, 2024

If I go to https://pypi.org/project/opensearch-dsl/ it says

Warning

The OpenSearch high-level Python client (opensearch-dsl-py) will be deprecated after version 2.1.0. 

We recommend switching to the OpenSearch Python client (opensearch-py), which now includes the functionality of opensearch-dsl-py.

So on visiting opensearch-py I would expect to see these usages fairly prominently, but it's not obvious at all.

These need to be signposted much better, clicking through to the User Guide, it doesn't look like the query is constructed using the DSL at all, and there is no clue it even exists.

https://github.com/opensearch-project/opensearch-py/blob/main/USER_GUIDE.md

@stuaxo stuaxo added bug Something isn't working untriaged Need triage labels Nov 27, 2024
@dblock
Copy link
Member

dblock commented Nov 27, 2024

Yes, please contribute.

@dblock dblock added documentation Improvements or additions to documentation enhancement New feature or request and removed bug Something isn't working untriaged Need triage labels Nov 27, 2024
@stuaxo
Copy link
Author

stuaxo commented Nov 27, 2024

@dblock I don't know what to contribute though:
I didn't write this because I know about the DSL, I want to use it but don't know how because I can't find the docs.

I don't know if the DSL has changed once it got incorporated, or even really where to find the old docs - I'm doing this as a beginner to OpenSearch (but not to DSLs in general)... this seems to have existed at some point, and may still do - I need pointers on where to learn this stuff first.

@dblock
Copy link
Member

dblock commented Nov 27, 2024

I hear you @stuaxo. I actually don't know either! I believe the DSL didn't change, we just merged the libraries. Maybe look through https://github.com/opensearch-project/opensearch-py/tree/main/samples and possibly add one and help figure out what we ended up with ;) @saimedhi @VachaShah might know more.

@stuaxocabinetoffice
Copy link

I might be wrong, but I assume opensearch-dsl was originally elasticsearch-dsl.

That last one has had docs generated for it.

I didn't have much luck finding them for opensearch-dsl, but maybe nobody ever generated them.

Looking at https://github.com/opensearch-project/opensearch-dsl-py there is a setup.cfg with build-sphinx, just like the one in elasticsearch-py-dsl. They both point at a "docs" directory, but opensearch-dsl has no docs directory.

@dblock
Copy link
Member

dblock commented Dec 6, 2024

They both point at a "docs" directory, but opensearch-dsl has no docs directory

It's possible docs didn't make their way into the fork because they were content and not code and may have had licensing problems.

@stuaxo
Copy link
Author

stuaxo commented Dec 6, 2024

Auto generated docs from docstrings could be a good start.

@stuaxocabinetoffice
Copy link

They both point at a "docs" directory, but opensearch-dsl has no docs directory

It's possible docs didn't make their way into the fork because they were content and not code and may have had licensing problems.

This may well be the case, given the copyright footer on their docs.

@dblock
Copy link
Member

dblock commented Dec 9, 2024

@stuaxo @stuaxocabinetoffice would love some help here! please make PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants