You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Michael McCandless <lu...@mikemccandless.com> on 2017/07/01 21:09:41 UTC

Re: Lucene GeoNear Search and Sort Performance

You can use LatLonPoint.newDistanceQuery to get the results within the
specified distance, and then use LatLonDocValuesField.newDistanceSort to
sort by distance, and use the IndexSearcher.search method that takes Sort.
Then the results should be all points within the radius, sorted by
distance.  That should (maybe) be faster than computing haversin yourself
on all hits.

Extending LatLonPoint.nearest to take a distance instead of top N should be
possible ... maybe open an issue?

Mike McCandless

http://blog.mikemccandless.com

On Thu, Jun 29, 2017 at 1:41 PM, sc <sc...@4info.com> wrote:

> 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 use with LatLonPoint.nearest where I can specify the
> radius.
>
> Or how can I sort results from LatLonPoint.newDistanceQuery?
>
> Thanks again.
>
>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble
> .com/Lucene-GeoNear-Search-and-Sort-Performance-tp4343468p4343502.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Re: Lucene GeoNear Search and Sort Performance

Posted by sc <sc...@4info.com>.
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.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Lucene GeoNear Search and Sort Performance

Posted by af...@gmail.com.
That worked! Thank you!

Thank you,
Alex

> On Jul 1, 2017, at 2:09 PM, Michael McCandless <lu...@mikemccandless.com> wrote:
> 
> You can use LatLonPoint.newDistanceQuery to get the results within the
> specified distance, and then use LatLonDocValuesField.newDistanceSort to
> sort by distance, and use the IndexSearcher.search method that takes Sort.
> Then the results should be all points within the radius, sorted by
> distance.  That should (maybe) be faster than computing haversin yourself
> on all hits.
> 
> Extending LatLonPoint.nearest to take a distance instead of top N should be
> possible ... maybe open an issue?
> 
> Mike McCandless
> 
> http://blog.mikemccandless.com
> 
>> On Thu, Jun 29, 2017 at 1:41 PM, sc <sc...@4info.com> wrote:
>> 
>> 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 use with LatLonPoint.nearest where I can specify the
>> radius.
>> 
>> Or how can I sort results from LatLonPoint.newDistanceQuery?
>> 
>> Thanks again.
>> 
>> 
>> 
>> 
>> 
>> --
>> View this message in context: http://lucene.472066.n3.nabble
>> .com/Lucene-GeoNear-Search-and-Sort-Performance-tp4343468p4343502.html
>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>> 
>> 

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Lucene GeoNear Search and Sort Performance

Posted by David Smiley <da...@gmail.com>.
I like how you figured out how to add DocValues without having to modify
PointVectorStrategy at all -- nice.

But I think you are completely using PointVectorStrategy, even for
filtering (query)?  It does a relatively slow job at that; I suggested
using RecursivePrefixTreeStrategy for the filtering part.  RPT should use
less memory for filtering than PointVector.  (in theory; I haven't measured)

The memory shouldn't increase over time if you are not adding new documents
as well.  There ought to be a warm-up period up front but it ought the
memory use should stabilize.  Perhaps there is an issue in your approach to
measuring this.

On Tue, Jul 18, 2017 at 9:26 PM sc <sc...@4info.com> wrote:

> 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 queryCache = new
> LRUQueryCache(maxNumberOfCachedQueries,
> maxRamBytesUsed);
>         final QueryCachingPolicy defaultCachingPolicy = new
> UsageTrackingQueryCachingPolicy();
>
>         this.strategy = new PointVectorStrategy(ctx, "pointvector");
>
> Indexing:
>                 doc.add(new DoubleDocValuesField("pointvector__x",
> longitude));
>                 doc.add(new DoubleDocValuesField("pointvector__y",
> latitude));
>
>                 Point pt = ctx.makePoint(longitude, latitude);
>                 for (IndexableField f :
> strategy.createIndexableFields(pt)) {
>                         doc.add(f);
>                 }
>
>                 doc.add(new StoredField(strategy.getFieldName(), pt.getX()
> + " " +
> pt.getY()));
>
> Searching :
>
>                 Point p = ctx.makePoint(lng, lat);
>                 Circle c = ctx.makeCircle(lng, lat, deg);
>                 SpatialArgs args = new
> SpatialArgs(SpatialOperation.Intersects, c);
>                 Query query = strategy.makeQuery(args);
>
>                 ValueSource valueSource =
> strategy.makeDistanceValueSource(p);
>                 Sort distSort = new
> Sort(valueSource.getSortField(false)).rewrite(searcher);
>
>                 int limit = 10;
>                 TopDocs topDocs = searcher.search(query, limit, distSort);
>
>
> While, I was able to get almost similar performance when compared with
> later
> versions of Lucene 6.6.0, but the memory consumption is more with Lucene
> 5.5.4 almost 5x.
>
> I am testing with 30K Lat/Lon and memory increases overtime.
>
> Any suggestions to improve memory consumption or code?
>
> Thanks
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Lucene-GeoNear-Search-and-Sort-Performance-tp4343468p4346726.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
> --
Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
http://www.solrenterprisesearchserver.com

Re: Lucene GeoNear Search and Sort Performance

Posted by sc <sc...@4info.com>.
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 queryCache = new LRUQueryCache(maxNumberOfCachedQueries,
maxRamBytesUsed);
	final QueryCachingPolicy defaultCachingPolicy = new
UsageTrackingQueryCachingPolicy();

	this.strategy = new PointVectorStrategy(ctx, "pointvector");

Indexing:
		doc.add(new DoubleDocValuesField("pointvector__x", longitude));
		doc.add(new DoubleDocValuesField("pointvector__y", latitude));

		Point pt = ctx.makePoint(longitude, latitude);
		for (IndexableField f : strategy.createIndexableFields(pt)) {
			doc.add(f);
		}

		doc.add(new StoredField(strategy.getFieldName(), pt.getX() + " " +
pt.getY()));

Searching :

		Point p = ctx.makePoint(lng, lat);
		Circle c = ctx.makeCircle(lng, lat, deg);
		SpatialArgs args = new SpatialArgs(SpatialOperation.Intersects, c);
		Query query = strategy.makeQuery(args);

		ValueSource valueSource = strategy.makeDistanceValueSource(p);
		Sort distSort = new
Sort(valueSource.getSortField(false)).rewrite(searcher);

		int limit = 10;
		TopDocs topDocs = searcher.search(query, limit, distSort);


While, I was able to get almost similar performance when compared with later
versions of Lucene 6.6.0, but the memory consumption is more with Lucene
5.5.4 almost 5x.

I am testing with 30K Lat/Lon and memory increases overtime.

Any suggestions to improve memory consumption or code?

Thanks





--
View this message in context: http://lucene.472066.n3.nabble.com/Lucene-GeoNear-Search-and-Sort-Performance-tp4343468p4346726.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Lucene GeoNear Search and Sort Performance

Posted by David Smiley <da...@gmail.com>.
Oooooh yes.... So in 5.x there was no DocValues option for this
SpatialStrategy impl which is a shame of course.  You could take the code
for 6.x:
https://github.com/apache/lucene-solr/blob/branch_6x/lucene/spatial-extras/src/java/org/apache/lucene/spatial/vector/PointVectorStrategy.java
and back port it to Lucene 5x.  It shouldn't be too hard.  Since you only
need this for distance sorting, you could only port what's needed; have
makeQuery(...) throw an exception.  createIndexableFields need only output
a 2-element array, one for each DoubleDocValuesField.

~ David

On Mon, Jul 17, 2017 at 12:46 AM sc <sc...@4info.com> wrote:

> 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 ctx,
> java.lang.String fieldNamePrefix);
>
> I don't use Solr packages either.
>
> What's the correct way to use PointVectorStrategy under Lucene 5.5.4
> version?
>
> Thanks for taking time and responding.
>
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Lucene-GeoNear-Search-and-Sort-Performance-tp4343468p4346286.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
> --
Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
http://www.solrenterprisesearchserver.com

Re: Lucene GeoNear Search and Sort Performance

Posted by sc <sc...@4info.com>.
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 ctx,
java.lang.String fieldNamePrefix);

I don't use Solr packages either.

What's the correct way to use PointVectorStrategy under Lucene 5.5.4
version?

Thanks for taking time and responding.






--
View this message in context: http://lucene.472066.n3.nabble.com/Lucene-GeoNear-Search-and-Sort-Performance-tp4343468p4346286.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Lucene GeoNear Search and Sort Performance

Posted by David Smiley <da...@gmail.com>.
As I mentioned that PointVectorStrategy has an argument that accepts a
Lucene FieldType that you can add docValues to.

On Sun, Jul 16, 2017 at 2:07 PM sc <sc...@4info.com> wrote:

> 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: unexpected
> docvalues type NONE for field 'pointVector__x' (expected=NUMERIC). Use
> UninvertingReader or index with docvalues.
>         at org.apache.lucene.index.DocValues.checkField(DocValues.java:208)
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Lucene-GeoNear-Search-and-Sort-Performance-tp4343468p4346269.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
> --
Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
http://www.solrenterprisesearchserver.com

Re: Lucene GeoNear Search and Sort Performance

Posted by sc <sc...@4info.com>.
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: unexpected
docvalues type NONE for field 'pointVector__x' (expected=NUMERIC). Use
UninvertingReader or index with docvalues.
	at org.apache.lucene.index.DocValues.checkField(DocValues.java:208)





--
View this message in context: http://lucene.472066.n3.nabble.com/Lucene-GeoNear-Search-and-Sort-Performance-tp4343468p4346269.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Lucene GeoNear Search and Sort Performance

Posted by David Smiley <da...@gmail.com>.
Hi "sc",
I suspect you are hitting OOM for makeDistanceValueSource call on
RecursivePrefixTreeStrategy.  That strategy is best for filtering (the
query), but it's a memory pig for distance sorting requirements.  Instead,
use PointVectorStrategy for the makeDistanceValueSource purpose.  For that
strategy, you only need it to do just that, so you can enable docValues and
disable the "index".  That strategy accepts a FieldType in the
constructor.  PointVectorStrategy is limited to one point per document per
field, and always uses double precision on both "x" and "y".
~ David

On Fri, Jul 14, 2017 at 6:19 PM sc <sc...@4info.com> wrote:

> 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 wrong while writing index.
>
> I am using the example from here
>
> https://github.com/apache/lucene-solr/blob/branch_5x/lucene/spatial/src/test/org/apache/lucene/spatial/SpatialExample.java
>
>  Indexing:
>
>                 Document doc = new Document();
>                 doc.add(new StoredField("id", id));
>
>                 Point pt = ctx.makePoint(longitude, latitude);
>                 for (IndexableField f :
> strategy.createIndexableFields(pt)) {
>                         doc.add(f);
>                 }
>
>                 doc.add(new StoredField(strategy.getFieldName(), pt.getX()
> + " " +
> pt.getY()));
>
>                 return doc;
>
>
> Searching:
>
>
>                 Point p = ctx.makePoint(lng, lat);
>                 Circle c = ctx.makeCircle(lng, lat, deg);
>                 SpatialArgs args = new
> SpatialArgs(SpatialOperation.Intersects, c);
>                 Query query = strategy.makeQuery(args);
>
>                 ValueSource valueSource =
> strategy.makeDistanceValueSource(p);
>                 Sort distSort = new
> Sort(valueSource.getSortField(false)).rewrite(searcher);
>
>                 int limit = 10;
>                 TopDocs topDocs = searcher.search(query, limit, distSort);
>
> When running on loading index, its throwing OutOfMemory Exception. I
> increased the memory to 4G and its failed.
>
> Any Suggestions,
>
> Thanks Much.
>
>
>
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Lucene-GeoNear-Search-and-Sort-Performance-tp4343468p4346178.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
> --
Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
http://www.solrenterprisesearchserver.com

Re: Lucene GeoNear Search and Sort Performance

Posted by sc <sc...@4info.com>.
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 wrong while writing index.

I am using the example from here
https://github.com/apache/lucene-solr/blob/branch_5x/lucene/spatial/src/test/org/apache/lucene/spatial/SpatialExample.java

 Indexing:

                Document doc = new Document();
		doc.add(new StoredField("id", id));

		Point pt = ctx.makePoint(longitude, latitude);
		for (IndexableField f : strategy.createIndexableFields(pt)) {
			doc.add(f);
		}

		doc.add(new StoredField(strategy.getFieldName(), pt.getX() + " " +
pt.getY()));

		return doc;


Searching:


		Point p = ctx.makePoint(lng, lat);
		Circle c = ctx.makeCircle(lng, lat, deg);
		SpatialArgs args = new SpatialArgs(SpatialOperation.Intersects, c);
		Query query = strategy.makeQuery(args);

		ValueSource valueSource = strategy.makeDistanceValueSource(p);
		Sort distSort = new
Sort(valueSource.getSortField(false)).rewrite(searcher);

		int limit = 10;
		TopDocs topDocs = searcher.search(query, limit, distSort);

When running on loading index, its throwing OutOfMemory Exception. I
increased the memory to 4G and its failed.

Any Suggestions,

Thanks Much.








--
View this message in context: http://lucene.472066.n3.nabble.com/Lucene-GeoNear-Search-and-Sort-Performance-tp4343468p4346178.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Lucene GeoNear Search and Sort Performance

Posted by Michael McCandless <lu...@mikemccandless.com>.
Hi, you need to also add a LatLonDocValuesField to your document during
indexing.

Mike McCandless

http://blog.mikemccandless.com

On Mon, Jul 3, 2017 at 11:18 AM, sc <sc...@4info.com> wrote:

> 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:
>                 Query latlonQuery = LatLonPoint.newDistanceQuery("loc",
> minLat, minLng,
> 50);
>                 Sort s = new Sort(LatLonDocValuesField.newDistanceSort("loc",
> minLat,
> minLng));
>                 TopDocs docs = searcher.search(latlonQuery, 50, s);
>
> But it threw exception:
>
> Exception in thread "main" java.lang.IllegalStateException: unexpected
> docvalues type NONE for field 'loc' (expected one of [SORTED_NUMERIC,
> NUMERIC]). Re-index with correct docvalues type.
>         at org.apache.lucene.index.DocValues.checkField(
> DocValues.java:212)
>         at org.apache.lucene.index.DocValues.getSortedNumeric(
> DocValues.java:284)
>         at
> org.apache.lucene.document.LatLonPointDistanceComparator.
> getLeafComparator(LatLonPointDistanceComparator.java:163)
>         at
> org.apache.lucene.search.FieldValueHitQueue.getComparators(
> FieldValueHitQueue.java:180)
>         at
> org.apache.lucene.search.TopFieldCollector$SimpleFieldCollector.
> getLeafCollector(TopFieldCollector.java:100)
>         at org.apache.lucene.search.IndexSearcher.search(
> IndexSearcher.java:659)
>         at org.apache.lucene.search.IndexSearcher.search(
> IndexSearcher.java:472)
>         at org.apache.lucene.search.IndexSearcher.search(
> IndexSearcher.java:591)
>         at
> org.apache.lucene.search.IndexSearcher.searchAfter(IndexSearcher.java:576)
>         at org.apache.lucene.search.IndexSearcher.search(
> IndexSearcher.java:503)
>
> Question is should I also store LatLonDocValuesField while Indexing?
>
>                 doc.add(new LatLonDocValuesField("loc", latitude,
> longitude));
>
>
>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.
> nabble.com/Lucene-GeoNear-Search-and-Sort-Performance-
> tp4343468p4343978.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Re: Lucene GeoNear Search and Sort Performance

Posted by sc <sc...@4info.com>.
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:
		Query latlonQuery = LatLonPoint.newDistanceQuery("loc", minLat, minLng,
50);
		Sort s = new Sort(LatLonDocValuesField.newDistanceSort("loc", minLat,
minLng));
		TopDocs docs = searcher.search(latlonQuery, 50, s);

But it threw exception:

Exception in thread "main" java.lang.IllegalStateException: unexpected
docvalues type NONE for field 'loc' (expected one of [SORTED_NUMERIC,
NUMERIC]). Re-index with correct docvalues type.
	at org.apache.lucene.index.DocValues.checkField(DocValues.java:212)
	at org.apache.lucene.index.DocValues.getSortedNumeric(DocValues.java:284)
	at
org.apache.lucene.document.LatLonPointDistanceComparator.getLeafComparator(LatLonPointDistanceComparator.java:163)
	at
org.apache.lucene.search.FieldValueHitQueue.getComparators(FieldValueHitQueue.java:180)
	at
org.apache.lucene.search.TopFieldCollector$SimpleFieldCollector.getLeafCollector(TopFieldCollector.java:100)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:659)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:472)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:591)
	at
org.apache.lucene.search.IndexSearcher.searchAfter(IndexSearcher.java:576)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:503)

Question is should I also store LatLonDocValuesField while Indexing?

		doc.add(new LatLonDocValuesField("loc", latitude, longitude));






--
View this message in context: http://lucene.472066.n3.nabble.com/Lucene-GeoNear-Search-and-Sort-Performance-tp4343468p4343978.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org