"done" is one of the stopwords set up in google.appengine.ext.search.
The whole list:

  _FULL_TEXT_STOP_WORDS = frozenset([
   'a', 'about', 'according', 'accordingly', 'affected', 'affecting',
'after',
   'again', 'against', 'all', 'almost', 'already', 'also', 'although',
   'always', 'am', 'among', 'an', 'and', 'any', 'anyone',
'apparently', 'are',
   'arise', 'as', 'aside', 'at', 'away', 'be', 'became', 'because',
'become',
   'becomes', 'been', 'before', 'being', 'between', 'both', 'briefly',
'but',
   'by', 'came', 'can', 'cannot', 'certain', 'certainly', 'could',
'did', 'do',
   'does', 'done', 'during', 'each', 'either', 'else', 'etc', 'ever',
'every',
   'following', 'for', 'found', 'from', 'further', 'gave', 'gets',
'give',
   'given', 'giving', 'gone', 'got', 'had', 'hardly', 'has', 'have',
'having',
   'here', 'how', 'however', 'i', 'if', 'in', 'into', 'is', 'it',
'itself',
   'just', 'keep', 'kept', 'knowledge', 'largely', 'like', 'made',
'mainly',
   'make', 'many', 'might', 'more', 'most', 'mostly', 'much', 'must',
'nearly',
   'necessarily', 'neither', 'next', 'no', 'none', 'nor', 'normally',
'not',
   'noted', 'now', 'obtain', 'obtained', 'of', 'often', 'on', 'only',
'or',
   'other', 'our', 'out', 'owing', 'particularly', 'past', 'perhaps',
'please',
   'poorly', 'possible', 'possibly', 'potentially', 'predominantly',
'present',
   'previously', 'primarily', 'probably', 'prompt', 'promptly', 'put',
   'quickly', 'quite', 'rather', 'readily', 'really', 'recently',
'regarding',
   'regardless', 'relatively', 'respectively', 'resulted',
'resulting',
   'results', 'said', 'same', 'seem', 'seen', 'several', 'shall',
'should',
   'show', 'showed', 'shown', 'shows', 'significantly', 'similar',
'similarly',
   'since', 'slightly', 'so', 'some', 'sometime', 'somewhat', 'soon',
   'specifically', 'state', 'states', 'strongly', 'substantially',
   'successfully', 'such', 'sufficiently', 'than', 'that', 'the',
'their',
   'theirs', 'them', 'then', 'there', 'therefore', 'these', 'they',
'this',
   'those', 'though', 'through', 'throughout', 'to', 'too', 'toward',
'under',
   'unless', 'until', 'up', 'upon', 'use', 'used', 'usefully',
'usefulness',
   'using', 'usually', 'various', 'very', 'was', 'we', 'were', 'what',
'when',
   'where', 'whether', 'which', 'while', 'who', 'whose', 'why',
'widely',
   'will', 'with', 'within', 'without', 'would', 'yet', 'you'])


On Sep 29, 3:44 am, acuth <[email protected]> wrote:
> 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