Open icewukong opened 7 years ago
It's possible, but it would be slow. An O(n) operation. Would that be OK?
How about to create a index,like buntdb? Despite this will expose the concept of the index. Maybe it need to provide a command to create a custom index. Anyway,for me, it's better to be slow than not. Thank you for reply!
BTW, Is the SEARCH operation on type STRING an O(n) operation?
No, the STRING type goes into a Btree. It's in binary order. O(log n) We may be able to add a command for creating indexes for collections. Similar to SETINDEX in SummitDB.
That would be best!
All right. I'll investigate further. Thanks for you input.
Will the ability that searching from Muti JSON documents be available in version 2.x ? Same as issue #200 would be OK.
I hope so. I'm experimenting with new SETINDEX & DELINDEX commands, and an updated SEARCH command that will allow for indexed queries on the STRING type.
Looking forward to your project 2.0 :+1:
Hi,
May I know the commands to search with json field using NEARBY and WHERE ?
For example:
127.0.0.1:9851> jset test 1 outstation dharwad {"ok":true,"elapsed":"49.379µs"}
127.0.0.1:9851> get test 1 {"ok":true,"object":{"type":"Point","coordinates":[-84.4767280575,45.6304059969,100],"outstation":"dharwad"},"elapsed":"34.099µs"}
127.0.0.1:9851> nearby test where outstation dharwad 6000 (error) invalid argument 'dharwad'
I hope so. I'm experimenting with new SETINDEX & DELINDEX commands, and an updated SEARCH command that will allow for indexed queries on the STRING type.
@tidwall: May I know any updates on this feature ?
Hi @kirantpatil. Sorry but this feature is on hold and I don’t have any plans at the moment to implement right now.
For example:
I want to return the object that it's "prop0" equal "value1",with a command:
JSEARCH key MATCH path
e.g.JSEARCH roads MATCH properties.#[prop0=="value1"]#