range query problem.

59 views
Skip to first unread message

Lei Zhang

unread,
Dec 18, 2014, 4:43:27 PM12/18/14
to hyperdex...@googlegroups.com

Robert Escriva

unread,
Dec 22, 2014, 12:21:50 PM12/22/14
to hyperdex...@googlegroups.com
On Thu, Dec 18, 2014 at 01:43:27PM -0800, Lei Zhang wrote:
> Hi, Team,It's seems that the range query is not working on the second
> condition.Only the first value get picked up.Any idea?
> [error]
> Thanks a lot!//Lei

I think you'll get the results you want with this snippet:

[x for x in c.search('timerelation', {'sbj': hyperdex.client.Range(1, 2), 'obj': hyperdex.client.Range(1, 2)}]

In all the posted examples, sbj=1, and the range [1,2) returns only
objects with value 1, which is why it doesn't return obj=2.

The hyperdex.client.Range object is an inclusive range, and is a newer
notation that's more clear.

-Robert

Lei Zhang

unread,
Dec 22, 2014, 3:27:09 PM12/22/14
to hyperdex...@googlegroups.com
Hi Robert,

Thanks for the reply. I rerun the query with hyperdex.client.Range.
And the result is the same.
By the way, the "[)" range doesn't seem to be the case.
Because the same range (1,2) is applied to 'sbj", in which case "2" is returned.



As you can see, I just added one more range query with redundant conditions in the second one, but only one of the previous 5 is returned.

and the space is created as:


Any more clue?

Thanks a lot!

Regards,
Lei


--
You received this message because you are subscribed to a topic in the Google Groups "hyperdex-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hyperdex-discuss/j7FhbTJnr40/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hyperdex-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Robert Escriva

unread,
Sep 28, 2015, 4:09:36 PM9/28/15
to hyperdex...@googlegroups.com
Hi,

We've fixed a problem with range queries in release 1.8.1.

As for the semantics of a range, it's a [] range, not a [) range.

-Robert

On Mon, Dec 22, 2014 at 03:27:08PM -0500, Lei Zhang wrote:
> Hi Robert,
>
> Thanks for the reply. I rerun the query with hyperdex.client.Range.
> And the result is the same.
> By the way, the "[)" range doesn't seem to be the case.
> Because the same range (1,2) is applied to 'sbj", in which case "2" is
> returned.
>
>
> [cid]
> ​
> As you can see, I just added one more range query with redundant conditions in
> the second one, but only one of the previous 5 is returned.
>
> and the space is created as:
> [cid]
> You received this message because you are subscribed to the Google Groups
> "hyperdex-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
Reply all
Reply to author
Forward
0 new messages