hibernate-search

FullTextHibernateSessionProxy is not visible from class loader

怎甘沉沦 提交于 2019-12-11 02:14:19
问题 I have run into a very strange error that I can´t wrap my head around. I´m running Seam 2.2.1.CR2 and JBoss 4.3.0.GA. My application consist of 3 modules: application.xml <display-name>CoolWebApp</display-name> <module id="EJB3"> <ejb>EJB3.jar</ejb> </module> <module id="WEB"> <web> <web-uri>WEB.war</web-uri> <context-root>/</context-root> </web> </module> <module> <ejb>jboss-seam-2.2.1.CR2.jar</ejb> </module> The following bean is scheduled and should run asynchronously. It resides in my

Hibernate full text search custom order by

血红的双手。 提交于 2019-12-10 19:26:19
问题 We want to add custom order by to hibernate full text search,suppose we want to search the record based on location, if the location is "country,state,city Then we want to have the search with records in the top which are near to user We followed following links. using mysql "order by case" in hibernate criteria But the order by clause is not getting added when we add it to criteria object Sort is working only when we set to full Text Query object like below, here we can do only asc and desc,

Join hibernate search query with criteria query restriction

偶尔善良 提交于 2019-12-10 10:07:11
问题 I'm wondering how you would join the following two queries together. A standard criteria query Criteria result1 = session.createCriteria(Store.class).add(Restrictions.eq("department.name", category)); and a FullTextSearch QueryBuilder queryBuilder = fullTextSession.getSearchFactory().buildQueryBuilder().forEntity(Store.class).get(); Query luceneQuery = queryBuilder.keyword().onFields("productTitle").matching(keyword).createQuery(); // wrap Lucene query in a javax.persistence.Query org

“experimental” status of JGroups Master/Slave backend for hibernate search and infinispan

对着背影说爱祢 提交于 2019-12-09 23:16:06
问题 We use hibernate-search for fulltext indexing of our entities in wildfly 8.2 (using the hibernate/hibernate-search and infinspan libraries inlcuded with wildfly 8.2). Running as standalone node or in a domain with a dedicated hibernate search master and the org.hibernate.search.store.impl.FSDirectoryProvider this has been working fine for several years (and jboss versions). We would now like to deploy this system to a HA clustered environment with wildfly 8.2 running behind a load balancing

How to replace deprecated MultipleHiLoPerTableGenerator with TableGenerator in Hibernate

孤人 提交于 2019-12-09 14:14:35
问题 I use hibernate in an application with spring boot 1.4.0.RELEASE. The Entity for the index looks something along the lines of: @Entity(name = "SearchableTariffItem") @Indexed public class SearchableTariffItem { public static final String ZIFFER_ANALYZER_NAME = "ZIFFER_ANALYZER"; @GeneratedValue(strategy = GenerationType.TABLE) @Id private Long id; ... } I now get the following warning when I save the entity for the first time: 2016-08-26 15:08:32.501 WARN 8476 — [apr-8080-exec-6] org

How to search fields with wildcard and spaces in Hibernate Search

北城以北 提交于 2019-12-09 10:51:29
问题 I have a search box that performs a search on title field based on the given input, so the user has recommended all available titles starting with the text inserted.It is based on Lucene and Hibernate Search. It works fine until space is entered. Then the result disapear. For example, I want "Learning H" to give me "Learning Hibernate" as the result. However, this doesn't happen. could you please advice me what should I use here instead. Query Builder: QueryBuilder qBuilder = fullTextSession

How to not transform special characters to html entities with owasp antisamy

陌路散爱 提交于 2019-12-09 07:33:25
问题 I use Owasp Anti samy with Ebay policy file to prevent XSS attacks on my website. I also use Hibernate search to index my objects. When I use this code: String html = "special word: été"; // use the Ebay configuration file Policy policy = Policy.getInstance(xssPolicyFile.getInputStream()); AntiSamy as = new AntiSamy(); CleanResults cr = as.scan(html, policy); // result is now : "special word: été" result = cr.getCleanHTML(); As you can see all chars "é" has been transformed to their html

Hibernate Search sorting

别来无恙 提交于 2019-12-08 17:00:53
问题 Hibernate search is sorting results depending on relevance, it is normal. In addition to that, if two documents are having the same score, they are ordered by their primary keys. For example, book1 : id=1, bookTitle = "hibernate search by example". book2 : id=2, bookTitle = "hibernate search in action" If I am doing a query to look for terms "hibernate search", I would have this order : book1 then book2 I would like to invert this order : book2 then book1. Which means inverting primary key

Error in write.lock in hibernate search

雨燕双飞 提交于 2019-12-08 13:27:08
问题 By Hibernate search we create a search engine in my application. Here same application running in two different JBoss and using two different folder for storing index data. Two folder and Two JBoss running in different system. But some time showing bellow type of error. Please, give me any resolution. 16:45:58,184 ERROR [org.hibernate.search.exception.impl.LogErrorHandler] (Hibernate Search: Index updates queue processor for index in.issac.wisebank.systemadmin.customermanagement.entiry

Hibernate Search + Lucene AND Operator Query

六眼飞鱼酱① 提交于 2019-12-08 10:47:18
问题 I am currently going through Hibernate Search 4.1 I have one Table (file_data,fileName) I want to create one query like file_data:XYZ and fileName:abc.pdf How to perform this query? Below I have try to make query for this.. Query luceQry3 = queryBuilder .bool() .must( queryBuilder .bool() .must( queryBuilder. keyword(). onField("file_data") .ignoreFieldBridge() .matching("HDFC") .createQuery()).createQuery()) .must(queryBuilder. keyword(). onField("fileName") .ignoreFieldBridge() .matching("0