R Simon
R Simon

Reputation: 183

Full Text Search or String Search in Google App Engine over Entities for displaying Instant results

I am working on feature like google instant. It is build on Google AppEngine Python 2.7.

For that i need to fetch entities From datastore.

Each entity has two attributes. (nemo,company_name) both String Type.

The model is based on http://code.google.com/p/gae-text-search/ for allowing full text search.

The model class is

from google.appengine.ext import db
import tzsearch
class Items(tzsearch.SearchableModel):
    nemo=db.StringProperty()
    company_name=db.StringProperty()

But when i run

query='any query string'
from models.models import Items
query_obj=Items.all().search(query)

The above code works fine for query of length greater than 2 and returns only the matching entities. But for query of length 1 and 2 returns all the entities.

Making the response very slow.

I am really stuck here. Thanks in advance.

Upvotes: 2

Views: 984

Answers (1)

Shay Erlichmen
Shay Erlichmen

Reputation: 31928

Now that AppEngine supports Full Text Search the gae-text-search project should be considered deprecated.

Upvotes: 3

Related Questions