Google App Engine Fulltext

Fulltext search is experimental. Limitations:

  1. There is no ranking.
  2. There is no exact phrase match, substring match, boolean operators, stemming, or other fulltext search features.
  3. Support for stop words (common words that are not indexed) is currently limited to English.
from google.appengine.ext import search
class Article(search.SearchableModel):
    text = db.TextProperty();

article = Article(text = ...)
article.save()

To search the fulltext index, use SearchableModel.all() method to get an instance of SearchableModel.Query which is a subclass of db.Query. Use its search method to provide a search query, in addition to any other filters or sort orders:

result_set = article.all().search('a search query').filter(...).order(...)
for result in result_set:
    ....

The fulltext index is stored in a property name __searchable_text_index. If you want to use search() in a query with an ancestor, filter, or sort order, you will need to create an index in index.yaml with the __searchable_text_index property. See the referenced links below.

http://groups.google.com/group/google-appengine/browse_thread/thread/f64eacbd31629668/8dac5499bd58a6b7

page_revision: 0, last_edited: 1227044740|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License