lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "david.w.smiley@gmail.com" <david.w.smi...@gmail.com>
Subject Re: Lucene Spatial: sort by best fit
Date Wed, 01 Apr 2015 19:50:16 GMT
On Wed, Apr 1, 2015 at 3:21 PM, Simon Rainer <Rainer.Simon@ait.ac.at> wrote:

> Hi David,
>
> ouch - no, missed that. I'm indexing points and polygons with the
> RecursivePrefixTreeStrategy right now, so simply didn't look properly at
> the BBoxStrategy. (I need to use exact polygons, so that I can make use of
> the ultra-cool 2D facet heatmap feature :-)
>

:-)


> So the best way, I guess, would be to index an additional field, using
> BBoxStrategy, that holds just the bounding box?
>

Absolutely.  A key point of the fact that there are multiple
SpatialStrategy classes is that there are multiple ways to index “spatial
data” with different use-cases.  So by all means, use as many of them that
you need.    For example, perhaps you might also use PointVectorStrategy
for distance-sorting to a center-point.  (BBoxStrategy can do that too…
albeit with a bit more work since it must calculate the center-point from
twice as many values 2 -> 4).

p.s. I’ve seen your code that uses Lucene spatial on GitHub (our friend
Bruce pointed me at it) and commented on a commit but I haven’t seen a
response from you.  Perhaps you don’t have notifications set up to alert
you?
https://github.com/pelagios/pelagios-api-v3/commit/f958fe5d8542cf55ddf6382940c5fe3ffa1a9fa6

~ David

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message