[google-appengine] Re: What are your top three issues in appengine?

2009-10-12 Thread George Sudarkoff

1. Full-text search
2. Incoming email
3. HTTPS on Google Apps

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



[google-appengine] Re: Complex tagging of items

2009-01-27 Thread George Sudarkoff

This is what I have right now for simple 'tag1 OR tag2' cases. But how
do you efficiently retrieve items for 'tag1 AND (tag2 OR tag3) AND NOT
tag4' with this model?

On Jan 27, 12:59 am, Seronja  wrote:
> Here's where old good relational databases theory comes in.
>
> How will I do it:
> Create a model ``Tags'':
> class Tags(db.Model):
>   tag_name = db.StringProperty()
> Create a model ``Items'':
> class Items(db.Model):
>   item_name = db.StringProperty()
> And create a model  ``ItemTags''
> class ItemTags(db.model):
>   tag = db.ReferenceProperty(Tags)
>   item = db.ReferenceProperty(Items)
>
> So when you need to get items for some tags you first query the
> ``ItemTags'' for items with concrete tag(s) thgan by key you get
> Items.
>
> Cheers,
> Serhiy
>
> On Jan 24, 3:17 am, George Sudarkoff  wrote:
>
> > I have a bit of a problem coming up with an efficient data model/algo
> > for a project I am working on:
>
> > I have a few hundred items, each tagged with zero or more tags. I need
> > to be able to fetch items that, for example, are tagged with tag1 AND
> > (tag2 OR tag3) AND NOT tag4.
>
> > Any help would be greatly appreciated!



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



[google-appengine] Re: Complex tagging of items

2009-01-27 Thread George Sudarkoff



On Jan 25, 11:17 pm, ryan  wrote:
> On Jan 25, 11:43 am, Anthony  wrote:
>
> > If you store the tags as a StringList wouldn't this query work..
>
> > WHERE tags = tag1 AND tags IN [tag2,tag3] AND tags != tag4
>
> > From the docs it says the IN & != do run multiple queries behind the
> > scenes so not sure if it will be as quick as running it in memory for
> > a few hundred items, but if you need more than a few hundred items you
> > are not going to be able to do it in memory before it starts timing
> > out.
>
> good call, anthony! that query does indeed do what george wants, and
> you're right about how != and IN work behind the scenes.
>
> the problem with that query, unfortunately, is that it needs this
> index:
>
> - kind: Foo
>   properties:
>   - name: tags
>   - name: tags
>   - name: tags
>
> ...which is almost certain to explode on entities with any more than a
> handful of tags:
>
> http://code.google.com/appengine/docs/python/datastore/queriesandinde...

Very cool! On average I won't have more than 2-3 tags per item, so I
really think this solution might work! I'll try it and report back the
results.


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



[google-appengine] Complex tagging of items

2009-01-23 Thread George Sudarkoff

I have a bit of a problem coming up with an efficient data model/algo
for a project I am working on:

I have a few hundred items, each tagged with zero or more tags. I need
to be able to fetch items that, for example, are tagged with tag1 AND
(tag2 OR tag3) AND NOT tag4.

Any help would be greatly appreciated!

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