Yes you can query for multiple tags. Not too sure about the JDO syntax but try something like:

                                query.setFilter("tags == 'hello'");
                                query.setFilter("tags == 'world'");

On 12 Feb 2010, at 05:48, Max wrote:

Thanks, but if I add

Set<String> tags

and I search

                                query.setFilter("tags.containsAll(tags1)");
                                query.declareParameters("java.util.List tags1");

Then it tells

Unsupported method <containsAll> while parsing expression:
InvokeExpression {[PrimaryExpression{tags}].containsAll(ParameterExpression{tags1})}

Is that possible to search for multiple tags or not?

---

I have some ideas how to search for 2 tags or 3 tags. But it will
requires all 2 tag pair combinations to be stored for each object. 3
tags search will require even more combinations of 3 tags for each
object.


Have someone implemented tag search already?

Thanks,
Max




On Feb 9, 9:34 pm, John Patterson <jdpatter...@gmail.com> wrote:
Hi Max, you could store tags as a multi-valued property which will
allow you to search for entities with all tags in a single query.  To
track how common a tag is you should maintain a count entity for each
one.

On 10 Feb 2010, at 02:23, Max wrote:



I already searched&read app-engine(|-java|-python) forums for "tag
search" and it looks like the the best way to implement tags is
unordered relationship many to many.

I can search for object with one tag. But I would like to specify
multiple tags.

e.g. I wish objects that has all 10 tags that I specify or any of 10
tags that I specify.

I would like to generate tag cloud also.
But "SELECT name, count(name) from Tags GROUP by name" is not
supported

Is that possible to implement all most common tag features with app
engine?

I start thinking that it is not possible.

I will have millions of object. So I can't select all objects.

Have someone implemented tags in App Engine?

Please, tell if know that it is not possible to implement tags in App
Engine.

Thanks, Max

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

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


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

Reply via email to