hibernate-search

Unable to query Infinispan on JBoss 7 due to SearchFactoryIntegrator not being in the registry

久未见 提交于 2019-12-05 21:38:42
TL:DR I'm getting the following error and I can see no reason for it, indexing is enabled, and the SearchFactoryIntegrator is on the classpath for everything that needs to see it. Indexing was not enabled on this cache. interface org.hibernate.search.spi.SearchFactoryIntegrator not found in registry Long Version: JBoss version: 7.1.1 FINAL Infinispan version: 5.16 (upgraded from 5.1.2 JBoss ships with in attempts to solve issue) Java Version: 1.7 I am attempting to build a simple test application to run queries against an Infinispan cache. I am successfully adding objects to the cache. The

How to search in related entity (Hibernate search)

≯℡__Kan透↙ 提交于 2019-12-05 20:54:34
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="recordName", unique = true, nullable = false) @Field(index = Index.UN_TOKENIZED) private String

Join hibernate search query with criteria query restriction

若如初见. 提交于 2019-12-05 19:23:52
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.hibernate.Query fullTextQuery = fullTextSession.createFullTextQuery(luceneQuery, Store.class); fullTextQuery

How to disable default scoring/boosting in Hibernate Search/Lucene?

自作多情 提交于 2019-12-04 23:34:06
I want to serve my users the most relevant and best results. For example, I'm rewarding records that have a big title, description, attached photos, etc. For context: the records are bicycle routes, having routepoints (coordinates) and metadata like photos, reviews, etc. Now, I have indexed these records using Hibernate and then I search within the index using Lucene in Hibernate Search . To score my results, I build queries based on the document properties and boost them (using boostedTo() ) in a should BooleanJunction clause : bj.should(qb.range().onField("descriptionLength").above(3000)

How to do Multi Faceted search using hibernate in java?

非 Y 不嫁゛ 提交于 2019-12-04 22:48:53
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 black Now I want my code to take atleast two parameters(i.e. firstGroupBy, secondGroupBy) which are

Hibernate Search and a complex relationship

风流意气都作罢 提交于 2019-12-04 21:27:31
For design reasons, the relationship between my entities is as follows: Having entities A, B, C and AB where AB is the relationship many to many. I want to index the values of the entity C that has a many to many relationship with the B, starting from the relationship with A. So far I can index the values of A and B without problems in the following way: @Entity @Indexed public class A { @Field ... @IndexedEmbedded(depth = 2) @OneToMany(mappedBy = "a", cascade = CascadeType.ALL) private List<AB> b; } @Entity public class AB { @Field ... @ManyToOne @ContainedIn @IndexedEmbedded(depth = 2,

Infinispan distributed cluster with shared index

。_饼干妹妹 提交于 2019-12-04 20:33:19
Does anybody have a working example of how to configure a cluster of nodes to share an index using the infinispan directory provider? All the documentation on Infinispan (the documentation is seriously lacking btw) implies that it should be as easy as having some properties set but no matter how I try I cannot get it to work. The nodes in the cluster find eachother fine and I can do get operations on one node and get object that were put on another. But as soon as I do queries (use the index) it just starts to fail. My infinispan config: <global> <transport clusterName="SomeCluster">

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

喜夏-厌秋 提交于 2019-12-04 20:15:07
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 proxy. We want to have a dynamically scalable cluster without a point of failure in the sense of a

Query in Lucene

给你一囗甜甜゛ 提交于 2019-12-04 16:32:28
The structure of the table "testtable" is id int primary key productid int attributeid int value varchar(250) where productid is the unique id of a product, attributeid is the unique id of attribute of a product e.g. size, quality,height, color and 'value' is the value for the attribute i have to filter a result. I achieve the requirement by this query. But i am not able to make it in a query. select a.* from dbo.testtable a where a.attributeId=10 and a.[Value]='Romance' and productId in ( select productId from dbo.testtable where attributeId =7 and [Value]='Hindi' ) Need help to build this

nHibernate.Search with nHibernate v2

我怕爱的太早我们不能终老 提交于 2019-12-04 14:48:40
I having trouble getting nHibernate.Search to create an Index. If I use 1.2.1.4 of nHibernate.dll & nHibernate.Search.dll then the index is created correctly and I can inspect it with Luke (a Lucene utility). A segments file is created as well as a Fragments file etc However, when I use v 2 of nHibernate.dll & nHibernate.Search.dll then the index is not created correctly. Only a 1k segments file is created in the Index directory and Luke is unable to inspect it. The code I used in v1 was as follows: _configuration = new Configuration(); _configuration.Configure(); _configuration.AddAssembly