google bigtable 和 amazon simpleDB 支持正则表达式吗?
我将把 nginx 日志存储在 simpledb 或 bigtable 中。
我想知道 simpledb 或 bigtable 是否支持正则表达式查询(如 mongodb 中)
i am going to store nginx logs in either simpledb or in bigtable.
i want to know if simpledb or bigtable support regular expressions query (like in mongodb)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
关于Bigtable,它确实支持正则表达式。我相信 @timmers 正确地认为发帖者指的是 AppEngine 存储,因为 Cloud Bigtable 在 2011 年还不可用,但现在 Cloud Bigtable 已公开可用,我想确保搜索此内容的人知道它是受支持的:<一href="https://googleapis.dev/java/google-cloud-clients/latest/com/google/cloud/bigtable/data/v2/models/Filters.ValueFilter.html#regex-java.lang.String-" rel="nofollow noreferrer">https://googleapis.dev/java/google-cloud-clients/latest/com/google/cloud/bigtable/data/v2/models/Filters.ValueFilter.html#regex-java.lang.String-< /a>
Regarding Bigtable, it does support regex. I believe that @timmers correctly assumed that the poster was referring to AppEngine storage since Cloud Bigtable wasn't available in 2011, but now that Cloud Bigtable is publicly available, I want to make sure that people that search for this know that it is supported: https://googleapis.dev/java/google-cloud-clients/latest/com/google/cloud/bigtable/data/v2/models/Filters.ValueFilter.html#regex-java.lang.String-
对于 AppEngine 或 SimpleDB 来说,简单的答案是“否”。
Appengine 的查询相对受限AppEngine java 查询文档,并且可以仅过滤具有以下运算符的查询:-
SimpleDB 的查询稍微复杂一些,但仅扩展到旧式 SQL,如 Amaozn SimpleDB 查询文档,可以在某些文本之前/之后添加“%”以允许开头或以类型操作结束。
对于任一产品,如果需要执行提前未预期的查询,则预期的使用模式更多的是对数据执行映射归约类型操作,并在应用程序级别将正则表达式过滤器应用于结果数据集,而不是尝试在数据库内提供它。
或者,如果您预先知道正则表达式,则可以预先应用这些正则表达式并将结果存储在任何数据存储中。
Simple answer here is no for either AppEngine or SimpleDB.
Appengine's queries are relatively restricted AppEngine java query documentation and can only filter on queries with the following operators :-
SimpleDB is slightly more sophisticated in its queries, but only stretches as far as old-style SQL like Amaozn SimpleDB Query Documentation, which can take a '%' before/after some text to allow startswith or endswith type operation.
With either product the intended usage pattern if needing to perform queries which were not anticipated ahead of time is more to perform a map-reduce type operation on the data and have the regexp filter be applied over the resulting dataset at application level rather than attempt to provide it inside the DB.
Alternatively if you know your regexps up-front, you could pre-apply your regexps these and store the results in whichever datastore.