GAE development server keep full text search index

2019-04-24 07:57发布

Is there anyway of forcing the GAE dev server to keep full text search indexes after restart? I am finding that the index is lost whenever the dev server is restarted.

I am already using a static datastore path when I launch the dev server (the --datastore_path option).

3条回答
再贱就再见
2楼-- · 2019-04-24 08:38

Look like this is not an issue anymore. according to documentation (and my tests):

"The development web server simulates the App Engine datastore using a file on your computer. This file persists between invocations of the web server, so data you store will still be available the next time you run the web server."

Please let me know if it is otherwise and I will follow up on that.

查看更多
我欲成王,谁敢阻挡
3楼-- · 2019-04-24 08:51

This functionality was added a few releases ago (in either 1.7.1 or 1.7.2, I think). If you're using an SDK from the last few months it should be working. You can try explicitly setting the --search_indexes_path flag on dev_appserver.py; it's possible that the default location (/tmp/) isn't writable. Could you post the first few lines of the logs from when you start dev_appserver?

查看更多
Melony?
4楼-- · 2019-04-24 08:53

in case anyone else comes looking for this, it looks like the simple solution is now to specify

--storage_path=/not/the/tmp/dir

you can still override this with --datastore_path etc.

https://developers.google.com/appengine/docs/python/tools/devserver (at the bottom of the page..)

查看更多
登录 后发表回答