V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
DAOCLOUD
推荐学习书目
Python Cookbook
Using Google App Engine
推荐下载
Latest Google App Engine SDK
其他兼容技术
AppScale
billychow
V2EX  ›  Google App Engine

关于 Datastore 的一个限制

  •  
  •   billychow · 2010-11-08 21:28:06 +08:00 · 4037 次点击
    这是一个创建于 4936 天前的主题,其中的信息可能已经有所发展或是发生改变。
    BadArgumentError: First ordering property must be the same as inequality filter property, if specified for this query;


    Properties In Inequality Filters Must Be Sorted Before Other Sort Orders
    http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html

    不知道各位碰到这个问题的同学是怎么解决的?
    实在是没想到居然会有这个限制,早前怎么没看清楚呢?
    1 条回复    1970-01-01 08:00:00 +08:00
    keakon
        1
    keakon  
       2010-11-08 22:50:54 +08:00
    数据量不大的话,全部取出来自己在内存里排序吧

    我是基本上不用不等于操作和排序,这样就不需要建复合索引了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3158 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 14:51 · PVG 22:51 · LAX 07:51 · JFK 10:51
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.