flamant (3) [Avatar] Offline
#1
Hi,
I use HIBERNATE SEARCH to make fulltext research. I have indexed several properties of my classes. Later on, in my java code, I want to recover in a generic way the indexed properties of my classes in order to build my request. This would give me for example in my Lucene request :


String queryString =getproperty1FromClass1()+":"+searchString+" OR " +getproperty2FromClass1()+":"+searchString


getproperty1FromClass1() would give me for example the indexed property "name" of my indexed Class "Item"
getproperty2FromClass1() would give me for example the indexed property "description" of my indexed class "Item"


Do you know how I can recover in a generic way these indexed properties relatively to my indexed Classes ? Thank-you in advance for your answers
emmanuel.bernard (101) [Avatar] Offline
#2
Re: to recover indexed properties from classes
You can sue reflection like Hibernate Search but HSearch does not expose this kind of metadata at the moment. I am open to it though, I remember at least one other person asking for such a feature.
Open a JIRA issue (and possibly a proposal).