It seems that SearchableModel has a problem with the word 'done'. The
following code seems to find the word 'done' in all the TestItems

import logging
from google.appengine.ext import db
from google.appengine.ext import search

class TestItem(search.SearchableModel):
    name = db.StringProperty()

class TestSuite(object):
    def newItem(self,name):
        item = TestItem()
        item.name = name
        item.put()

    def doTest(self):
        self.newItem('done item number one')
        self.newItem('what should I do today')
        self.newItem('hello world')
        self.newItem('it should be sunny today')

        logging.info('----- search for items with the word "done"')
        for k in TestItem.all().search('done'):
            logging.info(k.name)
        logging.info('----- search for items with the word "today"')
        for k in TestItem.all().search('today'):
            logging.info(k.name)


INFO     2009-09-29 07:41:13,920 actest.py:26] ----- search for items
with the word "done"
INFO     2009-09-29 07:41:13,924 actest.py:28] done item number one
INFO     2009-09-29 07:41:13,925 actest.py:28] what should I do today
INFO     2009-09-29 07:41:13,925 actest.py:28] hello world
INFO     2009-09-29 07:41:13,926 actest.py:28] it should be sunny
today
INFO     2009-09-29 07:41:13,926 actest.py:29] ----- search for items
with the word "today"
INFO     2009-09-29 07:41:13,931 actest.py:31] what should I do today
INFO     2009-09-29 07:41:13,931 actest.py:31] it should be sunny
today

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to