-->
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: "Unkown @FullTextFilter" in Hnate Search (bug?)
PostPosted: Sat Aug 18, 2007 6:52 pm 
Newbie

Joined: Sat Aug 18, 2007 6:42 pm
Posts: 2
Location: Brazil
I am using Hibernate Search 3.0.0 Beta 4. This version for me offers functionality that I'd like to use, which is the "enableFullTextFilter" calls. I followed the instructions as per the example.

I have multiple entities declared in my Hibernate space, but only one entity that has FullTextFilterDef settings.

When searching on that entity using the Filter restriction, the "enableFullTextFilter" call results in a SearchException:

Code:
[WARN] StandardContext[]Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract net.sf.pdune.client.dto.IssueBriefDTO[] net.sf.pdune.client.services.IssueService.search(java.lang.String,int,int) throws net.sf.pdune.client.UIException' threw an unexpected exception: org.hibernate.search.SearchException: Unkown @FullTextFilter: project
   at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:268)
   at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:366)
   at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:222)
   at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:174)


I think this is due to the fact that the SearchFactoryImpl class recreates the filterDefinitions map on each call of bindFilterDefs:


Code:
public class SearchFactoryImpl implements SearchFactoryImplementor {
        ...
   private void bindFilterDefs(XClass mappedXClass) {
      filterDefinitions = new HashMap<String, FilterDef>();
        ...
}


My code where I am declaring the filter:
Code:
@Entity
@Table(name="ISSUE")
@Indexed(index="issue")
@FullTextFilterDef(name = IssueProjectFilterFactory.FILTER_NAME, impl = IssueProjectFilterFactory.class)
@SequenceGenerator( name="ISSUE_SEQ", sequenceName="seq_issue")
public class Issue extends PersistentObject implements Comparable


and the query code:

Code:
      org.apache.lucene.search.Query luceneQuery = MultiFieldQueryParser.parse( query, Issue.FIELDS, flags, analyzer );
         FullTextQuery fullTextQuery = fullTextSession.createFullTextQuery( luceneQuery, Issue.class );
         fullTextQuery.enableFullTextFilter( IssueProjectFilterFactory.FILTER_NAME ).setParameter(
            IssueProjectFilterFactory.PARAM_NAME, projects );


Please let me know if I am doing something wrong or whether this is a confirmed bug!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 23, 2007 7:03 am 
Newbie

Joined: Sat Aug 18, 2007 6:42 pm
Posts: 2
Location: Brazil
Any feedback on this issue? confirmed? Should I post to Jira?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 24, 2007 10:19 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Year it sounds like a bug, can you create a JIRA issue, with the test case you're describing attached. I'll check that for CR1

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