-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Hibernate Search: BooleanQuery Exception Without a Search
PostPosted: Thu Apr 24, 2008 4:24 pm 
Regular
Regular

Joined: Fri Oct 05, 2007 1:17 pm
Posts: 78
I am developing a Seam-JSF application that uses Hibernate Search, and I have tested certain features thoroughly on my Windows development machine. I have moved the application to the test environment, which is on Linux. I manually generated indexes and had the admins place them in the appropriate place, with the persistence.xml file reflecting the new Linux path for the hibernate.search.default.indexBase property.

The weird thing is that when you try to do a search that works on our development environment, you get this error in the test environment:

Code:
org.apache.lucene.search.BooleanQuery$TooManyClauses:
maxClauseCount is set to 1024
        at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:165)
        at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:156)
        at
org.apache.lucene.search.MultiTermQuery.rewrite(MultiTermQuery.java:63)
        at
org.apache.lucene.search.WildcardQuery.rewrite(WildcardQuery.java:54)
        at
org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:376)
        at
org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:151)
        at org.apache.lucene.search.Query.weight(Query.java:94)
        at org.apache.lucene.search.Hits.<init>(Hits.java:57)
        at org.apache.lucene.search.Searcher.search(Searcher.java:64)
        at
org.hibernate.search.query.FullTextQueryImpl.getHits(FullTextQueryImpl.java:270)
        at
org.hibernate.search.query.FullTextQueryImpl.getResultSize(FullTextQueryImpl.java:473)
        at
org.hibernate.search.jpa.impl.FullTextQueryImpl.getResultSize(FullTextQueryImpl.java:62)
        at
gov.nist.srm.persistence.search.SRMSearchImpl.getAdvancedSearchResults(SRMSearchImpl.java:180)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:615)
        at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
        at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
        at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
        at
org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
        at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
        at
org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
        at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
        at
org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
        at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
        at
org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
        at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:155)
        at
org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:91)
        at
gov.nist.srm.persistence.search.SRMSearchImpl_$$_javassist_1.getAdvancedSearchResults(SRMSearchImpl_$$_javassist_1.java)
        at
gov.nist.srm.web.SRMSearchAction.doAdvancedSearch(SRMSearchAction.java:198)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:615)
        at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
        at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
        at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
        at
org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
        at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
        at
org.jboss.seam.persistence.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:48)
        at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
        at
org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
        at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
        at
org.jboss.seam.core.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:56)
        at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
        at
org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
        at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
        at
org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
        at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:155)
        at
org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:91)
        at
gov.nist.srm.web.SRMSearchAction_$$_javassist_0.doAdvancedSearch(SRMSearchAction_$$_javassist_0.java)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:615)
        at
org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:328)
        at
org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:341)
        at
org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
        at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
        at
org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
        at
com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
        at
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
        ... 39 more


Does the Windows/Linux thing have anything to do with it? Or could it be that the indexes are just in the wrong place?

Thanks for any insight.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 24, 2008 5:45 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Quote:
org.apache.lucene.search.BooleanQuery$TooManyClauses

This is a Lucene error, there's a good explanation on the Lucene FAQ:

http://wiki.apache.org/lucene-java/LuceneFAQ#head-06fafb5d19e786a50fb3dfb8821a6af9f37aa831

I don't see how this could be related to your environment;
check that you are testing with:
A) the exact same query
B) the same data in your index (the same index)

Also you could check the query with luke
(see the FAQ: http://hibernate.org/446.html)

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 02, 2008 6:27 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
I can be that your test environment has less data and that you use a Range query. Range queries could be a bit evil in Lucene as they are translated to boolean queries for all existing possibilities in the index.

I think I warned people against it in Hibernate Search in Action, if not I should.

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.