Articles by admin

Fix the lacking vosao database indexes from a vanilla 0.8 install

Certain database queries made using the Google app engine (GAE) require a set indexes to be created before they can be executed successfully. There appears to be a bug in the vanilla installation of vosao where the datastore indexes for the PageEntity are not automatically created.

Screen shot of database indexes in the GAE control panel

A symptom to look out for is the archive page not returning any results when you click on a month in which you have blog entries. As there is no indication from the CMS itself, this can be rather difficult to diagnose.

However, if you look deeper you will likely see an array of warning messages in the log section of the GAE dashboard.

The messages will likely contain something cryptic like this:

AbstractService BeanImpl - -no matching index found..

Along with info about the offending entry:

Fortunately the solution is a simple one.

If you uploaded vosao to the app engine yourself, Simply create a file called datastore-indexes.xml in the WEB-INF directory of the extracted vosao archive archive, and paste in the following text:

autoGenerate="true">

The path to this file should be something like the following:

/WEB-INF/datastore-indexes.xml

Rerun the appcfg.sh in your app engine bin directory:

/bin/appcfg.sh update

Next in the configuration section of the CMS control panel, browse to the "Site Configuration" tab and click on "Export" . Perform a full export, and save the resulting file to some where safe.

After the exporting has completed, making sure you are still on the same page, click cache reset.

Wait for this to complete before finally pressing "Create Search Index".

If you browse back to the database indexes section in your GAE dashboard , you should find a page similar to this:

Screen shot of database indexes in the GAE control panel

Please note there may be some delay before your PageEntity is ready to serve. Check that everything is ok by visiting the archives page, or using a statement such as:

${service.findPageChildrenMonth("/blog", $year, $yearMonth)})

with the velocity engine. Here, $year and $yearMonth are a year and month or one of your blog entries. If all goes well this should return non-empty list ( an empty list will display [ ] ).

Useful Information:

Google indexes FAQ

Google help page on database indexes with an example datastore-indexes.xml

Vosao setup help page