O'Reilly logo

Mastering Google App Engine by Mohsin Shafique Hijazee

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required