Hi philippe,

I did try the code you provided but that doesn't really work--all it
does is rank the results in the order of cost. Infact, the result that
is furthest away, ends up coming in first place, with the rest
randomly scattered.

Any other ideas?

-thanks

On Aug 21, 5:43 am, Philippe <philippe.cr...@gmail.com> wrote:
> here :http://code.google.com/appengine/docs/python/datastore/queriesandinde...
> check : " Properties In Inequality Filters Must Be Sorted Before Other
> Sort Orders "
>
> I think that you should do
> search_query.filter("cost >", min_price)
> search_query.filter("cost <", max_price)
> search_query.order("cost")
> search_query.order("distance")
>
> On Aug 21, 10:58 am, iceanfire <iceanf...@gmail.com> wrote:
>
> > I'm getting the following error:
>
> > "BadArgumentError: First ordering property must be the same as
> > inequality filter property, if specified for this query; received
> > distance, expected cost"
>
> > when i run the following code:
>
> > search_query.filter("cost >", min_price)
> > search_query.filter("cost <", max_price)
> > search_query.order("distance")
>
> > Did anyone know about this? Its not in the docs (atleast from what
> > i've read)...please tell me there's a way around this weird
> > restriction! I can't really think of a way to restructure my app cause
> > the inequality filter is basically a necessity at this point & i'd
> > love to be able to sort my results by something other than cost...
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to