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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:30:47+00:00 2026-05-24T11:30:47+00:00

I am developing an application in Java which will parse a XML file and

  • 0

I am developing an application in Java which will parse a XML file and retrieve keywords from it and store it in my database. These keywords can then be searched by users and they can retrieve the related data.

Now the problem is that the XML file has words like “literacy_male”,”infantmortalityrate_female” etc. For the first one I can split the words at “_” before storing, but for the second one I am not sure how i can split the word into meaningful words.

I am using Apache Lucene to do the full text search.

  • 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-24T11:30:48+00:00Added an answer on May 24, 2026 at 11:30 am

    one possibility is increasing the index size by adding all substrings of the exact same string. so for “abc” you will store: “a”,”b”,”c”,”ab”,”bc”,”abc” (it’s O(n^2) strings).

    one more possibility is using wildcards. index whatever you have, and search for:

    <term>*,a*<term>*,…,z*<term>* instead of for <term>. it will take a LOT more time, but it will not increase the index size.

    note: it is necessary to search for so many terms because you CANNOT use wildcard as first letter of a term.

    a*<term>* means search for all terms start with a, then have none or any chars, then <term> and then none or any chars again.

    more info about terms and wild cards in lucene: http://lucene.apache.org/java/2_0_0/queryparsersyntax.html

    EDIT:

    a combination of those will provide (in my opinion) the best solution:

    index all suffixes of the string, and then for each term (and not query!) – instead of searching for <term> search for <term>*. if the term exist as a substring, it also starts at least one prefix, and it will find it.

    for example: if you have "lifeexpectancy", you will index:
    "lifeexpectancy","ifeexpectancy","feexpectancy","eexpectancy",....,"y"

    for the same example, when you want to search life expectancy, you will search life* expectancy*

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

Sidebar

Related Questions

My team is developing a large java application which extensively queries a MySQL database
We are developing a Java application with several worker threads. These threads will have
I am developing a Spring (Java framework for server-side web-development)web application, which will respond
I'm developing a Java application which will act as a server for an information
I am developing a java application which will be graphically depicting and organizing hundreds
I am developing a java application which will be graphically depicting and organizing hundreds
I'm developing a LoB application in Java after a long absence from the platform
Developing a heavily XML-based Java-application, I recently encountered an interesting problem on Ubuntu Linux.
I am using netbeans for developing java dextop application,I have created a JFilechooser which
Hai I am developing a standalone application using Java in which I am using

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.