Amazon Dynamo DB的不区分大小写的查询 [英] Case-insensitive queries with Amazon Dynamo DB

查看:188
本文介绍了Amazon Dynamo DB的不区分大小写的查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在DynamoDB中,字符串值区分大小写。在我的应用程序中,用户可以在数据库中搜索配置文件名称。但是,如果他们搜索 alan,那么搜索结果中不会返回 Alan。我如何允许用户指定不区分大小写的搜索以检索良好的结果?

In In DynamoDB, string values are case sensitive. In my app, users can search the db for a profile name. However, if they searched for, say 'alan', then 'Alan' would not be returned in the search results. How can I allow users to specify case insensitive searches to retrieve good results?

仅供参考:我将DynamoDB与Node.js和Express一起使用,而AngularJS放在前面,结束。发送给数据库的扫描请求脚本位于Express route js文件中;解释用户请求并发送到服务器的代码在AngularJS控制器中。

FYI: I'm using DynamoDB with Node.js and Express, with AngularJS on the front-end. The script for the scan request to the db sits in an Express route js file; the code to interpret the user request and send to the server is in an AngularJS controller.

推荐答案

您可以连接DynamoDB表Lambda函数访问AWS ElasticSearch,以流式传输要索引的表中的更新。 ElasticSearch允许全文本和不区分大小写的查找,因此这正是您要查找的内容。这是一个 AWS解决方案架构师提供的示例架构。 AWS Labs还提供了完成相同任务的 DynamoDB Logstash插件

You can hook up your DynamoDB table to AWS ElasticSearch with a Lambda function to stream updates in your table to be indexed. ElasticSearch allows full text and case-insensitive lookups so it is exactly what you are looking for. Here is an example architecture by AWS solution architects. AWS Labs also offers the DynamoDB Logstash plugin that accomplishes the same task.

这篇关于Amazon Dynamo DB的不区分大小写的查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆