简体   繁体   中英

AWS Cloudsearch email query

I've have an issue with CloudSearch'ing by email

For example, my search query is host/search?predicate=aleks@email.com

I have defined string ${predicate}* | ${predicate} ${predicate}* | ${predicate} as my query and I've been trying to search in email fields. As a result I've been getting response only in case if I've been trying to query either part before "@" sign ( alex ) or full request ( alex@email.com ) all the time.

I've reserched CloudSearch limits , but I didn't figure it out finally: is it possible to pass Strings with "@" sign? Is there anybody who solved that problem?

http://docs.aws.amazon.com/cloudsearch/latest/developerguide/text-processing.html @ is one of the characters that'll break a string part. So you'll need to replace @ with something else.
For english word breaking rules, you'll need to disable stemming.

Is predicate field text or literal ?. It looks like it is text right now so cloudsearch stems the email thats why it will be stemed and stored as aleks email com thus aleks or email works when you search. You can make email field literal type so that cloudsearch doesn't stem in that case query will work for ale* , alek* so you can use ${predicate}* | ${predicate} ${predicate}* | ${predicate}

Note: literal will be case sensitive search so u might have to downcase value before sending to cloudsearch if you want case insensitive search

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM