-
Notifications
You must be signed in to change notification settings - Fork 730
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
Remove "<" and ">" as they cannot be escaped #1415
Conversation
Thanks for the PR. I wonder if it had any side effects that we tried to escape it? All tests are still green ... Could you update the changelog? |
Changelog updated. As |
// @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#_reserved_characters | ||
$nonEscapableChars = ['<', '>']; | ||
|
||
foreach ($nonEscapableChars as $char) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should update line
Elastica/lib/Elastica/Util.php
Line 77 in e47dd0e
* escapes the following terms: + - && || ! ( ) { } [ ] ^ " ~ * ? : \. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would drop the list of characters in the description of replaceBooleanWordsAndEscapeTerm
. My reasoning is that it exposes the internal behaviour of the used submethods. The character list creates maintenance backlog as it is not something that the wrapper method replaceBooleanWordsAndEscapeTerm
has control over at present.
Yet if you believe it adds value then it needs updating too. Are you looking at any particular wording?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on removing it. I'm good with most wordings :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method description is updated. I believe we can move this PR forward now.
@martin-georgiev Thanks a lot for the contribution. |
@ruflin It was my pleasure. |
<
and>
cannot be escaped according to the documentation, that's why try to remove them.