Indexing your data

Now that we understand some of the background about searches and how the indexing works, it is time to index some of our own data. In the case of developing applications on top of Google App Engine, our source of data to be indexed would most likely be datastore. In this section, we will first generate some sample data with interesting characteristics and next we will see how we can index that data using the App Engine's search API.

Sample data

We have being using our Listing class for a while now for modeling a classified website. This time around, we are more focused towards real estate and hence some relevant attributes are added. Here's how our model class looks like this time:

class Listing(ndb.Model): title = ndb.StringProperty(required=True) ...

Get Mastering Google App Engine now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.