Steve,

I'm running across this error now with the same code pretty much, except 
I'm trying to sort by a DateField. Did you ever find out how to get around 
this?

Thanks,
John

On Monday, May 14, 2012 7:07:15 AM UTC-7, Steve Qian wrote:
>
> Here is my search query code, currently it works without 
> 'sort_options' in query_options. 
>
>         sort_opts = search.SortOptions(expressions=[ 
>             search.SortExpression(expression='magnitude', 
>             direction=search.SortExpression.DESCENDING, default_value=0) 
>          ],limit=1000) 
>         query_options = search.QueryOptions(limit=limit, 
> cursor=cursor, ids_only=True, sort_options=sort_opts) 
>         query_obj = search.Query(query_string=query_string, 
> options=query_options) 
>         results = 
> search.Index(name=cls._INDEX_NAME).search(query=query_obj) 
>
> Here is how I build the search index from a model 
>
>         doc = search.Document(doc_id=self.key.id(), 
>             fields=[search.TextField(name='text', value=self.text), 
>                     search.TextField(name='full_name', 
> value=self.full_name), 
>                     search.TextField(name='source', value=self.source), 
>                     search.NumberField(name='magnitude', 
> value=self.magnitude), 
>                     search.DateField(name='created', 
> value=self.created.date())]) 
>         search.Index(name=self._INDEX_NAME).add(doc) 
>
>
> Steve Qian 
>
>
>
> On Mon, May 14, 2012 at 8:54 PM, Sun Jing <[email protected]> wrote: 
> > I also got this error sometime if I mixed ascii char and Chinese char 
> (in 
> > UTF-8 encode). 
> > 
> > On Mon, May 14, 2012 at 4:58 PM, Amy Unruh <[email protected]> 
> wrote: 
> >> 
> >> Steve, 
> >> 
> >> Can you provide more info (e.g. example code) showing how you built the 
> >> query object that you used for the search? 
> >> 
> >>  -Amy 
> >> 
> >> On 12 May 2012 20:05, Steve Qian <[email protected]> wrote: 
> >>> 
> >>> 
> >>> I keep getting the following TransientError when doing a search query. 
> >>> 
> >>> Anyone experience the same error? Is there a problem with the service? 
> >>>> 
> >>>> 
> >>>>    results = 
> search.Index(name=cls._INDEX_NAME).search(query=query_obj) 
> >>>>   File 
> >>>> 
> "/base/python27_runtime/python27_lib/versions/1/google/appengine/api/search/search.py",
>  
>
> >>>> line 2487, in search 
> >>>>     _CheckStatus(response.status()) 
> >>>> 
> >>>> 
> >>>> 
> >>>>   File 
> >>>> 
> "/base/python27_runtime/python27_lib/versions/1/google/appengine/api/search/search.py",
>  
>
> >>>> line 443, in _CheckStatus 
> >>>>     raise _ERROR_MAP[status.code()](status.error_detail()) 
> >>>> TransientError 
> >>> 
> >>> 
> >>> 
> >>> Steve 
> >>> 
> >>> -- 
> >>> You received this message because you are subscribed to the Google 
> Groups 
> >>> "Google App Engine" group. 
> >>> To view this discussion on the web visit 
> >>> https://groups.google.com/d/msg/google-appengine/-/7Yt0VM1sBdAJ. 
> >>> 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. 
> >> 
> >> 
> >> -- 
> >> 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. 
> > 
> > 
> > -- 
> > 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. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/rRuAp_r53Q0J.
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.

Reply via email to