[SERVER-24134] Allow hashed index to support range queries on hashed values Created: 12/May/16  Updated: 07/Apr/23  Resolved: 05/Jul/16

Status: Closed
Project: Core Server
Component/s: Index Maintenance, Querying
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: chensi Assignee: Backlog - Query Team (Inactive)
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
Assigned Teams:
Query
Participants:

 Description   

since

{"a":"hashed"}

index has created, query such as

{ HASH(a) > low }

is needed to support,



 Comments   
Comment by Ian Whalen (Inactive) [ 05/Jul/16 ]

We're closing this as Incomplete since we have not heard from the reporter in ~1 month. Please re-open if you have any further context you can add.

Comment by Kelsey Schubert [ 02/Jun/16 ]

I've marked this ticket to be scheduled during the next round of planning. However, as Ramon mentioned, without a clearer explanation of the use case surrounding this feature request, it is challenging to evaluate its merit. The more information you can provide, the better context we will have.

Could you please clarify why are you looking for this functionality in MongoDB?

Thank you,
Thomas

Comment by chensi [ 25/May/16 ]

i just want to use the hash index. find records which hash(a) > x

发自我的 iPhone

Comment by Ramon Fernandez Marina [ 24/May/16 ]

hustchensi, if I understand correctly, if a is a number this request assumes that if hash(a) > x, hash(a+1) also > x, and I don't think that's a fair assumption – or am I missing something?

I think that for this feature request to have merit you'll need to provide a more detailed use case with examples of the data and needs you have.

Thanks,
Ramón.

Comment by chensi [ 18/May/16 ]

since field "a" has a hashed index, i want to find data : the hashed value of "a" is in range [low, high].
This just like the hashed index used when moveChunk hash-sharded collection

Comment by Kelsey Schubert [ 16/May/16 ]

Hi hustchensi,

Thanks for creating this feature request. Unfortunately, I'm not sure that I fully understand the behavior that you are requesting.

As you know, hashed indexes do not support range queries. Instead, we recommend creating a non-hashed index on the same field to use for range queries. This is explained in our documentation here.

Would you please clarify this feature request by describing your use case for this feature?

Thank you,
Thomas

Generated at Thu Feb 08 04:05:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.