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 4062142
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:33:42+00:00 2026-05-20T15:33:42+00:00

I am just starting up with Lucene, and I’m trying to index a database

  • 0

I am just starting up with Lucene, and I’m trying to index a database so I can perform searches on the content. There are 3 tables that I am interested in indexing:

1. Image table – this is a table where each entry represents an image. Each image has an unique ID and some other info (title, description, etc).

2. People table – this is a table where each entry represent a person. Each person has a unique ID and other info like (name, address, company, etc)

3. Credited table – this table has 3 fields (image, person, and credit type). It’s purpose is to associate some people to a image as the credits for that image. Each image can have multiple credited people (there’s the director, photographer, props artist, etc). Also, a person is credited in multiple images.

I’m trying to index these tables so I can perform some searching using Lucene but as I’ve read, I need to flatten the structure.

The first solution the came to me would be to create Lucene documents for each combination of Image/Credited Person. I’m afraid this will create a lot of duplicate content in the index (all the details of an image/person would have to be duplicated in each Document for each person that worked on the image).

Is there anybody experienced with Lucene that can help me with this? I know there is no generic solution to denormalization, that is why I provided a more specific example.

Thank you, and I will gladly provide more info on the database is anybody needs

PS: Unfortunately, there is no way for me to change the structure of the database (it belongs to the client). I have to work with what I have.

  • 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-20T15:33:42+00:00Added an answer on May 20, 2026 at 3:33 pm

    You could create a Document for each person with all the associated images’ descriptions concatenated (either appended to the person info or in a separate Field).

    Or, you could create a minimal Document for each person, create a Document for each image, puts the creators’ names and credit info in a separate field of the image Document and link them by putting the person ID (or person Document id) a third, non-indexed field. (Lucene is geared toward flat document indexing, not relational data, but relations can be defined manually.)

    This is really a matter of what you want to search for, images or persons, and whether each contains enough keywords for search to function. Try several options, see if they work well enough and don’t exceed the available space.

    The credit table will probably not be a good candidate for Document construction, though.

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

Sidebar

Related Questions

Just starting to poke around iPhone development. I am trying to add an external
Just starting out with C#, so this may be overly simple that I keep
Im just starting getting into Objective-C, i'm trying to sort an array so it
Just starting to use Cruise Control, but can't seem to find anything on this
Just starting out with LINQ to SQL (you can probably tell - be gentle).
I Just starting out w/ ASP.NET MVC 3 and I am trying to render
I just starting to query XML within a SQL Server database. I am having
I just discovered Lucene (Java library) and starting to read up on it. I'm
I'm trying to replace a Keyword Analyser based Lucene.NET index with an SQL Server
Just starting out with the Play framework and one minor irritant is that it

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.