lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [15/21] More work on Lucene.Net.Queries
Date Fri, 19 Sep 2014 14:19:48 GMT
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ba0f3c7d/src/Lucene.Net.Queries/Function/ValueSources/ScaleFloatFunction.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/ScaleFloatFunction.cs b/src/Lucene.Net.Queries/Function/ValueSources/ScaleFloatFunction.cs
index 2b2f15c..95bd2d2 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/ScaleFloatFunction.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/ScaleFloatFunction.cs
@@ -16,9 +16,9 @@
  */
 using System.Collections;
 using System.Collections.Generic;
+using Lucene.Net.Index;
+using Lucene.Net.Queries.Function.DocValues;
 using Lucene.Net.Support;
-using org.apache.lucene.queries.function;
-using org.apache.lucene.queries.function.docvalues;
 
 namespace Lucene.Net.Queries.Function.ValueSources
 {
@@ -48,12 +48,12 @@ namespace Lucene.Net.Queries.Function.ValueSources
 		this.max = max;
 	  }
 
-	  public override string description()
-	  {
-		return "scale(" + source.description() + "," + min + "," + max + ")";
-	  }
+        public override string Description
+        {
+            get { return "scale(" + source.Description() + "," + min + "," + max + ")"; }
+        }
 
-	  private class ScaleInfo
+        private class ScaleInfo
 	  {
 		internal float minVal;
 		internal float maxVal;
@@ -61,11 +61,11 @@ namespace Lucene.Net.Queries.Function.ValueSources
 
 //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
 //ORIGINAL LINE: private ScaleInfo createScaleInfo(java.util.Map context, org.apache.lucene.index.AtomicReaderContext
readerContext) throws java.io.IOException
-	  private ScaleInfo createScaleInfo(IDictionary context, AtomicReaderContext readerContext)
+	  private ScaleInfo CreateScaleInfo(IDictionary context, AtomicReaderContext readerContext)
 	  {
 //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
 //ORIGINAL LINE: final java.util.List<org.apache.lucene.index.AtomicReaderContext>
leaves = org.apache.lucene.index.ReaderUtil.getTopLevelContext(readerContext).leaves();
-		IList<AtomicReaderContext> leaves = ReaderUtil.getTopLevelContext(readerContext).leaves();
+		IList<AtomicReaderContext> leaves = ReaderUtil.GetTopLevelContext(readerContext).leaves();
 
 		float minVal = float.PositiveInfinity;
 		float maxVal = float.NegativeInfinity;
@@ -73,11 +73,11 @@ namespace Lucene.Net.Queries.Function.ValueSources
 		foreach (AtomicReaderContext leaf in leaves)
 		{
 		  int maxDoc = leaf.reader().maxDoc();
-		  FunctionValues vals = source.getValues(context, leaf);
+		  FunctionValues vals = source.GetValues(context, leaf);
 		  for (int i = 0; i < maxDoc; i++)
 		  {
 
-		  float val = vals.floatVal(i);
+		  float val = vals.FloatVal(i);
 		  if ((float.floatToRawIntBits(val) & (0xff << 23)) == 0xff << 23)
 		  {
 			// if the exponent in the float is all ones, then this is +Inf, -Inf or NaN
@@ -109,8 +109,8 @@ namespace Lucene.Net.Queries.Function.ValueSources
 	  }
 
 //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: @Override public org.apache.lucene.queries.function.FunctionValues getValues(java.util.Map
context, org.apache.lucene.index.AtomicReaderContext readerContext) throws java.io.IOException
-	  public override FunctionValues getValues(IDictionary context, AtomicReaderContext readerContext)
+//ORIGINAL LINE: @Override public org.apache.lucene.queries.function.FunctionValues GetValues(java.util.Map
context, org.apache.lucene.index.AtomicReaderContext readerContext) throws java.io.IOException
+	  public override FunctionValues GetValues(IDictionary context, AtomicReaderContext readerContext)
 	  {
 
 		ScaleInfo scaleInfo = (ScaleInfo)context[ScaleFloatFunction.this];
@@ -130,8 +130,8 @@ namespace Lucene.Net.Queries.Function.ValueSources
 		float maxSource = scaleInfo.maxVal;
 
 //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
-//ORIGINAL LINE: final org.apache.lucene.queries.function.FunctionValues vals = source.getValues(context,
readerContext);
-		FunctionValues vals = source.getValues(context, readerContext);
+//ORIGINAL LINE: final org.apache.lucene.queries.function.FunctionValues vals = source.GetValues(context,
readerContext);
+		FunctionValues vals = source.GetValues(context, readerContext);
 
 		return new FloatDocValuesAnonymousInnerClassHelper(this, this, scale, minSource, maxSource,
vals);
 	  }
@@ -154,9 +154,9 @@ namespace Lucene.Net.Queries.Function.ValueSources
 			  this.vals = vals;
 		  }
 
-		  public override float floatVal(int doc)
+		  public override float FloatVal(int doc)
 		  {
-			return (vals.floatVal(doc) - minSource) * scale + outerInstance.min;
+			return (vals.FloatVal(doc) - minSource) * scale + outerInstance.min;
 		  }
 		  public override string ToString(int doc)
 		  {
@@ -165,10 +165,10 @@ namespace Lucene.Net.Queries.Function.ValueSources
 	  }
 
 //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: @Override public void createWeight(java.util.Map context, org.apache.lucene.search.IndexSearcher
searcher) throws java.io.IOException
-	  public override void createWeight(IDictionary context, IndexSearcher searcher)
+//ORIGINAL LINE: @Override public void CreateWeight(java.util.Map context, org.apache.lucene.search.IndexSearcher
searcher) throws java.io.IOException
+	  public override void CreateWeight(IDictionary context, IndexSearcher searcher)
 	  {
-		source.createWeight(context, searcher);
+		source.CreateWeight(context, searcher);
 	  }
 
 	  public override int GetHashCode()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ba0f3c7d/src/Lucene.Net.Queries/Function/ValueSources/ShortFieldSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/ShortFieldSource.cs b/src/Lucene.Net.Queries/Function/ValueSources/ShortFieldSource.cs
index cbb6215..9ed5d2a 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/ShortFieldSource.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/ShortFieldSource.cs
@@ -47,8 +47,8 @@ namespace Lucene.Net.Queries.Function.ValueSources
 	  }
 
 //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: @Override public org.apache.lucene.queries.function.FunctionValues getValues(java.util.Map
context, org.apache.lucene.index.AtomicReaderContext readerContext) throws java.io.IOException
-	  public override FunctionValues getValues(IDictionary context, AtomicReaderContext readerContext)
+//ORIGINAL LINE: @Override public org.apache.lucene.queries.function.FunctionValues GetValues(java.util.Map
context, org.apache.lucene.index.AtomicReaderContext readerContext) throws java.io.IOException
+	  public override FunctionValues GetValues(IDictionary context, AtomicReaderContext readerContext)
 	  {
 //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
 //ORIGINAL LINE: final org.apache.lucene.search.FieldCache.Shorts arr = cache.getShorts(readerContext.reader(),
field, parser, false);
@@ -69,17 +69,17 @@ namespace Lucene.Net.Queries.Function.ValueSources
 			  this.arr = arr;
 		  }
 
-		  public override sbyte byteVal(int doc)
+		  public override sbyte ByteVal(int doc)
 		  {
 			return (sbyte) arr.get(doc);
 		  }
 
-		  public override short shortVal(int doc)
+		  public override short ShortVal(int doc)
 		  {
 			return arr.get(doc);
 		  }
 
-		  public override float floatVal(int doc)
+		  public override float FloatVal(int doc)
 		  {
 			return (float) arr.get(doc);
 		  }
@@ -89,24 +89,24 @@ namespace Lucene.Net.Queries.Function.ValueSources
 			return (int) arr.get(doc);
 		  }
 
-		  public override long longVal(int doc)
+		  public override long LongVal(int doc)
 		  {
 			return (long) arr.get(doc);
 		  }
 
-		  public override double doubleVal(int doc)
+		  public override double DoubleVal(int doc)
 		  {
 			return (double) arr.get(doc);
 		  }
 
-		  public override string strVal(int doc)
+		  public override string StrVal(int doc)
 		  {
 			return Convert.ToString(arr.get(doc));
 		  }
 
 		  public override string ToString(int doc)
 		  {
-			return outerInstance.description() + '=' + shortVal(doc);
+			return outerInstance.description() + '=' + ShortVal(doc);
 		  }
 
 	  }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ba0f3c7d/src/Lucene.Net.Queries/Function/ValueSources/SimpleBoolFunction.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/SimpleBoolFunction.cs b/src/Lucene.Net.Queries/Function/ValueSources/SimpleBoolFunction.cs
index e80fd80..ea31a26 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/SimpleBoolFunction.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/SimpleBoolFunction.cs
@@ -15,8 +15,8 @@
  * limitations under the License.
  */
 using System.Collections;
+using Lucene.Net.Queries.Function.DocValues;
 using org.apache.lucene.queries.function;
-using org.apache.lucene.queries.function.docvalues;
 
 namespace Lucene.Net.Queries.Function.ValueSources
 {
@@ -41,12 +41,12 @@ namespace Lucene.Net.Queries.Function.ValueSources
 	  protected internal abstract bool func(int doc, FunctionValues vals);
 
 //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: @Override public org.apache.lucene.queries.function.docvalues.BoolDocValues
getValues(java.util.Map context, org.apache.lucene.index.AtomicReaderContext readerContext)
throws java.io.IOException
-	  public override BoolDocValues getValues(IDictionary context, AtomicReaderContext readerContext)
+//ORIGINAL LINE: @Override public org.apache.lucene.queries.function.docvalues.BoolDocValues
GetValues(java.util.Map context, org.apache.lucene.index.AtomicReaderContext readerContext)
throws java.io.IOException
+	  public override BoolDocValues GetValues(IDictionary context, AtomicReaderContext readerContext)
 	  {
 //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
-//ORIGINAL LINE: final org.apache.lucene.queries.function.FunctionValues vals = source.getValues(context,
readerContext);
-		FunctionValues vals = source.getValues(context, readerContext);
+//ORIGINAL LINE: final org.apache.lucene.queries.function.FunctionValues vals = source.GetValues(context,
readerContext);
+		FunctionValues vals = source.GetValues(context, readerContext);
 		return new BoolDocValuesAnonymousInnerClassHelper(this, this, vals);
 	  }
 
@@ -93,10 +93,10 @@ namespace Lucene.Net.Queries.Function.ValueSources
 	  }
 
 //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: @Override public void createWeight(java.util.Map context, org.apache.lucene.search.IndexSearcher
searcher) throws java.io.IOException
-	  public override void createWeight(IDictionary context, IndexSearcher searcher)
+//ORIGINAL LINE: @Override public void CreateWeight(java.util.Map context, org.apache.lucene.search.IndexSearcher
searcher) throws java.io.IOException
+	  public override void CreateWeight(IDictionary context, IndexSearcher searcher)
 	  {
-		source.createWeight(context, searcher);
+		source.CreateWeight(context, searcher);
 	  }
 	}
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ba0f3c7d/src/Lucene.Net.Queries/Function/ValueSources/SimpleFloatFunction.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/SimpleFloatFunction.cs b/src/Lucene.Net.Queries/Function/ValueSources/SimpleFloatFunction.cs
index 73739df..31cb1c2 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/SimpleFloatFunction.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/SimpleFloatFunction.cs
@@ -16,8 +16,8 @@
  * limitations under the License.
  */
 using Lucene.Net.Index;
+using Lucene.Net.Queries.Function.DocValues;
 using org.apache.lucene.queries.function;
-using org.apache.lucene.queries.function.docvalues;
 
 namespace Lucene.Net.Queries.Function.ValueSources
 {
@@ -26,7 +26,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
 	/// </summary>
 	 public abstract class SimpleFloatFunction : SingleFunction
 	 {
-	  public SimpleFloatFunction(org.apache.lucene.queries.function.ValueSource source) : base(source)
+	  public SimpleFloatFunction(ValueSource source) : base(source)
 	  {
 	  }
 
@@ -34,7 +34,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
 
 	  public override FunctionValues GetValues(IDictionary context, AtomicReaderContext readerContext)
 	  {
-		FunctionValues vals = source.getValues(context, readerContext);
+		FunctionValues vals = source.GetValues(context, readerContext);
 		return new FloatDocValuesAnonymousInnerClassHelper(this, this, vals);
 	  }
 
@@ -50,7 +50,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
 			  this.vals = vals;
 		  }
 
-		  public override float floatVal(int doc)
+		  public override float FloatVal(int doc)
 		  {
 			return outerInstance.func(doc, vals);
 		  }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ba0f3c7d/src/Lucene.Net.Queries/Function/ValueSources/SingleFunction.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/SingleFunction.cs b/src/Lucene.Net.Queries/Function/ValueSources/SingleFunction.cs
index b4102fd..51c196d 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/SingleFunction.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/SingleFunction.cs
@@ -53,10 +53,10 @@ namespace Lucene.Net.Queries.Function.ValueSources
 	  }
 
 //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: @Override public void createWeight(java.util.Map context, org.apache.lucene.search.IndexSearcher
searcher) throws java.io.IOException
-	  public override void createWeight(IDictionary context, IndexSearcher searcher)
+//ORIGINAL LINE: @Override public void CreateWeight(java.util.Map context, org.apache.lucene.search.IndexSearcher
searcher) throws java.io.IOException
+	  public override void CreateWeight(IDictionary context, IndexSearcher searcher)
 	  {
-		source.createWeight(context, searcher);
+		source.CreateWeight(context, searcher);
 	  }
 	 }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ba0f3c7d/src/Lucene.Net.Queries/Function/ValueSources/SumFloatFunction.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/SumFloatFunction.cs b/src/Lucene.Net.Queries/Function/ValueSources/SumFloatFunction.cs
index bcfd8a8..35a8274 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/SumFloatFunction.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/SumFloatFunction.cs
@@ -40,7 +40,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
 		float val = 0.0f;
 		foreach (FunctionValues vals in valsArr)
 		{
-		  val += vals.floatVal(doc);
+		  val += vals.FloatVal(doc);
 		}
 		return val;
 	  }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ba0f3c7d/src/Lucene.Net.Queries/Function/ValueSources/SumTotalTermFreqValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/SumTotalTermFreqValueSource.cs b/src/Lucene.Net.Queries/Function/ValueSources/SumTotalTermFreqValueSource.cs
index 1fc9aec..bb5aa41 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/SumTotalTermFreqValueSource.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/SumTotalTermFreqValueSource.cs
@@ -15,8 +15,8 @@
  * limitations under the License.
  */
 using System.Collections;
+using Lucene.Net.Queries.Function.DocValues;
 using org.apache.lucene.queries.function;
-using org.apache.lucene.queries.function.docvalues;
 
 namespace Lucene.Net.Queries.Function.ValueSources
 {
@@ -47,15 +47,15 @@ namespace Lucene.Net.Queries.Function.ValueSources
 	  }
 
 //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: @Override public org.apache.lucene.queries.function.FunctionValues getValues(java.util.Map
context, org.apache.lucene.index.AtomicReaderContext readerContext) throws java.io.IOException
-	  public override FunctionValues getValues(IDictionary context, AtomicReaderContext readerContext)
+//ORIGINAL LINE: @Override public org.apache.lucene.queries.function.FunctionValues GetValues(java.util.Map
context, org.apache.lucene.index.AtomicReaderContext readerContext) throws java.io.IOException
+	  public override FunctionValues GetValues(IDictionary context, AtomicReaderContext readerContext)
 	  {
 		return (FunctionValues)context[this];
 	  }
 
 //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: @Override public void createWeight(java.util.Map context, org.apache.lucene.search.IndexSearcher
searcher) throws java.io.IOException
-	  public override void createWeight(IDictionary context, IndexSearcher searcher)
+//ORIGINAL LINE: @Override public void CreateWeight(java.util.Map context, org.apache.lucene.search.IndexSearcher
searcher) throws java.io.IOException
+	  public override void CreateWeight(IDictionary context, IndexSearcher searcher)
 	  {
 		long sumTotalTermFreq = 0;
 		foreach (AtomicReaderContext readerContext in searcher.TopReaderContext.leaves())
@@ -99,7 +99,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
 			  this.ttf = ttf;
 		  }
 
-		  public override long longVal(int doc)
+		  public override long LongVal(int doc)
 		  {
 			return ttf;
 		  }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ba0f3c7d/src/Lucene.Net.Queries/Function/ValueSources/TFValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/TFValueSource.cs b/src/Lucene.Net.Queries/Function/ValueSources/TFValueSource.cs
index df6be4c..2240d4d 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/TFValueSource.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/TFValueSource.cs
@@ -1,7 +1,12 @@
 ´╗┐using System;
 using System.Collections;
+using System.IO;
+using Lucene.Net.Index;
+using Lucene.Net.Queries.Function.DocValues;
+using Lucene.Net.Search;
+using Lucene.Net.Search.Similarities;
+using Lucene.Net.Util;
 using org.apache.lucene.queries.function;
-using org.apache.lucene.queries.function.docvalues;
 
 namespace Lucene.Net.Queries.Function.ValueSources
 {
@@ -42,18 +47,12 @@ namespace Lucene.Net.Queries.Function.ValueSources
 		return "tf";
 	  }
 
-//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: @Override public org.apache.lucene.queries.function.FunctionValues getValues(java.util.Map
context, AtomicReaderContext readerContext) throws java.io.IOException
-	  public override FunctionValues getValues(IDictionary context, AtomicReaderContext readerContext)
+        public override FunctionValues GetValues(IDictionary context, AtomicReaderContext
readerContext)
 	  {
-		Fields fields = readerContext.reader().fields();
-//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
-//ORIGINAL LINE: final Terms terms = fields.terms(indexedField);
-		Terms terms = fields.terms(indexedField);
+		Fields fields = readerContext.AtomicReader.Fields;
+		Terms terms = fields.Terms(indexedField);
 		IndexSearcher searcher = (IndexSearcher)context["searcher"];
-//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
-//ORIGINAL LINE: final org.apache.lucene.search.similarities.TFIDFSimilarity similarity =
IDFValueSource.asTFIDF(searcher.getSimilarity(), indexedField);
-		TFIDFSimilarity similarity = IDFValueSource.asTFIDF(searcher.Similarity, indexedField);
+		TFIDFSimilarity similarity = IDFValueSource.AsTFIDF(searcher.Similarity, indexedField);
 		if (similarity == null)
 		{
 		  throw new System.NotSupportedException("requires a TFIDFSimilarity (such as DefaultSimilarity)");
@@ -69,7 +68,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
 		  private Terms terms;
 		  private TFIDFSimilarity similarity;
 
-		  public FloatDocValuesAnonymousInnerClassHelper(TFValueSource outerInstance, TFValueSource
this, Terms terms, TFIDFSimilarity similarity) : base(this)
+		  public FloatDocValuesAnonymousInnerClassHelper(TFValueSource outerInstance, TFValueSource
@this, Terms terms, TFIDFSimilarity similarity) : base(@this)
 		  {
 			  this.outerInstance = outerInstance;
 			  this.terms = terms;
@@ -88,7 +87,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
 
 //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
 //ORIGINAL LINE: public void reset() throws java.io.IOException
-		  public virtual void reset()
+		  public virtual void Reset()
 		  {
 			// no one should call us for deleted docs?
 
@@ -96,10 +95,10 @@ namespace Lucene.Net.Queries.Function.ValueSources
 			{
 //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
 //ORIGINAL LINE: final TermsEnum termsEnum = terms.iterator(null);
-			  TermsEnum termsEnum = terms.iterator(null);
-			  if (termsEnum.seekExact(outerInstance.indexedBytes))
+			  TermsEnum termsEnum = terms.Iterator(null);
+			  if (termsEnum.SeekExact(outerInstance.indexedBytes))
 			  {
-				docs = termsEnum.docs(null, null);
+				docs = termsEnum.Docs(null, null);
 			  }
 			  else
 			  {
@@ -127,57 +126,57 @@ namespace Lucene.Net.Queries.Function.ValueSources
 				  this.outerInstance = outerInstance;
 			  }
 
-			  public override int freq()
+			  public override int Freq()
 			  {
 				return 0;
 			  }
 
-			  public override int docID()
+			  public override int DocID()
 			  {
 				return DocIdSetIterator.NO_MORE_DOCS;
 			  }
 
-			  public override int nextDoc()
+			  public override int NextDoc()
 			  {
 				return DocIdSetIterator.NO_MORE_DOCS;
 			  }
 
-			  public override int advance(int target)
+			  public override int Advance(int target)
 			  {
 				return DocIdSetIterator.NO_MORE_DOCS;
 			  }
 
-			  public override long cost()
+			  public override long Cost()
 			  {
 				return 0;
 			  }
 		  }
 
-		  public override float floatVal(int doc)
+		  public override float FloatVal(int doc)
 		  {
 			try
 			{
 			  if (doc < lastDocRequested)
 			  {
 				// out-of-order access.... reset
-				reset();
+				Reset();
 			  }
 			  lastDocRequested = doc;
 
 			  if (atDoc < doc)
 			  {
-				atDoc = docs.advance(doc);
+				atDoc = docs.Advance(doc);
 			  }
 
 			  if (atDoc > doc)
 			  {
 				// term doesn't match this document... either because we hit the
 				// end, or because the next doc is after this doc.
-				return similarity.tf(0);
+				return similarity.Tf(0);
 			  }
 
 			  // a match!
-			  return similarity.tf(docs.freq());
+			  return similarity.Tf(docs.Freq());
 			}
 			catch (IOException e)
 			{

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ba0f3c7d/src/Lucene.Net.Queries/Function/ValueSources/TermFreqValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/TermFreqValueSource.cs b/src/Lucene.Net.Queries/Function/ValueSources/TermFreqValueSource.cs
index 3a70309..5634e0d 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/TermFreqValueSource.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/TermFreqValueSource.cs
@@ -16,8 +16,8 @@
  */
 using System;
 using System.Collections;
+using Lucene.Net.Queries.Function.DocValues;
 using org.apache.lucene.queries.function;
-using org.apache.lucene.queries.function.docvalues;
 
 namespace Lucene.Net.Queries.Function.ValueSources
 {
@@ -41,8 +41,8 @@ namespace Lucene.Net.Queries.Function.ValueSources
 	  }
 
 //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: @Override public org.apache.lucene.queries.function.FunctionValues getValues(java.util.Map
context, AtomicReaderContext readerContext) throws java.io.IOException
-	  public override FunctionValues getValues(IDictionary context, AtomicReaderContext readerContext)
+//ORIGINAL LINE: @Override public org.apache.lucene.queries.function.FunctionValues GetValues(java.util.Map
context, AtomicReaderContext readerContext) throws java.io.IOException
+	  public override FunctionValues GetValues(IDictionary context, AtomicReaderContext readerContext)
 	  {
 		Fields fields = readerContext.reader().fields();
 //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ba0f3c7d/src/Lucene.Net.Queries/Function/ValueSources/TotalTermFreqValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/TotalTermFreqValueSource.cs b/src/Lucene.Net.Queries/Function/ValueSources/TotalTermFreqValueSource.cs
index 24a5684..dce8177 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/TotalTermFreqValueSource.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/TotalTermFreqValueSource.cs
@@ -15,8 +15,8 @@
  * limitations under the License.
  */
 using System.Collections;
+using Lucene.Net.Queries.Function.DocValues;
 using org.apache.lucene.queries.function;
-using org.apache.lucene.queries.function.docvalues;
 
 namespace Lucene.Net.Queries.Function.ValueSources
 {
@@ -53,15 +53,15 @@ namespace Lucene.Net.Queries.Function.ValueSources
 	  }
 
 //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: @Override public org.apache.lucene.queries.function.FunctionValues getValues(java.util.Map
context, org.apache.lucene.index.AtomicReaderContext readerContext) throws java.io.IOException
-	  public override FunctionValues getValues(IDictionary context, AtomicReaderContext readerContext)
+//ORIGINAL LINE: @Override public org.apache.lucene.queries.function.FunctionValues GetValues(java.util.Map
context, org.apache.lucene.index.AtomicReaderContext readerContext) throws java.io.IOException
+	  public override FunctionValues GetValues(IDictionary context, AtomicReaderContext readerContext)
 	  {
 		return (FunctionValues)context[this];
 	  }
 
 //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: @Override public void createWeight(java.util.Map context, org.apache.lucene.search.IndexSearcher
searcher) throws java.io.IOException
-	  public override void createWeight(IDictionary context, IndexSearcher searcher)
+//ORIGINAL LINE: @Override public void CreateWeight(java.util.Map context, org.apache.lucene.search.IndexSearcher
searcher) throws java.io.IOException
+	  public override void CreateWeight(IDictionary context, IndexSearcher searcher)
 	  {
 		long totalTermFreq = 0;
 		foreach (AtomicReaderContext readerContext in searcher.TopReaderContext.leaves())
@@ -95,7 +95,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
 			  this.ttf = ttf;
 		  }
 
-		  public override long longVal(int doc)
+		  public override long LongVal(int doc)
 		  {
 			return ttf;
 		  }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ba0f3c7d/src/Lucene.Net.Queries/Function/ValueSources/VectorValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/VectorValueSource.cs b/src/Lucene.Net.Queries/Function/ValueSources/VectorValueSource.cs
index 683e5df..e859263 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/VectorValueSource.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/VectorValueSource.cs
@@ -1,6 +1,8 @@
 ´╗┐using System.Collections;
 using System.Collections.Generic;
 using System.Text;
+using Lucene.Net.Index;
+using Lucene.Net.Search;
 using org.apache.lucene.queries.function;
 
 namespace Lucene.Net.Queries.Function.ValueSources
@@ -23,7 +25,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
 	 */
     /// <summary>
 	/// Converts individual ValueSource instances to leverage the FunctionValues *Val functions
that work with multiple values,
-	/// i.e. <seealso cref="org.apache.lucene.queries.function.FunctionValues#doubleVal(int,
double[])"/>
+	/// i.e. <seealso cref="FunctionValues#DoubleVal(int, double[])"/>
 	/// </summary>
 	//Not crazy about the name, but...
 	public class VectorValueSource : MultiValueSource
@@ -55,8 +57,8 @@ namespace Lucene.Net.Queries.Function.ValueSources
 	  }
 
 //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: @Override public org.apache.lucene.queries.function.FunctionValues getValues(java.util.Map
context, org.apache.lucene.index.AtomicReaderContext readerContext) throws java.io.IOException
-	  public override FunctionValues getValues(IDictionary context, AtomicReaderContext readerContext)
+//ORIGINAL LINE: @Override public org.apache.lucene.queries.function.FunctionValues GetValues(java.util.Map
context, org.apache.lucene.index.AtomicReaderContext readerContext) throws java.io.IOException
+	  public override FunctionValues GetValues(IDictionary context, AtomicReaderContext readerContext)
 	  {
 		int size = sources.Count;
 
@@ -64,11 +66,11 @@ namespace Lucene.Net.Queries.Function.ValueSources
 		if (size == 2)
 		{
 //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
-//ORIGINAL LINE: final org.apache.lucene.queries.function.FunctionValues x = sources.get(0).getValues(context,
readerContext);
-		  FunctionValues x = sources[0].getValues(context, readerContext);
+//ORIGINAL LINE: final org.apache.lucene.queries.function.FunctionValues x = sources.get(0).GetValues(context,
readerContext);
+		  FunctionValues x = sources[0].GetValues(context, readerContext);
 //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
-//ORIGINAL LINE: final org.apache.lucene.queries.function.FunctionValues y = sources.get(1).getValues(context,
readerContext);
-		  FunctionValues y = sources[1].getValues(context, readerContext);
+//ORIGINAL LINE: final org.apache.lucene.queries.function.FunctionValues y = sources.get(1).GetValues(context,
readerContext);
+		  FunctionValues y = sources[1].GetValues(context, readerContext);
 		  return new FunctionValuesAnonymousInnerClassHelper(this, x, y);
 		}
 
@@ -78,7 +80,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
 		FunctionValues[] valsArr = new FunctionValues[size];
 		for (int i = 0; i < size; i++)
 		{
-		  valsArr[i] = sources[i].getValues(context, readerContext);
+		  valsArr[i] = sources[i].GetValues(context, readerContext);
 		}
 
 		return new FunctionValuesAnonymousInnerClassHelper2(this, valsArr);
@@ -98,41 +100,41 @@ namespace Lucene.Net.Queries.Function.ValueSources
 			  this.y = y;
 		  }
 
-		  public override void byteVal(int doc, sbyte[] vals)
+		  public override void ByteVal(int doc, sbyte[] vals)
 		  {
-			vals[0] = x.byteVal(doc);
-			vals[1] = y.byteVal(doc);
+			vals[0] = x.ByteVal(doc);
+			vals[1] = y.ByteVal(doc);
 		  }
 
-		  public override void shortVal(int doc, short[] vals)
+		  public override void ShortVal(int doc, short[] vals)
 		  {
-			vals[0] = x.shortVal(doc);
-			vals[1] = y.shortVal(doc);
+			vals[0] = x.ShortVal(doc);
+			vals[1] = y.ShortVal(doc);
 		  }
-		  public override void intVal(int doc, int[] vals)
+		  public override void IntVal(int doc, int[] vals)
 		  {
-			vals[0] = x.intVal(doc);
-			vals[1] = y.intVal(doc);
+			vals[0] = x.IntVal(doc);
+			vals[1] = y.IntVal(doc);
 		  }
-		  public override void longVal(int doc, long[] vals)
+		  public override void LongVal(int doc, long[] vals)
 		  {
-			vals[0] = x.longVal(doc);
-			vals[1] = y.longVal(doc);
+			vals[0] = x.LongVal(doc);
+			vals[1] = y.LongVal(doc);
 		  }
-		  public override void floatVal(int doc, float[] vals)
+		  public override void FloatVal(int doc, float[] vals)
 		  {
-			vals[0] = x.floatVal(doc);
-			vals[1] = y.floatVal(doc);
+			vals[0] = x.FloatVal(doc);
+			vals[1] = y.FloatVal(doc);
 		  }
-		  public override void doubleVal(int doc, double[] vals)
+		  public override void DoubleVal(int doc, double[] vals)
 		  {
-			vals[0] = x.doubleVal(doc);
-			vals[1] = y.doubleVal(doc);
+			vals[0] = x.DoubleVal(doc);
+			vals[1] = y.DoubleVal(doc);
 		  }
-		  public override void strVal(int doc, string[] vals)
+		  public override void StrVal(int doc, string[] vals)
 		  {
-			vals[0] = x.strVal(doc);
-			vals[1] = y.strVal(doc);
+			vals[0] = x.StrVal(doc);
+			vals[1] = y.StrVal(doc);
 		  }
 		  public override string ToString(int doc)
 		  {
@@ -152,59 +154,59 @@ namespace Lucene.Net.Queries.Function.ValueSources
 			  this.valsArr = valsArr;
 		  }
 
-		  public override void byteVal(int doc, sbyte[] vals)
+		  public override void ByteVal(int doc, sbyte[] vals)
 		  {
 			for (int i = 0; i < valsArr.Length; i++)
 			{
-			  vals[i] = valsArr[i].byteVal(doc);
+			  vals[i] = valsArr[i].ByteVal(doc);
 			}
 		  }
 
-		  public override void shortVal(int doc, short[] vals)
+		  public override void ShortVal(int doc, short[] vals)
 		  {
 			for (int i = 0; i < valsArr.Length; i++)
 			{
-			  vals[i] = valsArr[i].shortVal(doc);
+			  vals[i] = valsArr[i].ShortVal(doc);
 			}
 		  }
 
-		  public override void floatVal(int doc, float[] vals)
+		  public override void FloatVal(int doc, float[] vals)
 		  {
 			for (int i = 0; i < valsArr.Length; i++)
 			{
-			  vals[i] = valsArr[i].floatVal(doc);
+			  vals[i] = valsArr[i].FloatVal(doc);
 			}
 		  }
 
-		  public override void intVal(int doc, int[] vals)
+		  public override void IntVal(int doc, int[] vals)
 		  {
 			for (int i = 0; i < valsArr.Length; i++)
 			{
-			  vals[i] = valsArr[i].intVal(doc);
+			  vals[i] = valsArr[i].IntVal(doc);
 			}
 		  }
 
-		  public override void longVal(int doc, long[] vals)
+		  public override void LongVal(int doc, long[] vals)
 		  {
 			for (int i = 0; i < valsArr.Length; i++)
 			{
-			  vals[i] = valsArr[i].longVal(doc);
+			  vals[i] = valsArr[i].LongVal(doc);
 			}
 		  }
 
-		  public override void doubleVal(int doc, double[] vals)
+		  public override void DoubleVal(int doc, double[] vals)
 		  {
 			for (int i = 0; i < valsArr.Length; i++)
 			{
-			  vals[i] = valsArr[i].doubleVal(doc);
+			  vals[i] = valsArr[i].DoubleVal(doc);
 			}
 		  }
 
-		  public override void strVal(int doc, string[] vals)
+		  public override void StrVal(int doc, string[] vals)
 		  {
 			for (int i = 0; i < valsArr.Length; i++)
 			{
-			  vals[i] = valsArr[i].strVal(doc);
+			  vals[i] = valsArr[i].StrVal(doc);
 			}
 		  }
 
@@ -230,18 +232,16 @@ namespace Lucene.Net.Queries.Function.ValueSources
 		  }
 	  }
 
-//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: @Override public void createWeight(java.util.Map context, org.apache.lucene.search.IndexSearcher
searcher) throws java.io.IOException
-	  public override void createWeight(IDictionary context, IndexSearcher searcher)
-	  {
-		foreach (ValueSource source in sources)
-		{
-		  source.createWeight(context, searcher);
-		}
-	  }
+        public override void CreateWeight(IDictionary context, IndexSearcher searcher)
+        {
+            foreach (ValueSource source in sources)
+            {
+                source.CreateWeight(context, searcher);
+            }
+        }
 
 
-	  public override string description()
+        public override string description()
 	  {
 		StringBuilder sb = new StringBuilder();
 		sb.Append(name()).Append('(');


Mime
View raw message