Announcement Announcement Module
Collapse
No announcement yet.
Indexing Embedded documents mongo db Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Indexing Embedded documents mongo db

    Hi Guys,

    I have a domain object model as below...

    @document
    Profile
    {
    social profile list:
    SocialProfile
    {
    Interest list:
    {
    Interest
    {
    id
    type
    value
    }
    }
    }


    Each profile can have many social profiles, in each social profile there are many interests related to the profile via the specific social profile ( social profile represent social network like Facebook), each interest is also embedded document with the fields id , type , value.

    So I have two questions..
    can I index few fields separately in the embedded document interest?
    can I create compound index in the embedded document interest?

    I guess the complexity in my model is the deep level of the embedded document which is 2.. and that the path to that document is via arrays...

    can it be done in spring way via metadata annotations? if you think my model is wrong please let me know i am a newbie on mongo
    Thanks
Working...
X