You'll be lucky to get help with the spatial module from Lucene 3.x, which
is what you are using. It was outright replaced in 4.0 because it was
buggy.
p.s. please don't blast emails to multiple lists
Good luck,
~ David
On Thu, Apr 10, 2014 at 1:58 AM, kumaran wrote:
>
> Hi All,
>
> i am try
I suggest either finding example code out there (try googling) or
https://code.ohloh.net and/or looking at any tests which can often serve
as illustrative examples. Failing those approaches; grab a coffee and
break out the debugger. This is fairly generic advise, I admit, but it's
all I have to
Hi.
Your question is actually not particularly spatial; it’s more
circumstantial to your particular query. You want to know how to do a query
and collect *all* the results, in no particular order. To do this
efficiently, you need to use a Collector. Also, I noticed you are using
the “IsWithin” p
Yes; as I said in my last sentence: "You’ll see a difference of Document vs
StoredDocument with 4x”.
As to SimpleCollector not being in 4x (I didn’t check but I’ll take your
word for it) — the bottom line is that you need to write a Collector, and a
simple one at that.
~ David Smiley
Freelance Ap
Hi Parth,
Lucene’s “terms dictionary” (an inverted index) is the physical
instantiation of the actual PrefixTree/Trie for numeric and spatial data.
It doesn’t know it is — it’s just a sorted list of keys pointing to
matching documents — it just so happens that the keys aren’t textual words
in this
Hi Parth,
Since Lucene 4.7 spatial, there is a “SerializedDVStrategy” for serialized
geometries. It’s used as a second-pass after RPT (or perhaps
BBoxStrategy). There was a presentation at FOSS4G about it (I was there
and helped with this one too):
http://vimeo.com/106843184
There’s a small code
FYI I plan to implement this in Lucene-spatial & Solr in January.
~ David Smiley
Freelance Apache Lucene/Solr Search Consultant/Developer
http://www.linkedin.com/in/davidwsmiley
On Wed, Nov 5, 2014 at 10:52 PM, Shahak Nagiel
wrote:
> I need a way to perform a spatial aggregation query against a
t your
> planned implementation?
>
>
> On Thursday, November 6, 2014 8:11 AM, "david.w.smi...@gmail.com" <
> david.w.smi...@gmail.com> wrote:
>
>
> FYI I plan to implement this in Lucene-spatial & Solr in January.
>
> ~ David Smiley
> Free
Hi Prasad,
Firstly, the Lucene ‘general’ list is not the appropriate list; it’s the
java-user lucene list so I’m replying there instead.
This is mostly about query parsing. If you look at Lucene’s modules,
you’ll see a “queryparser” module. In there, there’s a “flexible” package
which is named
Hello.
You have stated the use-case so generically that it’s not clear if you
should index the polygon set and query by the point set, or the reverse.
Generally, you should index the set that is known in-advance and then query
by the other, the set that is generally not known. Assuming this is th
Hi Ankit,
Vincenty is the most accurate one — it is the benchmark for the other 2’s
tests for the true answer. In theory it produces the same answers as the
other 2 simpler formulas you mention but is “numerically robust” for
computers. Note that the world model used by Spatial4j when in “geo” m
of Vincenty.
>
> However, I do not intend to use GeoDesy.
>
> I would prefer to use inbuilt Vincenty of Lucene to get the distance in
> metres but I am unable to find this.
>
> Please suggest.
>
>
> -Original Message-
> From: david.w.smi...@gmail.com [mailto
gon which is present(boundaries intersecting,incomplete), I am printing
> exception which is again I am excluding.. This is not the worry..
>
> Worry is I am getting very polygons which actually have points inside them.
>
> Please correct me where I am going wrong.
>
>
> -Ori
Yeah, Uwe has it basically right. I was on vacation when the release notes
were developed and missed the opportunity to review them before they were
published. This bullet references “DateRangeField” but that’s the Solr
side of this feature. The Lucene side is the combination
of NumberRangePrefi
Hi Rainer,
I see two issues. One is that you call makePoint with latitude (Y) then
longitude (X). Spatial4j is X then Y order. The second issue is more
stylistic (but in this case it may explain your symptom due to the X & Y
mixup) is that, since you already have a ‘point’, when you call makeCi
Hi Rainer,
If Solr is an option, then as of 5.0 you can use “DateRangeField” and use
Solr’s standard faceting on that.
If this is at the Lucene level, you can do the same approach as Solr — use
NumberRangePrefixTreeStrategy configured with a DateRangePrefixTree. Then
for each interval, generate
Hi Mike,
The second, (non-easy) part seems like it could be pretty slow:
Additionally, I'd like to have access to the
> numerical value of the smallest polygon which contains the point
> (something like makeDistanceValueSource).
To determine “the smallest polygon which contains the point” for t
On Fri, Mar 27, 2015 at 12:27 AM, Mike Hansen wrote:
> There are a few things which could probably help with performance.
> Each document has only around say 30 polygons. You could do a binary
> search which would help reduce the cost. Additionally, I have a
> distinguished point contained inside
I Anton.
I think you’re right. PointVectorStrategy has been overlooked. The
work-around is pretty simple though. In addition to calling
createIndexableFields, also create two DoubleDocValuesField instances, one
for each dimension that uses the identical names the strategy generates.
Lucene will
Hi Rainer,
The BBoxStrategy is pretty close to this. It does assume indexed
rectangles and not other shapes, and it’s limited to one rect value per
field, but perhaps this is fine for you nonetheless? See
the makeOverlapRatioValueSource() method. If this feature was non-obvious,
I think I may n
On Wed, Apr 1, 2015 at 3:21 PM, Simon Rainer 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
One would think that all “space characters” are by definition
“whitespace”. Not true!:
http://www.fileformat.info/info/unicode/char/00a0/index.htm
So I’m working on an app where I can no longer use WhitespaceTokenizer
since I need to check for isSpacheChar *OR* isWhitespace. Alternatively I
coul
Hi Robert,
First, for the basics of the spatial module, see SpatialExample.java in the
tests area. It doesn't include a polygon example but shows the concepts of
a SpatialContext, Shape, and SpatialStrategy which are the key abstractions.
The default SpatialContext implementation doesn't handle
Yup.
Just to clarify for the O.P., after getting the SpatialStrategy instance,
call createIndexableFields() which returns a list of Field instances, which
you can then call tokenStream() on as Alan indicated. This should work
fine for any of the SpatialStrategy instances.
On Wed, Jan 20, 2016 at
24 matches
Mail list logo