I guess there's too many indexed properties inside the model, the problem
solved after modifying the model into:
class Entry(db.Model):
...
pass
class EntrySearch(search.SearchableModel):
entry = db.ReferenceProperty(Entry)
date = db.DateTimeProperty()
body = db.TextProperty()
title = db.TextProperty()
so searching now is using EntrySearch rather than Entry.
Thanks for the response
On Tue, Jan 6, 2009 at 1:52 AM, Marzia Niccolai <[email protected]> wrote:
> Hi,
>
> These indexes are appearing because you are using multiple keywords in your
> search, each of which needs a __searchable_text_index field in an index
> entry. And you are right, these will result in exploding indexes.
>
> The bottom line is that searchable model can only realistically be used for
> one or two word searches before resulting in an exploding index.
>
> -Marzia
>
>
> On Sat, Jan 3, 2009 at 8:56 PM, Ferdhie <[email protected]> wrote:
>
>> Dear All
>>
>> I don't know why, but everytime I run at localhost, the index.yaml kept
>> generating so many __searchable_text_index Index
>> It will cause error while I update index on appengine servers (perhaps
>> because of exploding index)
>>
>> Here's my model
>> class Entry(search.SearchableModel):
>> STATUS_CHOICES = (
>> ('draft'),
>> ('public'),
>> ('private'),
>> )
>>
>> COMMENT_STATUS_CHOICES = (
>> ('open'),
>> ('close'),
>> ('password'),
>> )
>>
>> PING_STATUS_CHOICES = (
>> ('open'),
>> ('close'),
>> )
>>
>> ENTRY_TYPE_CHOICES = (
>> ('post'),
>> ('page'),
>> )
>>
>> author = db.UserProperty()
>> author_name = db.StringProperty()
>> title = db.StringProperty()
>> slug = db.StringProperty()
>> body = db.TextProperty()
>> postdate = db.DateTimeProperty()
>> postdate_gmt = db.DateTimeProperty()
>> excerpt = db.TextProperty()
>> status = db.StringProperty(default='draft', choices=STATUS_CHOICES)
>> commentstatus = db.StringProperty(default='open',
>> choices=COMMENT_STATUS_CHOICES)
>> pingstatus = db.StringProperty(default='open',
>> choices=PING_STATUS_CHOICES)
>> commentcount = db.IntegerProperty(default=0)
>> tags = db.ListProperty(db.Key)
>> entrytype =
>> db.StringProperty(default='post',choices=ENTRY_TYPE_CHOICES)
>> year = db.StringProperty()
>> month = db.StringProperty()
>> day = db.StringProperty()
>>
>>
>> Here's the index
>> # Used 7 times in query history.
>> - kind: Entry
>> properties:
>> - name: __searchable_text_index
>> - name: __searchable_text_index
>> - name: __searchable_text_index
>> - name: __searchable_text_index
>> - name: __searchable_text_index
>> - name: entrytype
>> - name: postdate
>> direction: desc
>>
>> # Used 6 times in query history.
>> - kind: Entry
>> properties:
>> - name: __searchable_text_index
>> - name: __searchable_text_index
>> - name: __searchable_text_index
>> - name: __searchable_text_index
>> - name: __searchable_text_index
>> - name: postdate
>> direction: desc
>>
>> # Used once in query history.
>> - kind: Entry
>> properties:
>> - name: __searchable_text_index
>> - name: __searchable_text_index
>> - name: postdate
>> direction: desc
>>
>> # Used 4 times in query history.
>> - kind: Entry
>> properties:
>> - name: __searchable_text_index
>> - name: entrytype
>> - name: postdate
>> direction: desc
>>
>> # Used 11 times in query history.
>> - kind: Entry
>> properties:
>> - name: __searchable_text_index
>> - name: postdate
>> direction: desc
>>
>> # Used once in query history.
>> - kind: Entry
>> properties:
>> - name: postdate
>> direction: desc
>>
>> The question:
>> 1. How to suppress those many2 autogenerated __searchable_text_index
>> 2. Or maybe I make some mistake in design?
>>
>> Thanks,
>>
>> --
>> Herdian Ferdianto
>> http://beta.ferdianto.com
>> http://www.id-snippet.com/
>>
>>
>>
>>
>
> >
>
--
Herdian Ferdianto
http://beta.ferdianto.com
http://www.id-snippet.com/
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---