Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strings as keys instead of 64-bit integers? #1

Open
iljaiwas opened this issue Sep 3, 2014 · 7 comments
Open

Strings as keys instead of 64-bit integers? #1

iljaiwas opened this issue Sep 3, 2014 · 7 comments

Comments

@iljaiwas
Copy link

iljaiwas commented Sep 3, 2014

It seems that lidx uses 64-bit integers to uniquely identify originating objects. In my app design I'm using UUIDs to identify objects (128 bits).

Since LevelDB uses strings as keys, would it be feasible to switch from integers to keys as identifier?

@dinhvh
Copy link
Owner

dinhvh commented Sep 5, 2014

There would be a performance hit by introducing it.
I can think about how to introduce strings as key.

@iljaiwas
Copy link
Author

iljaiwas commented Sep 5, 2014

Thanks for considering my request, but it's probably not necessary.

Since I only need to support Mac & iOS, I'm probably better of re-implementing my own library on top of NSScanner/NSCharacterSet. All this ICU lib stuff is making my head spin. ;)

This way I can use strings as document keys. Please feel free to close this issue.

@dinhvh
Copy link
Owner

dinhvh commented Sep 6, 2014

What was your issue with ICU?

@iljaiwas
Copy link
Author

iljaiwas commented Sep 8, 2014

I don't have any issues with ICU in particular.

But it's another dependency I'd like to avoid, as (at least in my naive understanding) the same functionality is already contained in iOS/ OS X.

If I was the guys in our company to introduce a new full-text indexer to be used several projects, people would turn to me every time there's a problem with the source or the built-process. I'm just trying to minimize my future liabilities. ;)

@dinhvh
Copy link
Owner

dinhvh commented Sep 8, 2014

The functionality I'm using to support i18n are not exposed through Foundation.
Using ICU directly is considered as private API.

@iljaiwas
Copy link
Author

iljaiwas commented Sep 8, 2014

I was thinking about using CFStringTokenizer. https://developer.apple.com/librarY/mac/documentation/CoreFoundation/Reference/CFStringTokenizerRef/Reference/reference.html

Not sure how it differs from ICU, though, and what i18n features you are using. Do you have a minute to elaborate?

@dinhvh
Copy link
Owner

dinhvh commented Sep 8, 2014

There's also probably an equivalent with transliteration that is needed for lidx.
I'll look into it. Thanks for the suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants