hibernate-search

Hibernate Search + Spring + JPA + 2 webapps - correct configuration

天涯浪子 提交于 2019-12-13 20:16:02
问题 I have search long and hard, and cannot find a definitive answer. I have 2 webapps running on a single instance of tomcat: /server and /ROOT I have configured Hibernate Search configured for one of my entities, ie Products . These entities are edited/added on /server and searched for by front end users on the website /ROOT during normal operations, everything works as it should, editing entities on the server will result in those changes reflecting when doing a search on the front end.

Spring MVC code- Throws HSEARCH000103 exception when it is being deployed

余生颓废 提交于 2019-12-13 13:45:29
问题 In our springmvc website, we are using hibernate search with lucene. There are no issues when i compile the code, but when i try to deploy the code on a tomcat 7.0.52 running on Ubuntu 14.04 64bit server, i get the following exceptions INFO: Initializing Spring root WebApplicationContext Aug 20, 2015 1:20:10 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context

Hibernate FullTextSearch Exception at SessionInitialize

僤鯓⒐⒋嵵緔 提交于 2019-12-13 05:27:12
问题 I am trying to create fulltext indexes and take specific search result as list with Hibernate. I can not pass beyond session initialization. Here is my code: This is HibernateUtil Class: public class HibernateUtil { private static final SessionFactory sessionFactory; static { try { // Create the SessionFactory from standard (hibernate.cfg.xml) // config file. sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory(); } catch (Throwable ex) { // Log the exception. System

How can I sort in a round robin fashion in Lucene?

主宰稳场 提交于 2019-12-13 05:14:20
问题 I want to write a ComparatorSource for Lucene 3.6 with which I can accomplish a Round Robin style of sorting: Let's say we have something like this: A,A,A,B,C,D,D And I want to have them sorted into this order (not neccessarily in alphabetical order) A, B, C, D, A, D, A How can I accomplish such a behaviour? This is what I came up with, but it doesn't work because the timeshards arent updated in the correct place. Where can i do that instead? public class RoundRobinFieldComparatorSource<T>

Override Elasticsearch _type in Hibernate Search

ぃ、小莉子 提交于 2019-12-13 03:38:26
问题 I was wondering if it is possible to set the _type field on the Elasticsearch document using an annotation on the entity class. I am currently using hibernate-search-orm and hibernate-elasticsearch version 5.8.2.Final . Adding the @Indexed(name="my-index-name") annotation allows me to target a specific index. However, the document type is always the Class name. If the project is ever organized in a different way the type would not match the class. 回答1: There's no way to do what you want at

How to use spatial annotation?

让人想犯罪 __ 提交于 2019-12-13 03:38:06
问题 I am using elastic search with hibernate search.I am having a requirement where I have to build tiles map in kibana.For that I need to have geo_point data with latitude and longitude value.I found in hibernate we have @spatial annotation to do this,but when I am using I am getting below exception. java.lang.NullPointerException at org.hibernate.search.engine.metadata.impl.TypeMetadata$Builder.getAnalyzerReference(TypeMetadata.java:631) I am having two model entity and I am writing it below.I

Select a strings after concatenating 3 fields from index in lucene's BoolQueryBuilder

你说的曾经没有我的故事 提交于 2019-12-13 03:25:37
问题 Using Hibernate Search 5.9 and elastic server 5.6.10. I'm trying to persist data from 3 fields into a single field with @Transient annotation. But though the fields shows up in the index structure, the same does not show up when I query the index with curl/chrome. Its not present on the index and the data is lost this way. Database column: Data a. address: 123, a street, city, state Fillr1 : 000 Fillr2: 0 Fillr3: 358 b. address: 234, a street, city, state Fillr1 : 000 Fillr2: 0 Fillr3: 258 b.

Hibernate Search: Search any part of the field without losing field's content while indexing

杀马特。学长 韩版系。学妹 提交于 2019-12-13 03:13:05
问题 I would like to be able to find an entity based on any part of its indexed fields, and the fields must not loose any content while indexing. Lets say I have the following sample entity class: @Entity public class E { private String f; // ... } And if the value of f in one entity is "This is a nice field!" , I would like to be able to find it by any of these queries: "this" "a" "IC" "!" "This is a nice field!" The most obvious decision is to annotate the entity this way: @Entity @Indexed

How to configure Amazon S3 as remote cache store for Hibernate Search 4.5.3

旧巷老猫 提交于 2019-12-13 02:48:51
问题 I have configured Hibernate Search to use infinispan and use File System based Cache Store to persist the indexes in file system instead of memory. Now, I wish to configure S3 instead of File System, but I am not able to find the correct configuration for this. My infinispan.xml file is: <infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:infinispan:config:6.0 http://www.infinispan.org/schemas/infinispan-config-6.0.xsd" xmlns="urn:infinispan:config:6.0">

Teracotta and Hibernate Search

浪尽此生 提交于 2019-12-12 14:55:00
问题 Does anyone have experience with using Terracotta with Hibernate Search to satisfy application Queries? If so: What magnitude of "object updates" can it handle? (How's the performance) What kind of performance do the Queries have? Is it possible to use Terracotta Hibernate Search without even having a backing Database to satisfy all "queries" in Memory? 回答1: I am Terracotta's CTO. I spent some time last month looking at Hibernate Search. It is not built in a way to be clustered transparently