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

escape chars in field name for qs queries #104

Open
2 tasks
albanm opened this issue May 19, 2020 · 0 comments
Open
2 tasks

escape chars in field name for qs queries #104

albanm opened this issue May 19, 2020 · 0 comments
Assignees

Comments

@albanm
Copy link
Member

albanm commented May 19, 2020

Some chars cannot be used in ES query_string queries. It seems that a backslash escape is supported, cf https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#_field_names.

If the user doesn't provide the backslash the ES error is returned "Expected "!", "&&", "(", "+", "-", ".", "/", "AND", "NOT", "OR", "[", """, "\", "{", "||", [^: \t\r\n\x0C{}()"+-/^~[]], end of input, or whitespace but ":" found.".

If the user provides the backslash an other error is returned "Impossible de faire une recherche sur le champ Gamme_de_prix_(valeur), il n'existe pas dans le jeu de données.".

  • accept backslash in user queries
  • try to implement auto-escaping for the simpler cases (FIELDNAME: value) by using our knowledge of all existing fields
@albanm albanm self-assigned this May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant