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

Expose APIs to manage indexes on collections #608

Open
giastfader opened this issue Jan 9, 2015 · 5 comments
Open

Expose APIs to manage indexes on collections #608

giastfader opened this issue Jan 9, 2015 · 5 comments

Comments

@giastfader
Copy link
Member

No description provided.

@giastfader
Copy link
Member Author

ATM indexes can be managed within plugins.
See giastfader@52e6fa3

@emresebat
Copy link

Hi @giastfader

I really need this, currently finding a record with string id on a 50000 collection takes around 1.5 - 2.0 secs. Is there an example for the plugin code?

@giastfader
Copy link
Member Author

IDs are already indexed. Which query do you execute?

@emresebat
Copy link

Hi

ID's are indexed yes but my scenario is, I'm migrating data from parse.

So I have a plugin lib where I create an object with parseId, get the new baasbox Id and then match the related records from parse with the new ID. I have currently 3 collections, they're all related and while migrating I'm merging them in orientdb as a single document.

@giastfader
Copy link
Member Author

Using the 0.9.4-nightly, try to create an index within a plugin:

Box.DB.exec("create property  <collection_name>.<field_to_index>  string");
Box.DB.exec("create index   <collection_name>.<field_to_index>  notunique"); //or unique depending on your use case

Refs:
http://orientdb.com/docs/1.7.8/orientdb.wiki/SQL-Create-Index.html
http://orientdb.com/docs/1.7.8/orientdb.wiki/Indexes.html

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

No branches or pull requests

2 participants