You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by sy...@apache.org on 2012/08/20 23:51:47 UTC
svn commit: r1375258 -
/incubator/lucene.net/trunk/src/contrib/Spatial/Prefix/PrefixTreeStrategy.cs
Author: synhershko
Date: Mon Aug 20 21:51:46 2012
New Revision: 1375258
URL: http://svn.apache.org/viewvc?rev=1375258&view=rev
Log:
LUCENE-3925 RecursivePrefixTree spatial strategy should not store doc freq or pos
Modified:
incubator/lucene.net/trunk/src/contrib/Spatial/Prefix/PrefixTreeStrategy.cs
Modified: incubator/lucene.net/trunk/src/contrib/Spatial/Prefix/PrefixTreeStrategy.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/Spatial/Prefix/PrefixTreeStrategy.cs?rev=1375258&r1=1375257&r2=1375258&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/Spatial/Prefix/PrefixTreeStrategy.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/Spatial/Prefix/PrefixTreeStrategy.cs Mon Aug 20 21:51:46 2012
@@ -76,7 +76,11 @@ namespace Lucene.Net.Spatial.Prefix
//TODO is CellTokenStream supposed to be re-used somehow? see Uwe's comments:
// http://code.google.com/p/lucene-spatial-playground/issues/detail?id=4
- return new AbstractField[] {new Field(GetFieldName(), new CellTokenStream(cells.GetEnumerator())) {OmitNorms = true}};
+ return new AbstractField[]
+ {
+ new Field(GetFieldName(), new CellTokenStream(cells.GetEnumerator()))
+ {OmitNorms = true, OmitTermFreqAndPositions = true}
+ };
}
/// <summary>
@@ -152,7 +156,7 @@ namespace Lucene.Net.Spatial.Prefix
public ValueSource MakeValueSource(SpatialArgs args, DistanceCalculator calc)
{
- PointPrefixTreeFieldCacheProvider p = (PointPrefixTreeFieldCacheProvider)GetCacheProvider();
+ var p = (PointPrefixTreeFieldCacheProvider)GetCacheProvider();
Point point = args.GetShape().GetCenter();
return new ShapeFieldCacheDistanceValueSource(point, calc, p);
}