David,
I was able to get it working with minor changes in my codebase. I didn't
have back port PointVectorStrategy class from 6.6.0 to 5.5.4
Code:
final int maxNumberOfCachedQueries = 256;
final long maxRamBytesUsed = 50 * 1024L * 1024L; // 50MB
final QueryCache queryCach
Hi David,
Sorry I didn't inform my current environment setup. I am on Apache Lucene
5.5.4 version(As our application is still running on JDK 1.7).
In that version, I only see one constructor for PointVectorStrategy class
public PointVectorStrategy(com.spatial4j.core.context.SpatialContext c
Thanks for the suggestion.
I changed the strategy to
this.strategy = new PointVectorStrategy(ctx, "pointVector");
And the rest of the code remained same. I recreated the Index and while
searching I am getting following Exception:
Exception in thread "main" java.lang.IllegalStateException: une
Hi,
Thanks for your suggestions that worked perfectly.
But unfortunately our current application is still using JDK 1.7 and it
would take a while to move to JDK 1.8. So I started using older version of
Lucene 5.5.4 which supports 1.7, but its not working smoothly. I must be
doing something wro
Alex, It didn't work for me. Did I miss anything in the above code I posted?
Thanks,
Satish
--
View this message in context:
http://lucene.472066.n3.nabble.com/Lucene-GeoNear-Search-and-Sort-Performance-tp4343468p4344490.html
Sent from the Lucene - Java Users mailing list archive at Nabble.co
While Indexing, I am storing the following fields:
doc.add(new StoredField("latitude", latitude));
doc.add(new StoredField("longitude", longitude));
doc.add(new LatLonPoint("loc", latitude, longitude));
As suggested, I added the following code:
For now, I used LatLonPoint.newDistanceQuery(...) and
SloppyMath.haversinMeters to get the distance between center point and all
other points within 50m radius circle and sort them using Comparator.
I am able to get accurate results in < 10ms which is fine with me.
Code:
Query l
Thank you so much. With LatLonPoint.nearest(..), I am getting results in 6ms,
with accurate results, when I compared MongoDB.geoNear().
I also tried with LatLonPoint.newDistanceQuery, and I got results in 6ms
but the results are NOT the nearest points.
Few more questions:
Is there an API that u
Hi,
I have similar requirement of searching points within a radius of 50m.
Loaded 100M latlon, indexed/searching with LatLonDocValuesField. Currently,
I am testing it on my macbook pro.
I have tested with all Directory(RAM/FS/MMap) types, but it takes > 3-4
secs to do search/sort to return of
radius of 50m.
I am looking to reduce search/sort time to 10ms. I have 4g of RAM for the
java process which is more than sufficient.
Any suggestions greatly appreciated.
Thanks,
sc
--
View this message in context:
http://lucene.472066.n3.nabble.com/Term-Dictionary-taking-up-lots-of-memory
10 matches
Mail list logo