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

issue with regex #297

Open
randomgambit opened this issue Nov 14, 2022 · 1 comment
Open

issue with regex #297

randomgambit opened this issue Nov 14, 2022 · 1 comment

Comments

@randomgambit
Copy link

Hello and thanks for this great package. I am having some issues with using regex and elastic.

Consider the following query string

   myquery = ' {"query": { "regexp": { "data.headline.keyword": { "value": ".*hello world.*",
                                               "case_insensitive": True}}}
    }'

This query string works perfectly fine in Python when using opensearch-py. However, when using elastic in R I get an error:

elastic::count(con, q = myquery, index = 'myindex_*')

Error: 400 - all shards failed
ES stack trace:

  type: parse_exception
  reason: parse_exception: Encountered " <RANGE_GOOP> 

Do you know what the issue is?
Thanks!

@sckott
Copy link
Contributor

sckott commented Nov 21, 2022

Did you try setting errors="complete" in your https://docs.ropensci.org/elastic/reference/connect.html connect() call? That should give you more error detail i think .

Also you could turn on verbose curl output to see what http requests are being sent to see if they are malformed or not. e.g., https://docs.ropensci.org/crul/reference/crul-options.html crul::set_verbose()

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

2 participants