hibernate-search

Hibernate Search: How to use wildcards correctly?

橙三吉。 提交于 2019-12-28 03:12:28
问题 I have the following query to search patients by full name, for an specific medical center: MustJunction mj = qb.bool().must(qb.keyword() .onField("medicalCenter.id") .matching(medicalCenter.getId()) .createQuery()); for(String term: terms) if(!term.equals("")) mj.must(qb.keyword() .onField("fullName") .matching(term+"*") .createQuery()); And it is working perfectly, but only if the user types the full firstname and/or lastname of the patient. However I would like to make if work even if the

Error deploying Seam 2.2 app on JBoss 7.1

好久不见. 提交于 2019-12-25 17:39:23
问题 I've been trying to deploy my JBoss Seam 2.2 application on JBoss 7.1. I've received some great advice and resources from my previous post, but now I'm encountering some errors. My application is using Hibernate/JPA 1.0 for persistence, along with Hibernate Search. When it gets to deploying the JAR in the EAR that contains my JPA entities, I see the following exception: ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.persistenceunit."MyApp

How to use projections with hibernate lucene search

我们两清 提交于 2019-12-25 15:59:29
问题 I am doing hibernate lucene search .It is working fine with getting entire domain object.But my requirement is projections.It only getting single value on OneToMany associated fields.So how can I get all values of @IndexedEmbedded fields with projections.Please assists your suggestions. The following snippet is my code @Indexed(index="Skills") @AnalyzerDef(name = "skillAnalyzer", tokenizer = @TokenizerDef(factory = StandardTokenizerFactory.class), filters = { @TokenFilterDef(factory =

Hibernate Search integrated into Play Framework (JPA)

╄→гoц情女王★ 提交于 2019-12-25 07:58:40
问题 Im am trying to use Hibernate Search together with Play Framework. It seams very easy and straight forward. But I get a exception (see below): Here is what I did: I added dependencies "org.hibernate" % "hibernate-entitymanager" % "4.3.8.Final", "org.hibernate" % "hibernate-search-orm" % "5.2.0.Final", I already had Entitymanager and it works fine. Then I added the Hibernate Search properties: http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" version="2.0"> <persistence-unit name=

Does Lucene support searching between multiple index documents?

夙愿已清 提交于 2019-12-25 05:22:11
问题 In Database : I have two tables. and there are three columns in each table. Table_A (column_primaryKey_A,column_A1,column_A2) Table_B (column_primaryKey_B,column_B1,column_B2) Below is the SQL that I want to do using Lucene: SELECT * FROM Table_A,Table_B WHERE column_primaryKey_A = column_primaryKey_B AND column_A1 = XX AND column_B1 = XX I want to create two index documents( Index_Table_A , Index_Table_A )and how do I implement above things using the mechanism of Lucene or Hibernate Search?

Does Lucene support searching between multiple index documents?

十年热恋 提交于 2019-12-25 05:22:02
问题 In Database : I have two tables. and there are three columns in each table. Table_A (column_primaryKey_A,column_A1,column_A2) Table_B (column_primaryKey_B,column_B1,column_B2) Below is the SQL that I want to do using Lucene: SELECT * FROM Table_A,Table_B WHERE column_primaryKey_A = column_primaryKey_B AND column_A1 = XX AND column_B1 = XX I want to create two index documents( Index_Table_A , Index_Table_A )and how do I implement above things using the mechanism of Lucene or Hibernate Search?

Can we create Lucene indexes only once at for initial set up only?

独自空忆成欢 提交于 2019-12-25 03:24:22
问题 I am an newbie in Hibernate Search . According to Documentation By default, every time an object is inserted, updated or deleted through Hibernate, Hibernate Search updates the according Lucene index. As I learn till now I come to know that we can build the lucene index through programmatically like this :( correct me if I am wrong) FullTextSession fullTextSession = Search.getFullTextSession(session); fullTextSession.createIndexer().startAndWait(); But what makes me surprise if is there is

Hibernate Search + DbUnit Indexing

大城市里の小女人 提交于 2019-12-24 13:09:16
问题 I am writing some JUnits for my hibernate search implementation. I use a HSSQL in memory database. I use DBUnit to populate this DB (an XML file). It definitely works as other non-search tests work with the same data. The search code definitely works as I've tried it in the web-app and it returns the correct records. I assume that Hibernate Search will only index database entries that have been inserted using Hibernate. I tried to index the db manually using : - fullTextEntityManager

Lucene wildcard matching fails on chemical notations(?)

有些话、适合烂在心里 提交于 2019-12-24 01:16:06
问题 Using Hibernate Search Annotations (mostly just @Field(index = Index.TOKENIZED) ) I've indexed a number of fields related to a persisted class of mine called Compound. I've setup text search over all the indexed fields, using the MultiFieldQueryParser, which has so far worked fine. Among the fields indexed and searchable is a field called compoundName, with sample values: 3-Hydroxyflavone 6,4'-Dihydroxyflavone When I search for either of these values in full the related Compound instances are

Generate @Indexed annotation using Jaxb or HyperJaxb

廉价感情. 提交于 2019-12-24 00:46:51
问题 I want to implement lucene based hibernate search in my assignment. For generating domain objects I am using HyperJaxb3. I want @Indexed annotation to be added during domain object creation using HyperJaxb. I tried googling for this, but unable to find solutions. Any pointer in this regard will be of great help. 回答1: Annotate plugin is the right answer. See this example. This is how it looks in schema: .... xmlns:hs="http://annox.dev.java.net/org.hibernate.search.annotations" ... <xsd