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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:34:33+00:00 2026-05-30T16:34:33+00:00

I’m building a WebService (CXF with Spring and JPA) to search a read-only database

  • 0

I’m building a WebService (CXF with Spring and JPA) to search a read-only database table, i.e., a table which is in a database I only have read permissions, I must not change anything there.

I need to implement a full-text search for some fields of this table, and querying it is too slow (it is a books database, with title, author and keywords for each book) so I need to build an index for it.

I’m trying to understand if Hibernate Search help me with that, and how I could go about it.
I think it can’t cause the documentation says it builds the index when the entities are updated (which are never the case in my WebService). But I’m new to all of its terminology, so I can misinterpreting things.

What would be a good path to go about this?
What should I study first to understand better what I need to do?
Thanks in advance!

  • 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-30T16:34:34+00:00Added an answer on May 30, 2026 at 4:34 pm

    I think Hibernate Search can be a perfect fit for your problem, because it allows you to build/keep the index on the file system. This way the database stays untouched. Given that you are already using JPA it should be extremely easy to enable Hibernate Search. You basically just need to get the Hibernate Search jar file and add it to your project, then annotate the entities you want to have indexed with @Indexed and the fields you want to index with @Field. Of course that’s very simplified, but the online documentation should help you out there. There is a getting started section which explain the basics. Once you get this, you can dive deeper into different analyzers etc – http://docs.jboss.org/hibernate/stable/search/reference/en-US/html_single/

    I’m trying to understand if Hibernate Search help me with that, and
    how I could go about it. I think it can’t cause the documentation says
    it builds the index when the entities are updated (which are never the
    case in my WebService). But I’m new to all of its terminology, so I
    can misinterpreting things.

    Well, Search will help you via automatic index updates to keep your index and database in sync for read/write application. However, Search also has a programmatic API for creating an initial index or manually rebuild the index whenever you see fit. There are several ways to do that, but it can be as simple as:

    EntityManager em = entityManagerFactory.createEntityManager();
    FullTextEntityManager fullTextEntityManager = Search.getFullTextEntityManager(em);
    fullTextEntityManager.createIndexer().startAndWait();
    

    Again, the documentation has more examples. I recommend you follow the getting started examples and follow up with concrete questions/problems you encounter.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have an autohotkey script which looks up a word in a bilingual dictionary
This could be a duplicate question, but I have no idea what search terms
I have a text area in my form which accepts all possible characters from
I have a view passing on information from a database: def serve_article(request, id): served_article
I have a reasonable size flat file database of text documents mostly saved in
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is

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.