hibernate-search

Query in Lucene

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 re...

Lucene and access control (visibility of comments)

Imagine this simple scenario for full text search: Articles with Comments. I want to search articles also by text in comments. That alone is fairly simple to implement. Not all comments are visible to all users though. User that writes comment can also restrict it's visibility to concrete Role (so comment has 2 fields: text and role). ...

Multiple-index searching in Lucene (hibernate search)

Official Lucene Feautures site states that lucene supports "multiple-index searching with merged results". Is it possible to do this with hibernate search somehow? My usecase: Aricle with Comments. I want to have two separate indices: one for articles and one for comments. I want to be able to find article also by match in one of comm...

Hibernate Search Annotations not Inherited

I am indexing a class whose superclass has the following annotations: @Indexed @Entity @Inheritance(strategy = InheritanceType.JOINED) The same @Inheritance annotation is on the subclass. The annotations of the superclass are all on methods. The field I want indexed on the superclass is ignored: @Field(index=Index.UN_TOKENIZED,st...

BooleanQuery$TooManyClauses exception when using wildcard queries

I'm using Hibernate Search / Lucene to maintain a really simple index to find objects by name - no fancy stuff. My model classes all extend a class NamedModel which looks basically as follows: @MappedSuperclass public abstract class NamedModel { @Column(unique = true) @Field(store = Store.YES, index = Index.UN_TOKENIZED) pr...

Hibernate Search question

I am using Hibernate Search and applied Lucene indexing on one table for a domain object. I want now to make selection from this table for domain objects and apply filtering based on joining with other table, which is not indexed. For exampple, I have Auction Lots table, which I have indexed. And I have Quotes table. Quotes have referen...

hibernate search + spring3 + jpa

I'm trying to integrate hibernate search in my project. My models are indexed, but for some reason my search queries do not return any results. I've been trying to solve this issue for a few hours now, but nothing I do seems to work. Domain object: @Entity @Table(name = "roles") @Indexed public class Role implements GrantedAuthority { ...

Hibernate Search querying ?

Greetings My domain model is as follows class Species { private String name; .. .. List<Family> families; } class Family{ private String name; private String locusId; .. List<Member> members; } class Members{ private String name; private String repTranscript; } I want to use 'Hibernate Search' to execute queries like o...

How to index rows dependent on column values with Hibernate Search / Lucene?

Is it possible to use hibernate search/lucene to index some entity based on values of some fields? For example, let's take the following example: A product has several properties with values. e.g. property names could be color, amount, order-date, price, whatever... PRODUCT ( name description ... ) PROPERTY ( id nam...

Hibernate Search - searching in given scope.

Hi, Let's say I have following classes. (only most important things included) public class Client { /* Some Properties */ } public class ClientDocumentAssociation { @ManyToOne private Client client; /* Some Properties */ } @Indexed public class Document { @OneToOne private ClientDocumentAssociation clientAsso...

Hibernate Search Paging + FullTextSearch + Criteria

I am trying to do a search with some criteria FullTextQuery fullTextQuery = fullTextSession.createFullTextQuery(finalQuery, KnowledgeBaseSolution.class).setCriteriaQuery(criteria); and then page it //Gives me around 700 results result.setResultCount(fullTextQuery.getResultSize()); //Some pages are empty fullTextQuery.setFirstResult(...

Problem using Hibernate-Search

Hi, I am using hibernate search for my application. It is well configured and running perfectly till some time back, when it stopped working suddenly. The reason according to me being the number of my model (bean) classes. I have some 90 classes, which I add to my configuration, while building my Hibernate Configuration. When, I disable...

Reverse search in Hibernate Search

I'm using Hibernate Search (which uses Lucene) for searching some Data I have indexed in a directory. It works fine but I need to do a reverse search. By reverse search I mean that I have a list of queries stored in my database I need to check which one of these queries match with a Data object each time Data Object is created. I need i...

Hibernate-Search: How to search dates?

@Entity @Table(name = "USERS") public class User { @Id @GeneratedValue(strategy = GenerationType.AUTO) private long id; @Column(name = "USERNAME", nullable = false, length = 20) private String userName; @Column(name = "PASSWORD", nullable = false, length = 10) private String password; @Column(name = "Date", nullable = false ) ...

Hibernate-Search: How can I do this simple search?

I have a web app build with Hibernate. In one page, I have one submit button with 5 inputs field1 field2 field3 field4 field5 When all the inputs are null, I make a simple querry Query query = session.createQuery("from MyTable"); but when I have at least one input not null, I must create the search query. Let's say, the field1 is ...

Exception thrown during hibernate-search query: org.hibernate.search.SearchException: No Lucene configuration set up for...

Hi, i'm facing problems executing a hibernate-search query. Every time when I search for a term that is contained in the lucene-index, the following exception is thrown: Caused by org.hibernate.search.SearchException with message: "No Lucene configuration set up for: de.gridworks.everein.model.Membership" org.hibernate.search.engi...

Custom Lucene Sharding with Hibernate Search

Has anyone experience with custom Lucene sharding / paritioning using Hibernate Search? The documentation of Hibernate Search says the following about Lucene Sharding : In some cases, it is necessary to split (shard) the indexing data of a given entity type into several Lucene indexes. This solution is not recommended unless...

What's the best way to index many-to-one relation with hibernate search?

I have an entity with many-to-one mapping. (Product 1-* Regions, unidirectional association) What is the best way to store index of such relation? So it can be easily used to filter search query . ...

Hibernate Search synchronous execution in main thread

It seems that Hibernate Search synchronous execution uses other threads than the calling thread for parallel execution. How do I execute the Hibernate Search executions serially in the calling thread? The problem seems to be in the org.hibernate.search.backend.impl.lucene.QueueProcessors class : private void runAllWaiting() throws ...

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

Hello, 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()...