Hey Lock, I thought about your idea before, but it also has huge downsides:
- Inserting a single entity with 40 token words (not uncommon) will lead to 41 inserts, and inserting is BigTables biggest weakness. Same goes for deleting. - It's (I think) not possible with this setup to get the second slice of results (50-100) from a query with three words, sorted by name. I would have to do 3 queries, which will return more results than I'm looking for, see if they are in the other two results (intersect), and sort them. Please correct me if I'm wrong... Kindest regards, Koen Bok - madebysofa.com On Dec 8, 1:32 am, lock <[EMAIL PROTECTED]> wrote: > I'm pretty new to app engine so there may be some > gotcha's in what I say, but I think my logic is ok. > > It seems you have a pretty simple table with a few > fields (name, brand, description) and you want to be > able to search any one of the words in any of the > fields. > > I'd suggest building a search term table. Keep your > current process of adding data to your table, your search > table will reference the data it contains. > > The search table will be something like > class searchTerms(db.Model): > value = db.StringProperty() > key = db.KeyProperty() # If there's no such thing use the id > > To build the search table tokenize the name, brand and > description so that you have a list of separate words. > Add each of these words to the search terms table with the > key that references the item in your data table. > > When you want to search via keyword(s) you just query the > value field of the searchTerms table. You will however need > to do a query for each search term. > > Hope that helps, cheers --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
