Skip to content

[BUG] PPL example on website not working #194

Closed

Description

@Blurazzle

Describe the bug
The example on https://opensearch.org/docs/search-plugins/ppl/index/ is not working.

To Reproduce

  1. Go to the website https://opensearch.org/docs/search-plugins/ppl/index/
  2. Copy and paste the code in de Quick Start section to create the accounts index on your cluster
  3. In your cluster go to de Query Workbench, select PPL in de right corner
  4. Execute the PPL query that is suggested on https://opensearch.org/docs/search-plugins/ppl/index/

Expected behavior
Query result.

Plugins
Opensearch distro 7.10

Screenshots
afbeelding

Host/Environment (please complete the following information):

  • OS: AWS Elasticsearch
  • Version 7.10

Activity

  1. changed the title [-][BUG][/-] [+][BUG] PPL example on website not working[/+] on Aug 16, 2021
  2. CEHENKLE commented on Aug 24, 2021

    @CEHENKLE
    Member

    Transferring to the SQL team. If I've move this in error, please @ me and I'll move it back :)

  3. chloe-zh commented on Sep 4, 2021

    @chloe-zh
    Contributor

    Hi @wjonkerhulst , I tried the same steps in the documentation, but was not able to reproduce it. Could you try to execute in dev tools by using the following command to see what the error is returned?

    POST _opendistro/_sql
    {
      "query":"search source=accounts | where age > 18 | fields firstname, lastname"
    }
    
  4. Blurazzle commented on Sep 6, 2021

    @Blurazzle
    Author
  5. chloe-zh commented on Sep 6, 2021

    @chloe-zh
    Contributor

    My bad, the endpoint should be _opendistro/_ppl

  6. Blurazzle commented on Sep 6, 2021

    @Blurazzle
    Author

    @chloe-zh No problem. The PPL endpoint works.

    afbeelding

  7. Blurazzle commented on Sep 6, 2021

    @Blurazzle
    Author

    @chloe-zh I think I have found the problem.

    A single line query works:
    afbeelding

    But when I copy and paste the example it is multi-line and the query stops working.
    afbeelding

  8. elfisher commented on Oct 13, 2021

    @elfisher
    Contributor

    I can confirm this is still an issue in 1.1. I cannot get multi-line to work in the query workbench, so that might be the issue. @chloe-zh do you know if that is a known issue?

  9. camAtGitHub commented on Nov 9, 2021

    @camAtGitHub

    Hello @chloe-zh the issue is that 'Query Workbench' is not escaping quotes etc.
    Attempting to run search source=accounts | where gender="F" results in: Events: no response, this query is not runnable.
    However running search source=accounts | where gender=\"F\" returns the expected data.
    The frustrating part is that documentation is either incorrect or an escaping bug has been introduced.

    Thanks
    (I'm running OS 1.1.0 docker build BTW)

  10. joshuali925 commented on Nov 30, 2021

    @joshuali925
    Member

    Hi, looks like there are two issues:

    1. line breaks were not handled correctly for PPL in workbench, causing multiline query to fail
    2. quotes are not properly escaped

    Both will be fixed in #305, thanks for reporting them!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions