hibernate-search

InfinispanDirectoryProvider with Wildfly 10.1

ぐ巨炮叔叔 提交于 2019-12-08 08:22:56
问题 We would like to run our EAR, which uses hibernate search, in a HA cluster with wildfly 10.1 and jgroups using infinispan as a cache for hibernate and hibernate search. The basic cluster configuration, based on standalone-full-ha.xml (additional details below) is working when we use: <property name="hibernate.search.default.directory_provider" value="ram"/> for Hibernate Search's directory provider. But when we change this to: <property name="hibernate.search.default.directory_provider" value

Hibernate Search does not work woth composite primary key using @IdClass

与世无争的帅哥 提交于 2019-12-08 08:04:26
问题 I've configured with hibernate-search annotation (4.1.1 version library) my class Intervento. So, I'm using jpa and in my case i can omit @DocumentId but I have a composite primary key... @IdClass(it.domain.InterventoPK.class) @Entity @Indexed @AnalyzerDef(name = "interventongram", tokenizer = @TokenizerDef(factory = StandardTokenizerFactory.class), filters = { @TokenFilterDef(factory = LowerCaseFilterFactory.class), @TokenFilterDef(factory = StopFilterFactory.class, params = { @Parameter

How can I search for two terms in Hibernate Search and get them both in result?

放肆的年华 提交于 2019-12-08 06:53:01
问题 Is there some way to find results in Hibernate Search with all searched terms ? What I mean is that, for instance, I search for a given term like "house" and I got a list of "Houses". However, if I'd want go refine my search and look for "house" and "pool", I'd like to get a list of "house" AND "pool" and not a list of "house" OR "pool". I'm not sure I'm clear enough. So, basically, what I need is to perform a search with more than one word and the search must consider them all, not only one.

How to search in related entity (Hibernate search)

余生颓废 提交于 2019-12-07 15:30:58
问题 I am getting no where trying this thing .My requirement is to search records by their name Following are my related classes: RecordFolderAnalysis.java @Indexed public class RecordFolderAnalysis extends AuditableEntity implements Serializable { @ManyToOne @JoinColumn(name = "arrivalId", nullable = false) @ContainedIn private RecordFolderArrival recordFolderArrival; } RecordFolderArrival.java @Indexed public class RecordFolderArrival extends BaseEntity implements Serializable { @Column(name=

InfinispanDirectoryProvider with Wildfly 10.1

扶醉桌前 提交于 2019-12-06 16:31:33
We would like to run our EAR, which uses hibernate search, in a HA cluster with wildfly 10.1 and jgroups using infinispan as a cache for hibernate and hibernate search. The basic cluster configuration, based on standalone-full-ha.xml (additional details below) is working when we use: <property name="hibernate.search.default.directory_provider" value="ram"/> for Hibernate Search's directory provider. But when we change this to: <property name="hibernate.search.default.directory_provider" value="infinispan"/> We get errors: 01:48:21,857 ERROR [org.jboss.msc.service.fail] (ServerService Thread

How to do Multi Faceted search using hibernate in java?

一曲冷凌霜 提交于 2019-12-06 15:01:37
问题 I am using Hibernate 4 along with lucene 3.6. I have a requirement related to facet count. In my requirement I have an entity "Product". Entity "Product" has some property for example id, color, brand. Now my requirement is that I want to get facet count for this entity in multidimension, get count for red(color) nike(brand) apparel. So take a example. I have following product entities saved in my database. id brand color 1 reebok red 2 reebok black 3 reebok green 4 Lee red 5 Lee black 6 Lee

ElasticSearch - define custom letter order for sorting

拟墨画扇 提交于 2019-12-06 12:35:29
I'm using ElasticSearch 2.4.2 (via HibernateSearch 5.7.1.Final from Java). I have a problem with string sorting. The language of my application has diacritics, which have a specific alphabetic ordering. For example Ł goes directly after L , Ó goes after O , etc. So you are supposed to sort the strings like this: Dla Dła Doa Dóa Dza Eza ElasticSearch sorts by typical letters first, and moves all strange letters to at the end: Dla Doa Dza Dła Dóa Eza Can I add a custom letter ordering for ElasticSearch? Maybe there are some plugins for this? Do I need to write my own plugin? How do I start? I

Hibernate HQL query does not update the Lucene Index

六月ゝ 毕业季﹏ 提交于 2019-12-06 07:59:36
I am using Hibernate 3.6.3 Final and Hibernate Search 3.4.1. I wrote an HQL delete query. The objects are deleted from the database but they are not removed from the Lucene Index after the transaction completes. Here is the query: Session session = factory.getCurrentSession(); Query q = session.createQuery("delete from Charges cg where cg.id in (:charges)"); q.setParameterList("charges", chargeIds); int result = q.executeUpdate();` What am I missing? What do I need to do to solve issue? I created a PostDeleteEvent, hoever the FullTextEventListener doesn't appear to be receiving the event:

Is @DocumentId required for Hibernate Search?

大兔子大兔子 提交于 2019-12-06 02:12:03
问题 I'm using Hibernate Search and the documentation and books say I need @DocumentId on the id field so that Hibernate Search can know how to map the index to the objects. My code appears to be working fine without the @DocumentId anywhere in my code. Did Hibernate Search become smart enough to figure out that @Id field is a great default? Are there problems this will cause that are not obvious? Thanks for your time! 回答1: @DocumentId is required if you are using the old-school style of mapping

get the annotation information at runtime

有些话、适合烂在心里 提交于 2019-12-06 01:55:43
问题 I wonder if there is any way I can get the annotation information of a class at runtime? Since I want to get the properties that sepcifily annotated. Example: class TestMain { @Field( store = Store.NO) private String name; private String password; @Field( store = Store.YES) private int age; //..........getter and setter } The annotations come from the hibernate-search,and now what I want is get which property of the "TestMain" is annotated as a 'field'(in the example,they are [name,age] ),and