Ok I have re-phrased the question a bit as I have made some progress...
好的,我已经重新提出了一些问题,因为我取得了一些进展......
Hi,
I have been searching around for the last day (badly) to try to find some help on how to use Lucene-Spatial within my application.
我一直在寻找最后一天(很糟糕)试图找到一些关于如何在我的应用程序中使用Lucene-Spatial的帮助。
I am using GWT so I would like to keep the client side clear of org.apache.* packages as GWT tries to serialise everything on the client side. (made this tutorial less useful : [url]http://java.dzone.com/articles/spatial-search-hibernate?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+javalobby/frontpage+(Javalobby+/+Java+Zone)[/url])
我正在使用GWT,所以我想让客户端保持清除org.apache。*包,因为GWT尝试序列化客户端的所有内容。 (使本教程不太有用:[url] http://java.dzone.com/articles/spatial-search-hibernate?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+javalobby/frontpage+(Javalobby + / + Java + Zone)[/ URL])
Basically I have an address object with a field "latitude" and a field "longitude" and I would like to do distance searches against this, is lucene-spatial the right way to go or should I look more into doing it in another way?
基本上我有一个地址对象,字段为“纬度”,字段为“经度”,我想对此进行距离搜索,lucene-spatial是正确的方法,还是我应该更多地以另一种方式进行呢?
So far I have got to :-
到目前为止,我必须: -
[code]DistanceQueryBuilder dq = new DistanceQueryBuilder(new Double(point[1]), new Double(point[0]), 10d, "activity_locationName_latitude", "activity_locationName_longitude",CartesianTierPlotter.DEFALT_FIELD_PREFIX, true);
[code] DistanceQueryBuilder dq = new DistanceQueryBuilder(new Double(point [1]),new double(point [0]),10d,“activity_locationName_latitude”,“activity_locationName_longitude”,CartesianTierPlotter.DEFALT_FIELD_PREFIX,true);
FullTextSession fullTextSession = Search.getFullTextSession(session);
org.hibernate.Query fullTextQuery = fullTextSession.createFullTextQuery( new ConstantScoreQuery(dq.getFilter()) );[/code]
But I dont understand what "CartesianTierPlotter.DEFALT_FIELD_PREFIX" is meant to actually be, and as such my result set comes back empty.
但我不明白“CartesianTierPlotter.DEFALT_FIELD_PREFIX”究竟是什么意思,因此我的结果集又回来了。
Cheers, Rob
1 个解决方案
#1
0
I am currently working on a GWT app that uses Lucene / Hibernate Search but not Lucene spatial.
我目前正在开发一个使用Lucene / Hibernate Search而不是Lucene空间的GWT应用程序。
Is the issue you having very specific to the use of Lucene spatial? If not, then I could assist since I set all the Lucene / Hibernate Search stuff in our GWT app and it works like a charm (in other words I am using classes from org.apache.lucene with in a GWT-based app).
您对Lucene空间的使用非常具体吗?如果没有,那么我可以提供帮助,因为我在GWT应用程序中设置了所有Lucene / Hibernate Search的东西,它就像一个魅力(换句话说,我在基于GWT的应用程序中使用来自org.apache.lucene的类)。
#1
0
I am currently working on a GWT app that uses Lucene / Hibernate Search but not Lucene spatial.
我目前正在开发一个使用Lucene / Hibernate Search而不是Lucene空间的GWT应用程序。
Is the issue you having very specific to the use of Lucene spatial? If not, then I could assist since I set all the Lucene / Hibernate Search stuff in our GWT app and it works like a charm (in other words I am using classes from org.apache.lucene with in a GWT-based app).
您对Lucene空间的使用非常具体吗?如果没有,那么我可以提供帮助,因为我在GWT应用程序中设置了所有Lucene / Hibernate Search的东西,它就像一个魅力(换句话说,我在基于GWT的应用程序中使用来自org.apache.lucene的类)。