I’m looking for a documentation on how to do a query in siena that returns all the elements which contains a string. I tried something like
return all().search("nome", query).fetch();
but it returns all the elements, with no filtering.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Sorry for the delay, I wasn’t available!
You use GAE, isn’t it?
Siena Search for GAE is very limited as GAE provides very limited search features for its datastore. So Siena implements what it can using some tricks.
In a summary:
Siena ALLOWS the following searches for GAE (for the time being):
search on 1 field and no more:
all().search("the_string_to_search", "the_field_to_search").fetch()search on field equaling one precise string:
all().search("myString", "the_field_to_search").fetch()search on field equaling several precise strings (like a OR):
all().search("myString1 myString2", "the_field_to_search").fetch()search on field beginning with a string:
all().search("myString*", "the_field_to_search").fetch()Siena DOESN’T ALLOW the following searches for GAE:
search on several fields:
all().search("myString", "field1", "field2").fetch()GENERATES EXCEPTION
search on field ending with a string:
all().search("*myString", "the_field_to_search").fetch()GENERATES EXCEPTION