Full-text search — on App Engine, for Django — Try the demos — Buy Premium version — Download Free versionNew
The "Search documentation" function in the navbar is based on gae-search. Please try it!
Due to App Engine's datastore limitations, gae-search and all other available search solutions for App Engine (including SearchableModel) do not scale beyond several 10,000s large indexed entities. Also, since we're working on a large new project we can't provide support for new customers, anymore, so we offer a cheaper Premium package without support because some people were still interested in the Premium version.
Latest releaseNew: 1.1.1 (2009-09-10) Download
What's new: Automatically removing stop words from long queries and added more stop words — see release notes
Features
Index only specific properties
While SearchableModel always indexes all of your string/text properties gae-search allows to index only a few specific properties (e.g.: a forum post's title and content).
Also, you can create multiple independent indexes (each with their own properties) in one single model.
Porter stemmers
This normalizes your words such that, for example, it doesn't matter whether you search a word in plural or singular. For example, the text "A laptop is mobile" would match the query "laptops" (plural!). Actually, it finds the word stem, so "strangely" would match "strange". Thus, it's an important feature to enhance your search experience. We include stemmers for English and German.
Chain-sorting*
This feature allows for "coarse-grained" sorting of search results. For example, if you have a property which stores the average rating of a blog post as an integer (values: 1-5) you can chain-sort them such that you first see the results rated with 5, then 4, then 3, and so on.
Values index*
This basically allows for doing a DISTINCT query. It automatically indexes all values of a certain property across your entities. For example, if you have a property which stores a blog post's "category" you can create a values index which allows for browsing and searching all categories. Let's say you have these blog posts:
- Title: Laptops are mobile | Category: laptops
- Title: How to use Django on App Engine with app-engine-patch | Category: django
- Title: A Django tutorial | Category: django
Now, a values index on the "category" property would contain these values:
- django
- laptops
As you can see, "django" appears only once (duplicates are removed). You can use this to efficiently list all of your blog posts' categories in your sidebar, for example. Additionally, you can combine this auto-completion for all of your categories!
Of course, the values index also works with StringListProperty, so you could have multiple categories/tags per blog post.
Auto-completion via jQuery*
As you can see in the "search documentation" function in the navbar, our auto-complete feature provides direct feedback about its functionality. We've taken care of handling all the little details that improve usability: For example, the user move his mouse around while holding down the mouse button, so he can make a correction if he mistakenly clicked on the wrong element. Compare this to your current auto-complete solution.
Key-based pagination*
With key-based pagination you can browse an unlimited number of entities and work around App Engine's 1000 results limitation. We've implemented the key-based pagination algorithm by Ryan Barrett (the Google developer behind the App Engine datastore). Of course, it's fully unit-tested.
Easy to use views and templates*
We provide a set of views and templates which make it very easy to add search functionality to your applications. Do it in just a few lines.
* Only available in Premium version
Sample code
# app/models.py
class Post(db.Model):
title = db.StringProperty()
content = db.TextProperty()
index = SearchIndexProperty(
('title', 'content'),
indexer=porter_stemmer)
# app/views.py
def search(request):
return show_search_results(request, Post)
# app/templates/post_in_list.html
<li>
<h2>{{ post.title }}</h2>
{{ post.content }}
</li>
Note: Based on Premium version
