Forum BigDB Feature Request: Part-key Search

Discussion and help relating to the PlayerIO database solution, BigDB.

Feature Request: Part-key Search

Postby default0 » June 2nd, 2010, 7:03 pm

Hey

I've been editing values on the admin panel recently, and notices that part-key search doesn't work. You always have to type the full name. I believe this to be intended, though I must say, a part-key search would make stuff wayyyyyyyyyy easier.
Say, I have a key on my DB named "somekey" then, searching for "some" would give this key + every other key starting with "some".

I hope you get what I mean, and I'd love this feature to be included.

Best regards
User avatar
default0
 
Posts: 115
Joined: February 2nd, 2010, 6:46 pm
Location: Germany

Re: Feature Request: Part-key Search

Postby Oliver » June 3rd, 2010, 8:30 am

Hi Default0,

It's a good idea, however, given the underlying data store it's not possible implement in a scalable and performant way. Database objects are distributed (and replicated) via hashing to different storage servers, so to do a prefix-scan, we'd have to ask each storage server, which is a no-go for us.

You can work around it by adding the key as a property of each database object and then create an index on that property. Then you can do range searches also in the admin panel.

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Feature Request: Part-key Search

Postby default0 » June 3rd, 2010, 12:37 pm

Oliver wrote:Hi Default0,

It's a good idea, however, given the underlying data store it's not possible implement in a scalable and performant way. Database objects are distributed (and replicated) via hashing to different storage servers, so to do a prefix-scan, we'd have to ask each storage server, which is a no-go for us.

You can work around it by adding the key as a property of each database object and then create an index on that property. Then you can do range searches also in the admin panel.

- Oliver


Thanks for the hint. But that work-around is more troublesome than actually typing the full key there.

Best regards
User avatar
default0
 
Posts: 115
Joined: February 2nd, 2010, 6:46 pm
Location: Germany

Re: Feature Request: Part-key Search

Postby Henrik » June 3rd, 2010, 3:50 pm

By the way, what's your use-case for this? What kind of data are you storing where you would want to do range searches on the keys?
Henrik
.IO
 
Posts: 1832
Joined: January 4th, 2010, 1:53 pm

Re: Feature Request: Part-key Search

Postby Oliver » June 3rd, 2010, 4:24 pm

Henrik >> He wanted it for the admin panel.
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Feature Request: Part-key Search

Postby fox1980 » June 7th, 2010, 5:07 pm

I'm planning to develop an auction house for players. It would be great if they could for example search for "potion", and both "mana potion" and "health potion" results would show up. Any suggestions how i can accomplish this, assuming from the start i have no way to predict what a user will search for.
fox1980
 
Posts: 206
Joined: April 1st, 2010, 10:39 pm

Re: Feature Request: Part-key Search

Postby Oliver » June 7th, 2010, 5:42 pm

Yea,

Have two tables: A normal reverse word index:

StuffForSale: one object pr. thing for sale (each auction)

SearchWords: objects with key=word and one string property with the key of the stuff for sale object

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Feature Request: Part-key Search

Postby fox1980 » June 7th, 2010, 6:09 pm

I would have to add/remove objects from both tables to keep them sync'ed but doesn't sound over complicated. I guess this method also applies to any other part-key search i might need.
Thanks Oliver.
fox1980
 
Posts: 206
Joined: April 1st, 2010, 10:39 pm


Return to BigDB



cron