-->
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.  [ 1 post ] 
Author Message
 Post subject: Hibernate search for matching name and within a distance
PostPosted: Mon Oct 10, 2011 7:10 am 
Newbie

Joined: Mon Oct 10, 2011 6:59 am
Posts: 1
Hi

I have just started using Hibernate Search.

I have a case where I need to find all Stores matching a given keyword and also should be within a radius. The input will be lat and long and radius.

1. Each store has its name, lat and long as property.
2. I have a associated table which has store id, distance columns. This is populated dynamically each time a query comes in with lat and long and radius. It will be populated with all store ids and distance which falls within a given radius
3. Store is the main table and it has an associated IndexEmbedded property for the distance table

I have created a lucene query with matching api.

Suppose there are 5 stores with a matching name and in the second table there are only 3 stores which actually fall within the given radius, the results of the query is returning all 5 stores.

how should I restrict the results in this case ?

Any help is appreciated.
Thanks
Ansu


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

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.