OrientDB - Problems with Clusters Concept -


i have got problem clusters in orient db. sure understanding of clusters correct , great if me problem.

my understanding of clusters

first ensure understand concept of clusters correctly: me cluster subset of data, 1 cluster can contain different classes , single class can contained in different clusters, correct ?

so example have data:

{"name": "john", "sports": "tennis", "gender": "male", "@class": "assistant"} {"name": "susan", "sports": "hockey", "gender": "female", "@class": "assistant"} {"name": "peter", "sports": "hockey", "gender": "male", "@class": "trainee"} {"name": "mary", "sports": "tennis", "gender": "female", "@class": "trainee"} 

and can have clusters that:

cluster:male {john, peter} cluster:tennis {john, mary} 

is understanding of clusters in orientdb correct?

my problem clusters

when inserting new data database want add data specific cluster. data in json format. cluster exists. after inserting following command cluster still empty. occurs using java api using web interface.

insert cluster:test content {"name": "john", "@class": "assistant"} 

the data saved, when requesting:

select assistant 

i find entry entry not in cluster:test. doing wrong?


edit 2014/03/26

my usecase

i save tweets in database. searching twitter given keywords. class model looks like:

  • twittertweet
  • twitteruser
  • hashtag

(with twitterbaseclass above tweet , user) , have edges that:

twittertweet --originaltweet--> twittertweet twittertweet --postedby--> twitteruser twittertweet --hashashtag--> hashtag 

and thought best practice efficient requests create cluster every keyword. example when have keywords "shark" , "dog" tweets sharks , dogs , stored in same graph in different clusters.


your appreciated, in advance
ludwig

orient-db v. 1.7-rc1

in next release 2.0 cannot associate multiple clusters class, in order stay compatible future releases, it's better use class inheritance split records on multiple clusters.

edit 2014-10-08:

this not true anymore, 2.0 cannot store record in cluster, should declared host records of x class. classes can have multiple clusters. use feature manage distributed.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -