-->
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.  [ 2 posts ] 
Author Message
 Post subject: onCoordinates vs. onDefaultCoordinates
PostPosted: Tue Jan 29, 2013 8:53 am 
Regular
Regular

Joined: Fri Feb 04, 2011 8:34 pm
Posts: 66
With JBOSS 7.1.1.Final and Hibernate-search-4.2.0, when I used onDefaultCoordinates (), the search with radius not calculated correctly for its range.
Here is the code with onDefaultCoordinates ():

Code:
.must(qb.spatial()
                                .onDefaultCoordinates ()
                                .within( radius, Unit.KM )
                                .ofLatitude( lat )
                                .andLongitude( lon ).createQuery()


While with onCoordinates(".."), it failed in run-time with the following exception:

Quote:
21:57:33,496 FINE [org.apache.cxf.endpoint.ClientImpl] (http--192.168.1.20-8080-4) set responseContext to be{org.apache.cxf.client=true, org.apache.cxf.message.Message.PROTOCOL_HEADERS={connection=[close], Content-Length=[389], content-type=[text/xml;charset=UTF-8], Date=[Tue, 29 Jan 2013 10:57:33 GMT], Server=[Apache-Coyote/1.1]}, org.apache.cxf.message.inbound=true, Content-Type=text/xml;charset=UTF-8, org.apache.cxf.message.Message.ENCODING=UTF-8, org.apache.cxf.message.Message.RESPONSE_CODE=500, org.apache.cxf.binding.soap.SoapVersion=org.apache.cxf.binding.soap.Soap11@18aa8713, org.apache.cxf.ws.policy.AssertionInfoMap={}, org.apache.cxf.headers.Header.list=[]}
21:57:33,524 DEBUG [org.jboss.modules] (http--192.168.1.20-8080-4) Module org.jboss.ws.saaj-impl:main defined by local module loader @744a6cbf (roots: /usr/local/users/jboss/jboss711Final/modules)
21:57:33,605 ERROR [org.jboss.ejb3.invocation] (http--192.168.1.20-8080-4) JBAS014134: EJB Invocation failed on component MyisamProductArticleManagerBean for method public abstract java.util.List ForestsurfClient.manager.MyisamProductArticleManagerLocal.search(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.Double,java.lang.Double,java.lang.Double,java.lang.Integer,java.lang.Integer): javax.ejb.EJBException: java.lang.RuntimeException: javax.xml.ws.soap.SOAPFaultException: javax.ejb.EJBException: org.hibernate.search.SearchException: HSEARCH000131: The field used for the spatial query is not using SpatialFieldBridge: ForestSurf.entity.MyisamProductArticle.location
at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:166) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:230) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:304) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]


The code with onCoordinates("..") us shown as below:

Code:
.must(qb.spatial()
                                .onCoordinates( "location" )
                                .within( radius, Unit.KM )
                                .ofLatitude( lat )
                                .andLongitude( lon ).createQuery()


Any suggestion is highly appreciated.
Thanks
Samuel


Top
 Profile  
 
 Post subject: Re: onCoordinates vs. onDefaultCoordinates
PostPosted: Thu Jan 31, 2013 9:26 am 
Contributor
Contributor

Joined: Tue Jan 29, 2013 11:56 am
Posts: 3
Could you show the annotation on your entity please ?

What do you mean by
Quote:
when I used onDefaultCoordinates (), the search with radius not calculated correctly for its range
?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.