How To search special symbols AWS Search

我是研究僧i 提交于 2021-02-10 13:22:09

问题


I'm trying to be able to get search results with special symbols like @. Every time I try to do this I don't get any hits and when I try without the special symbols everything works fine. Here is the request I'm making.

search?q=(or(prefix+field%3Demail+%27email@email%27)(term+field%3Demail+%27email@email%27))&q.parser=structured&return=user

回答1:


The symbols are being removed during text processing as described in Text Processing

According to the word break rules, strings separated by whitespace such as spaces and tabs are treated as separate tokens. In many cases, punctuation is dropped and treated as whitespace. For example, strings are split at hyphens (-) and the at symbol (@).

You may be able to solve this with a different Text Analysis scheme




回答2:


You can set the field as literal as literal fields are not tokenized.




回答3:


Fix it by replacing @ to a different character.



来源:https://stackoverflow.com/questions/34298419/how-to-search-special-symbols-aws-search

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!