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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:22:57+00:00 2026-05-13T10:22:57+00:00

Is it possible to use hibernate search/lucene to index some entity based on values

  • 0

Is it possible to use hibernate search/lucene to index some entity based on values of some fields?

For example, let’s take the following example: A product has several properties with values.
e.g. property names could be color, amount, order-date, price, whatever…

PRODUCT (
   name
   description
   ...
)

PROPERTY (
    id
    name
    value
    fk_product
 )

And I only want to index PRODUCTS that have a property COLOR, but I never want to search on property SIZE.

Also, Is it possible to index my products with hibernate search and be able to query only on specific property names (like they where fields on a project)?

Some query like this: color:blue that would return me all products that have a property name=color with the value=blue.

From the reference doc I don’t find anything, but maybe should I use Filters to restrict the querying depending on the values of some fields!

  • 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-13T10:22:57+00:00Added an answer on May 13, 2026 at 10:22 am

    After rereading the reference documentation I realized I had to use a ClassBridge. (section 4.2.2.3 in the documentation) This solves exactly my problem!

    The example of the documentation is straight forward.

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

Sidebar

Related Questions

Is it possible to use hibernate-search only for it's annotations (bean => document/document =>
I am currently doing some performance tests on Hibernate / Hibernate.Search with Lucene in
Is this possible? In my project I have Hibernate search which need apache lucene
Is it possible to adopt the use of an O/RM like NHibernate or Entity
Is possible use Hibernate 3.6 + JPA2 + Guice-persist + Maven through maven? I've
I want to know if it is possible to use the same index file
Is it possible to use the Hibernate validator API storing the validated object in
Is it possible to use Moxy With Hibernate? And if so how do i
I would like to ask if it's possible to do this using hibernate. Let
I like to use Hibernate Search for implementing an sophisticated autosuggestion feature across multiple

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.