Designing for extensibility Java WebService

Hi all,

My first message. I am a relative beginner to software programming in
general so please go easy on me if I dont understand your suggestions
at first or ask silly questions. I am here to learn and have read
quite a few articles on elasticsearch now, however if you have good
suggestions for more reading let me know!

I am currently designing a small project and wanted some advice on how
best to make it more future proof.

I have a basic object Activity and extenstions for it. In a straight
database world I might have a table for activity a table for each
extension and an activity-extension join table.

I would then do a join on the appropriate tables to do a search for

My plan is to use CXF to open it as a web service, java middle tier
for business logic and elasticsearch at the back to store and query

My question then is am I thinking of elasticsearch in the right way or
is the approach (different tables and join) totally wrong. If it is
correct what would be the best way to represent different "tables" in
ElasticSearch terminology.

Also for elasticsearch what is the best way to deal with identity
information in objects. Is it best to map _id to an id field in each
object or store my own id field?

Cheers, Rob