开发者

GWT + Lucene-spatial (via Hibernate Search)

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 开发者_StackOverflow社区find some help on how to use Lucene-Spatial within my application.

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])

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?

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);

            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.

Cheers, Rob


I am currently working on a GWT app that uses Lucene / Hibernate Search but not Lucene spatial.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜