HSEARCH-615 Support time-constrained queries returning the first available results
by Emmanuel Bernard
If you can find better name for the API, please advise. I am not happy with the current version
Query luceneQuery = ...;
FullTextQuery query = fullTextSession.createFullTextQuery(luceneQuery, User.class);
//define the timeout in seconds
query.limitFetchingTime(500, TimeUnit.MILLISECONDS);
List results = query.list();
if ( query.hasPartialResults() ) {
displayWarningToUser();
}
Emmanuel
13 years, 11 months
object is not an instance of declaring class
by Sanne Grinovero
Hello,
I'm blocked by the exception mentioned in the subject, this is also
affecting my work in Search:
with the new design I need the object identifier more often than before, and
even our own org.hibernate.search.test.proxy.ProxyTest fails.
Searching for similar exceptions I found many users asking for help
about the same error, also some
comments are quite recent so it would be nice to find a general solution:
HHH-5280
HHH-3399
HHH-1953
HHH-4064
https://forum.hibernate.org/viewtopic.php?t=979408
The error is that I'm invoking getId() via reflection, but the entity
instance is actually a javassist proxy.
Shouldn't org.hibernate.annotations.common.reflection.java.JavaXProperty
"shield" our code from this kind
of complexities?
Suggestions to proceed?
Sanne
stacktrace follows:
org.hibernate.HibernateException: Error while indexing in Hibernate
Search (before transaction completion)
at org.hibernate.search.backend.impl.EventSourceTransactionContext$DelegateToSynchronizationOnBeforeTx.doBeforeTransactionCompletion(EventSourceTransactionContext.java:175)
at org.hibernate.engine.ActionQueue$BeforeTransactionCompletionProcessQueue.beforeTransactionCompletion(ActionQueue.java:543)
at org.hibernate.engine.ActionQueue.beforeTransactionCompletion(ActionQueue.java:216)
at org.hibernate.impl.SessionImpl.beforeTransactionCompletion(SessionImpl.java:571)
at org.hibernate.jdbc.JDBCContext.beforeTransactionCompletion(JDBCContext.java:250)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:138)
at org.hibernate.search.test.proxy.ProxyTest.testProxy(ProxyTest.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:154)
at org.hibernate.testing.junit.functional.annotations.HibernateTestCase.runTest(HibernateTestCase.java:97)
at org.hibernate.testing.junit.functional.annotations.HibernateTestCase.runBare(HibernateTestCase.java:85)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.IllegalStateException: Could not get property value
at org.hibernate.search.util.ReflectionHelper.getMemberValue(ReflectionHelper.java:94)
at org.hibernate.search.engine.DocumentBuilderIndexedEntity.getIndexingId(DocumentBuilderIndexedEntity.java:699)
at org.hibernate.search.engine.WorkPlan$PerClassWork.recurseContainedIn(WorkPlan.java:136)
at org.hibernate.search.engine.WorkPlan.recurseContainedIn(WorkPlan.java:69)
at org.hibernate.search.engine.AbstractDocumentBuilder.processSingleContainedInInstance(AbstractDocumentBuilder.java:773)
at org.hibernate.search.engine.AbstractDocumentBuilder.processContainedInInstances(AbstractDocumentBuilder.java:322)
at org.hibernate.search.engine.WorkPlan$PerEntityWork.processContainedIn(WorkPlan.java:268)
at org.hibernate.search.engine.WorkPlan$PerClassWork.processContainedIn(WorkPlan.java:130)
at org.hibernate.search.engine.WorkPlan.processContainedIn(WorkPlan.java:62)
at org.hibernate.search.backend.impl.BatchedQueueingProcessor.prepareWorks(BatchedQueueingProcessor.java:150)
at org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchronization.beforeCompletion(PostTransactionWorkQueueSynchronization.java:86)
at org.hibernate.search.backend.impl.EventSourceTransactionContext$DelegateToSynchronizationOnBeforeTx.doBeforeTransactionCompletion(EventSourceTransactionContext.java:172)
... 25 more
Caused by: java.lang.IllegalArgumentException: Invoking id with wrong parameters
at org.hibernate.annotations.common.reflection.java.JavaXProperty.invoke(JavaXProperty.java:84)
at org.hibernate.search.util.ReflectionHelper.getMemberValue(ReflectionHelper.java:91)
... 36 more
Caused by: java.lang.IllegalArgumentException: object is not an
instance of declaring class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.hibernate.annotations.common.reflection.java.JavaXProperty.invoke(JavaXProperty.java:74)
... 37 more
13 years, 11 months
inspecting performance issues in Hibernate Search
by Sanne Grinovero
Hello,
about HSEARCH-513 [Experiencing long delays when indexing entities
saved in different transactions],
it appears that the special use case is affected by a set of small
issues which, when combined, create a huge performance mess.
The difficulty in reproducing the issue was not related to Spring, but
in the need to reproduce it with actual data triggering the situation.
* when adding a new graph of objects, even if all are new the
"collection" type of work prevales and all entities issue a delete+add
operation on the index,
while an add operation alone should be done. When the collections are
commented, the generated operations are of "add" type only.
I don't see this as critical, but this would be fixed too as a side
effect of fixing HSEARCH-570.
* The "depth" parameter of @IndexedEmbedded is working fine, but the
counterpart @ContainedIn is not applying any limit in the other
direction, effectively adding the largest
possible graph in the workqueue.
* While the @ContainedIn option "walks up" the tree, it adds other
work which will recursively "walk down" and then up again, effectively
exploding the number
of objects unneccessarily.
* Then when you have a huge amount of work, HSEARCH-570 [Optimize the
o^2 loop in DocumentBuilderIndexedEntity.addWorkToQueue] kicks in as a
coup de grace
on the too large list, resulting in several minutes processing for the
simple data in a unit test, hours are being reported on the issue when
using real data.
I consider this quite a critical issue, but the work I've been doing
in the last few days is quite intrusive on the code of
org.hibernate.search.backend.impl.BatchedQueueingProcessor,
which is in the real core of mappings should I shelve my changes for
after the release?
I'd vote myself to try fixing it, provided Emmanuel or Hardy will have
some time to review - I think we're well covered
with unit tests to at least try and see how far I get.
Sanne
13 years, 12 months
Hibernate 3.6.x build problem
by Nabeel Ali Memon
I installed macports' kdesdk4 to build hibernate 3.6 from source but the build fails complaining that po2xml wasn't found. I googled it and came to know that Hardy had exactly the same problem. At this point I am only eager to build the source no matter if i can't build docs right now, so is there any way to just build hibernate (with all sub-modules) 3.6 only?
This is very important to me because i am trying the patch for HHH-4559 (since i'm just stuck at the ClassCast exception due to this bug and can't go anywhere)
thanks,
Nabeel
13 years, 12 months
Lucene Collector for Hibernate Search
by Amin Mohammed-Coleman
Hi All
Apologies up front if this isn't the right place for this. Are there any plans to allow Collectors to be used within Hibernate Search? I had an interesting requirement which meant I couldn't use pagination and as result I had to use a custom collector using IndexSearcher. My use case essentially meant I had to do a search and collect some specific data for each matching document and return the entire result set to the next process in the workflow.
As users have direct access to the underlying directory I guess using native lucene for the use of collectors is ok but I guess it would be nice to essentially set an optional collector in the FullTextQuery.
Again apologies up front if this is implemented already or I should post my questions on the forums.
Thanks
Amin
13 years, 12 months
HHH-5721 - GPL v3 license
by Scheper, Erik-Berndt
Hi,
I was checking out HHH-5721, but it contains a patch that is licensed under GPL-v3.
I guess this is incompatible with Hibernate's license, or am I mistaken here?
Regards,
Erik-Berndt Scheper
Disclaimer:
This message contains information that may be privileged or confidential and is the property of Sogeti Nederland B.V. or its Group members. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
14 years
Building documentation with gradle
by Scheper, Erik-Berndt
Hi,
I'm currently working on a few improvements of the Envers documentation.
Of course, this works fine for the 3.6 branch, but I'd like to build on the master branch too.
However, it seems there is no gradle target for this yet. Or am I missing something?
Any suggestions would be welcome.
Regards,
Erik-Berndt Scheper
Disclaimer:
This message contains information that may be privileged or confidential and is the property of Sogeti Nederland B.V. or its Group members. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
14 years
commit history lost due to moving to gradle?
by Strong Liu
Hi,
I just noticed this, is it except?
unused-65-234:hibernate-core stliu$ git log ./hibernate-core/src/main/java/org/hibernate/loader/criteria/CriteriaQueryTranslator.java
commit 34c2839dccef33a8f3abb4eaf3192c1e1d9e1814
Author: Steve Ebersole <steve(a)hibernate.org>
Date: Fri Oct 8 20:20:10 2010 -0500
HHH-5616 - Switch to Gradle for builds
unused-65-234:hibernate-core stliu$
-----------
Strong Liu <stliu(a)hibernate.org>
http://hibernate.org
http://github.com/stliu
14 years
How can I configure sharding for customer data
by Suganya
Hi,
In my application, I have configured hibernate search to index my customer
data
I have data specific to client and each client having the clientid.
I need to create separate shards for each client dynamically and whenever
search or update or create happens I need to find the specific shard using
the client id.
if its not supported, is it possible to customise ourselves. in order to
customise how to go for it and what are all the changes do I need to do?
Cheers,
Suganya.
14 years