Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6836723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:23:24+00:00 2026-05-26T23:23:24+00:00

I am currently designing a small project and wanted some advice on how best

  • 0

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 information.

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 data.

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:23:25+00:00Added an answer on May 26, 2026 at 11:23 pm

    I’ve seen comparisons that say in ElasticSearch an Index is comparable to a database, and a table is comparable to a type.

    I think you could go about it a basically two different ways.

    Option 1: One Index and One Type. Each subtype of Activity is indexed into one type in ES, and some documents have missing fields.
    This would give you,

    • One type mapping to support, if the defaults aren’t sufficient, you’d have all the fields of all your subtypes.
    • Common fields must be analyzed the same.
    • Documents all have only subset of fields per type (not really a problem, just weird)

    Option 2: One Index and multiple types. Each extension of Activity is a type in ElasticSearch.

    • Many Type Mappings to support.
    • Common fields can be analyzed differently.
    • Each document, in theory, has all fields of mappings.

    In either approach, you can search all subtypes. I think the complexity of the search requests would depend on the application.

    For most applications, I think I would prefer option 2. Each subtype of should be its own “type” in ElasticSearch. You can use Facets across types if you wanted. If your subtypes are relatively simple, I think you could make a case option 1 though.

    When you implement it, I’d love to hear how it worked out.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently designing a focused webcrawler. I have it tested with some websites
I am currently designing and implementing a small programming language as an extra-credit project
I'm currently designing a small application in which I have: - 1 menu (graphic
I am currently designing a Membership/Profile scheme for a new project I am working
I am currently designing a forum as a personal project. One of the recurring
I'm currently designing a object structure for a game, and the most natural organization
I am currently designing an RTS Game in XNA. So far I have a
i am currently designing a ebook reader app as my project, i am having
I am currently designing a web application where I will have customers signing up
I'm currently designing a small application in .Net and in the past I've been

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.