App Engine数据存储查询,太多的索引。

huangapple go评论83阅读模式
英文:

App Engine datastore query, to many Indexes

问题

我有一个包含7个输入字段的表单。每个字段都应该查询一个更大和/或更小的值,每个字段都可以为空或非空。由于不等式过滤器只能在一个属性上工作,我想创建一个包含最多20个整数的整数数组属性,并使用一个'Property ='过滤器来查询它,以检查给定数组中是否存在该值。然而,这给我带来了"too many indexed properties"的错误信息。

我有点迷茫,因为我不能在多个属性上使用不等式过滤器,而且列表属性会创建太多的索引。

有人可以指点我正确的方向吗?

英文:

I have a form with 7 input fields. each of these fields should query for a bigger and/or smaller value and every field could be empty or not. As inequality filters work only on one property, I wanted to make an array of int's property, that contains up to 20 integers and query it with a 'Property =' filter to check if the value is present in the given array. However, this gives me the message 'too many indexed properties'.

Im bit lost as i can't use inequality filters on more than one property and list-properties create to many indexes.

Can somebody point me in the right direction?

答案1

得分: 0

你可能想要使用CloudSql或全文搜索来进行这种复杂的查询。特别是,如果你需要为这些查询包括排序,你将面临很多挑战,因为你需要设置显式的多属性索引。然后你将面临一个组合爆炸的问题。

英文:

You probably want to use CloudSql or Full Text Search for this kind of complex querying. In particular, you're going to face a lot of challenges if you need to include ordering for these queries, as you'll need explicit multiproperty indexes set up then. You will then face a combinatorial explosion problem.

huangapple
  • 本文由 发表于 2014年10月30日 22:47:43
  • 转载请务必保留本文链接:https://go.coder-hub.com/26656100.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定