Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
750 views
in Technique[技术] by (71.8m points)

google app engine - How to build datastore indexes (PHP GAE)

I am using Tom Walder's Google Datastore Library for PHP to insert data into my Google App Engine Datastore.

$obj_schema = (new GDSSchema('Add Log'))
    ->addString('name', TRUE)
    ->addDatetime('time', TRUE);
$obj_store = new GDSStore($obj_gateway, $obj_schema);
$obj_store->upsert($obj_store->createEntity(['name' => "test",'time' => date('Y-m-d H:i:s', time())]));

When I insert data like the above code, everything seems to be importing properly (each property say they are indexed).

enter image description here

But when I go to do a query with multiple selectors it says "You need an index to execute this query".

My query enter image description here

The error message enter image description here

Does anyone know what I need to do to make sure my queries are being indexed? This is what my dashboard hows with plenty of data using the code I showed.

enter image description here

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...