I figured out why my indexes were never saved (after seeing a saved
search_indexes file in the issues and verifying that they are capable of
being saved)
I was never using the GAE Launcher, as it was bugged a while ago, I
actually never used it since the inception of Devappserver2
def cleanup_stubs():
"""Do any necessary stub cleanup e.g. saving data."""
# Saving datastore
logging.info('Applying all pending transactions and saving the datastore')
datastore_stub = apiproxy_stub_map.apiproxy.GetStub('datastore_v3')
datastore_stub.Write()
logging.info('Saving search indexes')
apiproxy_stub_map.apiproxy.GetStub('search').Write()
apiproxy_stub_map.apiproxy.GetStub('taskqueue').Shutdown()
This routine in the manual launcher saves the search indexes, otherwise
they always stay in the RAM, clumsy if you ask me
Anyway, as I'm using /Google/google_appengine/dev_appserver.py manually,
I've made these modifications:
>>
\Google\google_appengine\google\appengine\tools\devappserver2\admin\search_handler.py
-- at the header
from google.appengine.api import apiproxy_stub_map
import logging
>> at the beginning of this classes's get handler: class
SearchIndexesListHandler(BaseSearchHandler):
logging.info('Saving search indexes - Like a Boss')
apiproxy_stub_map.apiproxy.GetStub('search').Write()
So now, whenever I visit http://localhost:8000/search - search indexes get
saved, yey
On Thursday, July 25, 2013 6:46:09 AM UTC+3, Kaan Soral wrote:
>
> No one? :)
>
> On Tuesday, July 23, 2013 8:00:52 PM UTC+3, Kaan Soral wrote:
>>
>> There are sqlite databases for logs/datastore and their settings on the
>> SDK
>>
>> However there is no "search documents" database, the kind of search
>> document where you insert to an index
>>
>> Therefore when you reset the sdk, all search documents are wiped
>>
>> What am I missing here?
>>
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.