Last active
August 29, 2015 14:14
-
-
Save alecslupu/168c0f62f948d633378b to your computer and use it in GitHub Desktop.
Dummy object relation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"users": { | |
"mappings": { | |
"user": { | |
"properties": { | |
"user_forum_daily_stats": { | |
"type": "nested", | |
"include_in_parent": true, | |
"properties": { | |
"forum_id": { | |
"type": "string" | |
}, | |
"comment_count": { | |
"type": "string" | |
}, | |
"thread_count": { | |
"type": "string" | |
}, | |
"stat_date": { | |
"type": "string" | |
}, | |
"user_id": { | |
"type": "string" | |
} | |
} | |
}, | |
"user_forums": { | |
"type": "nested", | |
"include_in_parent": true, | |
"properties": { | |
"forum_id": { | |
"type": "string" | |
}, | |
"status": { | |
"type": "string" | |
} | |
} | |
}, | |
"created_at": { | |
"type": "date", | |
"format": "dateOptionalTime" | |
}, | |
"is_certified": { | |
"type": "boolean" | |
}, | |
"login": { | |
"type": "string", | |
"analyzer": "snowball" | |
}, | |
"name": { | |
"type": "string", | |
"analyzer": "snowball" | |
}, | |
"sites": { | |
"properties": { | |
"description": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"url": { | |
"type": "string" | |
} | |
} | |
}, | |
"unique_code": { | |
"type": "string", | |
"analyzer": "snowball" | |
} | |
} | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User | |
attribute :login | |
atrribute :name | |
attribute :some_other_field | |
has_many :sites | |
has_many :relations | |
end | |
class Site | |
attribute :url | |
attribute :description | |
attribute :name | |
end | |
class UserForums | |
belongs_to :user | |
belongs_to :forum | |
end | |
class Forum | |
attribute :name | |
attribute :description | |
some_other_fields | |
end | |
class UserFroumDailyStats | |
belongs_to :user | |
belongs_to :forum | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment