Spatial: WithinRadiusOf

39 views
Skip to first unread message

lunarjetset

unread,
May 31, 2012, 7:21:27 AM5/31/12
to rav...@googlegroups.com
Hi,

Could I ask - can WithinRadiusOf be used in conjunction with another criteria because we seem to have problems using it with OR ELSE

ie: we want to return locations that are within a certain radius of a point OR items that have the name of New York

Or do we need to use Lucene directly to solve this?

Thanks

Pete

Oren Eini (Ayende Rahien)

unread,
May 31, 2012, 7:41:17 AM5/31/12
to rav...@googlegroups.com
You can't do that.
Spatial queries are limited to the distance specified, you would have to do two queries.

Itamar Syn-Hershko

unread,
Jun 1, 2012, 4:33:22 AM6/1/12
to rav...@googlegroups.com
With the new Spatial module in place this is actually something we can do quite easily, since we are now using a Query and not a Filter. By default we are tying the spatial query and the rest of the criteria with a BooleanQuery and a MUST flag on both clauses, but that can be changed.

A pull request would be nice.
Reply all
Reply to author
Forward
0 new messages