lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccurr...@apache.org
Subject svn commit: r1300340 [2/6] - in /incubator/lucene.net/trunk: branding/logo/ build/vs2010/test/ src/contrib/Analyzers/ src/contrib/Analyzers/Compound/ src/contrib/Analyzers/El/ src/contrib/Analyzers/Fa/ src/contrib/Analyzers/Miscellaneous/ src/contrib/A...
Date Tue, 13 Mar 2012 20:32:49 GMT
Modified: incubator/lucene.net/trunk/src/contrib/FastVectorHighlighter/FieldTermStack.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/FastVectorHighlighter/FieldTermStack.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/FastVectorHighlighter/FieldTermStack.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/FastVectorHighlighter/FieldTermStack.cs Tue Mar 13 20:32:43 2012
@@ -92,7 +92,7 @@ namespace Lucene.Net.Search.Vectorhighli
                 int[] poss = tfv.GetTermPositions(index);
                 if (poss == null) return; // just return to make null snippets
                 for (int i = 0; i < tvois.Length; i++)
-                    termList.AddLast(new TermInfo(term, tvois[i].GetStartOffset(), tvois[i].GetEndOffset(), poss[i]));
+                    termList.AddLast(new TermInfo(term, tvois[i].StartOffset, tvois[i].EndOffset, poss[i]));
             }
             // sort by position
             //Collections.sort(termList);

Modified: incubator/lucene.net/trunk/src/contrib/Highlighter/QueryTermExtractor.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/Highlighter/QueryTermExtractor.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/Highlighter/QueryTermExtractor.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/Highlighter/QueryTermExtractor.cs Tue Mar 13 20:32:43 2012
@@ -63,7 +63,7 @@ namespace Lucene.Net.Highlight
 		public static WeightedTerm[] GetIdfWeightedTerms(Query query, IndexReader reader, System.String fieldName)
 		{
 			WeightedTerm[] terms = GetTerms(query, false, fieldName);
-			int totalNumDocs = reader.NumDocs();
+			int totalNumDocs = reader.NumDocs;
 			for (int i = 0; i < terms.Length; i++)
 			{
 				try
@@ -140,9 +140,9 @@ namespace Lucene.Net.Highlight
 
                     foreach (var term in nonWeightedTerms)
                     {
-                        if ((fieldName == null) || (term.Field() == fieldName))
+                        if ((fieldName == null) || (term.Field == fieldName))
                         {
-                            var temp = new WeightedTerm(query.GetBoost(), term.Text());
+                            var temp = new WeightedTerm(query.Boost, term.Text);
                             terms.Add(temp, temp);
                         }
                     }
@@ -175,7 +175,7 @@ namespace Lucene.Net.Highlight
 		}
 		private static void  GetTermsFromFilteredQuery(FilteredQuery query, System.Collections.Hashtable terms, bool prohibited, System.String fieldName)
 		{
-			GetTerms(query.GetQuery(), terms, prohibited, fieldName);
+			GetTerms(query.Query, terms, prohibited, fieldName);
 		}
 	}
 }

Modified: incubator/lucene.net/trunk/src/contrib/Highlighter/TokenSources.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/Highlighter/TokenSources.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/Highlighter/TokenSources.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/Highlighter/TokenSources.cs Tue Mar 13 20:32:43 2012
@@ -182,7 +182,7 @@ namespace Lucene.Net.Highlight
 					}
 					for (int tp = 0; tp < offsets.Length; tp++)
 					{
-						unsortedTokens.Add(new Token(terms[t], offsets[tp].GetStartOffset(), offsets[tp].GetEndOffset()));
+						unsortedTokens.Add(new Token(terms[t], offsets[tp].StartOffset, offsets[tp].EndOffset));
 					}
 				}
 				else
@@ -195,7 +195,7 @@ namespace Lucene.Net.Highlight
 					//tokens stored with positions - can use this to index straight into sorted array
 					for (int tp = 0; tp < pos.Length; tp++)
 					{
-						tokensInOriginalOrder[pos[tp]] = new Token(terms[t], offsets[tp].GetStartOffset(), offsets[tp].GetEndOffset());
+						tokensInOriginalOrder[pos[tp]] = new Token(terms[t], offsets[tp].StartOffset, offsets[tp].EndOffset);
 					}
 				}
 			}

Modified: incubator/lucene.net/trunk/src/contrib/Queries/BooleanFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/Queries/BooleanFilter.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/Queries/BooleanFilter.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/Queries/BooleanFilter.cs Tue Mar 13 20:32:43 2012
@@ -70,7 +70,7 @@ namespace Lucene.Net.Search
                 {
                     if (res == null)
                     {
-                        res = new OpenBitSetDISI(GetDISI(shouldFilters, i, reader), reader.MaxDoc());
+                        res = new OpenBitSetDISI(GetDISI(shouldFilters, i, reader), reader.MaxDoc);
                     }
                     else
                     {
@@ -94,8 +94,8 @@ namespace Lucene.Net.Search
                 {
                     if (res == null)
                     {
-                        res = new OpenBitSetDISI(GetDISI(notFilters, i, reader), reader.MaxDoc());
-                        res.Flip(0, reader.MaxDoc()); // NOTE: may set bits on deleted docs
+                        res = new OpenBitSetDISI(GetDISI(notFilters, i, reader), reader.MaxDoc);
+                        res.Flip(0, reader.MaxDoc); // NOTE: may set bits on deleted docs
                     }
                     else
                     {
@@ -119,7 +119,7 @@ namespace Lucene.Net.Search
                 {
                     if (res == null)
                     {
-                        res = new OpenBitSetDISI(GetDISI(mustFilters, i, reader), reader.MaxDoc());
+                        res = new OpenBitSetDISI(GetDISI(mustFilters, i, reader), reader.MaxDoc);
                     }
                     else
                     {
@@ -138,7 +138,7 @@ namespace Lucene.Net.Search
             }
 
             if (res != null)
-                return FinalResult(res, reader.MaxDoc());
+                return FinalResult(res, reader.MaxDoc);
 
             return DocIdSet.EMPTY_DOCIDSET;
         }

Modified: incubator/lucene.net/trunk/src/contrib/Queries/BoostingQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/Queries/BoostingQuery.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/Queries/BoostingQuery.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/Queries/BoostingQuery.cs Tue Mar 13 20:32:43 2012
@@ -54,7 +54,7 @@ namespace Lucene.Net.Search
             this.context = (Query)context.Clone();        // clone before boost
             this.boost = boost;
 
-            this.context.SetBoost(0.0f);                      // ignore context-only matches
+            this.context.Boost = 0.0f;                      // ignore context-only matches
         }
 
         public override Query Rewrite(IndexReader reader)

Modified: incubator/lucene.net/trunk/src/contrib/Queries/DuplicateFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/Queries/DuplicateFilter.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/Queries/DuplicateFilter.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/Queries/DuplicateFilter.cs Tue Mar 13 20:32:43 2012
@@ -81,13 +81,13 @@ namespace Lucene.Net.Search
 
         private OpenBitSet CorrectBits(IndexReader reader)
         {
-            OpenBitSet bits = new OpenBitSet(reader.MaxDoc()); //assume all are INvalid
+            OpenBitSet bits = new OpenBitSet(reader.MaxDoc); //assume all are INvalid
             Term startTerm = new Term(fieldName);
             TermEnum te = reader.Terms(startTerm);
             if (te != null)
             {
                 Term currTerm = te.Term();
-                while ((currTerm != null) && (currTerm.Field() == startTerm.Field())) //term fieldnames are interned
+                while ((currTerm != null) && (currTerm.Field == startTerm.Field)) //term fieldnames are interned
                 {
                     int lastDoc = -1;
                     //set non duplicates
@@ -119,15 +119,15 @@ namespace Lucene.Net.Search
 
         private OpenBitSet FastBits(IndexReader reader)
         {
-            OpenBitSet bits = new OpenBitSet(reader.MaxDoc());
-            bits.Set(0, reader.MaxDoc()); //assume all are valid
+            OpenBitSet bits = new OpenBitSet(reader.MaxDoc);
+            bits.Set(0, reader.MaxDoc); //assume all are valid
             Term startTerm = new Term(fieldName);
             TermEnum te = reader.Terms(startTerm);
             if (te != null)
             {
                 Term currTerm = te.Term();
 
-                while ((currTerm != null) && (currTerm.Field() == startTerm.Field())) //term fieldnames are interned
+                while ((currTerm != null) && (currTerm.Field == startTerm.Field)) //term fieldnames are interned
                 {
                     if (te.DocFreq() > 1)
                     {

Modified: incubator/lucene.net/trunk/src/contrib/Queries/FuzzyLikeThisQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/Queries/FuzzyLikeThisQuery.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/Queries/FuzzyLikeThisQuery.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/Queries/FuzzyLikeThisQuery.cs Tue Mar 13 20:32:43 2012
@@ -193,7 +193,7 @@ namespace Lucene.Net.Search
             TokenStream ts = analyzer.TokenStream(f.fieldName, new System.IO.StringReader(f.queryString));
             TermAttribute termAtt = ts.AddAttribute<TermAttribute>();
 
-            int corpusNumDocs = reader.NumDocs();
+            int corpusNumDocs = reader.NumDocs;
             Term internSavingTemplateTerm = new Term(f.fieldName); //optimization to avoid constructing new Term() objects
             HashSet<string> processedTerms = new HashSet<string>();
             while (ts.IncrementToken())
@@ -226,7 +226,7 @@ namespace Lucene.Net.Search
                             {
                                 ScoreTerm st = new ScoreTerm(possibleMatch, score, startTerm);
                                 variantsQ.InsertWithOverflow(st);
-                                minScore = variantsQ.Top().score; // maintain minScore
+                                minScore = variantsQ.Top().Score; // maintain minScore
                             }
                         }
                     }
@@ -246,7 +246,7 @@ namespace Lucene.Net.Search
                         for (int i = 0; i < size; i++)
                         {
                             ScoreTerm st = variantsQ.Pop();
-                            st.score = (st.score * st.score) * sim.Idf(df, corpusNumDocs);
+                            st.Score = (st.Score * st.Score) * sim.Idf(df, corpusNumDocs);
                             q.InsertWithOverflow(st);
                         }
                     }
@@ -294,8 +294,8 @@ namespace Lucene.Net.Search
                 {
                     //optimize where only one selected variant
                     ScoreTerm st = variants[0];
-                    TermQuery tq = new FuzzyTermQuery(st.term, ignoreTF);
-                    tq.SetBoost(st.score); // set the boost to a mix of IDF and score
+                    TermQuery tq = new FuzzyTermQuery(st.Term, ignoreTF);
+                    tq.Boost = st.Score; // set the boost to a mix of IDF and score
                     bq.Add(tq, BooleanClause.Occur.SHOULD);
                 }
                 else
@@ -303,8 +303,8 @@ namespace Lucene.Net.Search
                     BooleanQuery termVariants = new BooleanQuery(true); //disable coord and IDF for these term variants
                     foreach(ScoreTerm st in variants)
                     {
-                        TermQuery tq = new FuzzyTermQuery(st.term, ignoreTF);      // found a match
-                        tq.SetBoost(st.score); // set the boost using the ScoreTerm's score
+                        TermQuery tq = new FuzzyTermQuery(st.Term, ignoreTF);      // found a match
+                        tq.Boost = st.Score; // set the boost using the ScoreTerm's score
                         termVariants.Add(tq, BooleanClause.Occur.SHOULD);          // add to query                    
                     }
                     bq.Add(termVariants, BooleanClause.Occur.SHOULD);          // add to query
@@ -312,7 +312,7 @@ namespace Lucene.Net.Search
             }
             //TODO possible alternative step 3 - organize above booleans into a new layer of field-based
             // booleans with a minimum-should-match of NumFields-1?
-            bq.SetBoost(GetBoost());
+            bq.Boost = Boost;
             this.rewrittenQuery = bq;
             return bq;
         }
@@ -322,14 +322,15 @@ namespace Lucene.Net.Search
         // terms/fields
         private class ScoreTerm
         {
-            public Term term;
-            public float score;
+            public Term Term { get; set; }
+            public float Score { get; set; }
+
             internal Term fuzziedSourceTerm;
 
             public ScoreTerm(Term term, float score, Term fuzziedSourceTerm)
             {
-                this.term = term;
-                this.score = score;
+                this.Term = term;
+                this.Score = score;
                 this.fuzziedSourceTerm = fuzziedSourceTerm;
             }
         }
@@ -346,10 +347,10 @@ namespace Lucene.Net.Search
              */
             public override bool LessThan(ScoreTerm termA, ScoreTerm termB)
             {
-                if (termA.score == termB.score)
-                    return termA.term.CompareTo(termB.term) > 0;
+                if (termA.Score == termB.Score)
+                    return termA.Term.CompareTo(termB.Term) > 0;
                 else
-                    return termA.score < termB.score;
+                    return termA.Score < termB.Score;
             }
 
         }

Modified: incubator/lucene.net/trunk/src/contrib/Queries/Similar/MoreLikeThis.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/Queries/Similar/MoreLikeThis.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/Queries/Similar/MoreLikeThis.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/Queries/Similar/MoreLikeThis.cs Tue Mar 13 20:32:43 2012
@@ -403,7 +403,7 @@ namespace Lucene.Net.Search.Similar
         /// </param>
         public void SetMaxDocFreqPct(int maxPercentage)
         {
-            this.maxDocfreq = maxPercentage * ir.NumDocs() / 100;
+            this.maxDocfreq = maxPercentage * ir.NumDocs / 100;
         }
 
         /// <summary> Returns whether to boost terms in query based on "score" or not. The default is
@@ -645,7 +645,7 @@ namespace Lucene.Net.Search.Similar
                     }
                     float myScore = (float)ar[2];
 
-                    tq.SetBoost(boostFactor * myScore / bestScore);
+                    tq.Boost = boostFactor * myScore / bestScore;
                 }
 
                 try
@@ -675,7 +675,7 @@ namespace Lucene.Net.Search.Similar
         private PriorityQueue<object[]> CreateQueue(IDictionary<string,Int> words)
         {
             // have collected all words in doc and their freqs
-            int numDocs = ir.NumDocs();
+            int numDocs = ir.NumDocs;
             FreqQ res = new FreqQ(words.Count); // will order words by score
 
             var it = words.Keys.GetEnumerator();
@@ -777,7 +777,7 @@ namespace Lucene.Net.Search.Similar
             System.IO.StreamWriter o = temp_writer;
             FSDirectory dir = FSDirectory.Open(new DirectoryInfo(indexName));
             IndexReader r = IndexReader.Open(dir, true);
-            o.WriteLine("Open index " + indexName + " which has " + r.NumDocs() + " docs");
+            o.WriteLine("Open index " + indexName + " which has " + r.NumDocs + " docs");
 
             MoreLikeThis mlt = new MoreLikeThis(r);
 
@@ -808,9 +808,9 @@ namespace Lucene.Net.Search.Similar
             ScoreDoc[] scoreDocs = hits.ScoreDocs;
             for (int i = 0; i < System.Math.Min(25, len); i++)
             {
-                Document d = searcher.Doc(scoreDocs[i].doc);
+                Document d = searcher.Doc(scoreDocs[i].Doc);
                 System.String summary = d.Get("summary");
-                o.WriteLine("score  : " + scoreDocs[i].score);
+                o.WriteLine("score  : " + scoreDocs[i].Score);
                 o.WriteLine("url    : " + d.Get("url"));
                 o.WriteLine("\ttitle  : " + d.Get("title"));
                 if (summary != null)

Modified: incubator/lucene.net/trunk/src/contrib/Queries/TermsFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/Queries/TermsFilter.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/Queries/TermsFilter.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/Queries/TermsFilter.cs Tue Mar 13 20:32:43 2012
@@ -51,7 +51,7 @@ namespace Lucene.Net.Search
         /// <returns>The set.</returns>
         public override DocIdSet GetDocIdSet(IndexReader reader)
         {
-            OpenBitSet result = new OpenBitSet(reader.MaxDoc());
+            OpenBitSet result = new OpenBitSet(reader.MaxDoc);
             TermDocs td = reader.TermDocs();
             try
             {
@@ -103,7 +103,7 @@ namespace Lucene.Net.Search
             sb.Append("(");
             foreach (Term t in this.terms)
             {
-                sb.AppendFormat(" {0}:{1}", t.Field(), t.Text());
+                sb.AppendFormat(" {0}:{1}", t.Field, t.Text);
             }
             sb.Append(" )");
             return sb.ToString();

Modified: incubator/lucene.net/trunk/src/contrib/Regex/RegexQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/Regex/RegexQuery.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/Regex/RegexQuery.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/Regex/RegexQuery.cs Tue Mar 13 20:32:43 2012
@@ -37,7 +37,7 @@ namespace Lucene.Net.Search.Regex
 		}
 
 		/// <summary>Construct the enumeration to be used, expanding the pattern term. </summary>
-		public override FilteredTermEnum GetEnum(IndexReader reader)
+		protected override FilteredTermEnum GetEnum(IndexReader reader)
 		{
 			return new RegexTermEnum(reader, Term, _regexImpl);
 		}
@@ -56,13 +56,13 @@ namespace Lucene.Net.Search.Regex
         public override String ToString(String field)
         {
             StringBuilder buffer = new StringBuilder();
-            if (!Term.Field().Equals(field))
+            if (!Term.Field.Equals(field))
             {
-                buffer.Append(Term.Field());
+                buffer.Append(Term.Field);
                 buffer.Append(":");
             }
-            buffer.Append(Term.Text());
-            buffer.Append(ToStringUtils.Boost(GetBoost()));
+            buffer.Append(Term.Text);
+            buffer.Append(ToStringUtils.Boost(Boost));
             return buffer.ToString();
         }
 

Modified: incubator/lucene.net/trunk/src/contrib/Regex/RegexTermEnum.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/Regex/RegexTermEnum.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/Regex/RegexTermEnum.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/Regex/RegexTermEnum.cs Tue Mar 13 20:32:43 2012
@@ -36,8 +36,8 @@ namespace Lucene.Net.Search.Regex
 
 		public RegexTermEnum(IndexReader reader, Term term, IRegexCapabilities regexImpl)
 		{
-			_sField = term.Field();
-			string sText = term.Text();
+			_sField = term.Field;
+			string sText = term.Text;
 			
 			_regexImpl = regexImpl;
 
@@ -45,15 +45,15 @@ namespace Lucene.Net.Search.Regex
 
 			_sPre = _regexImpl.Prefix() ?? "";
 
-			SetEnum(reader.Terms(new Term(term.Field(), _sPre)));
+			SetEnum(reader.Terms(new Term(term.Field, _sPre)));
 		}
 
 		/// <summary>Equality compare on the term </summary>
-		public override bool TermCompare(Term term)
+		protected override bool TermCompare(Term term)
 		{
-			if (_sField == term.Field())
+			if (_sField == term.Field)
 			{
-				string sSearchText = term.Text();
+				string sSearchText = term.Text;
 				if (sSearchText.StartsWith(_sPre)) return _regexImpl.Match(sSearchText);
 			} //eif
 

Modified: incubator/lucene.net/trunk/src/contrib/Regex/SpanRegexQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/Regex/SpanRegexQuery.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/Regex/SpanRegexQuery.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/Regex/SpanRegexQuery.cs Tue Mar 13 20:32:43 2012
@@ -51,7 +51,7 @@ namespace Lucene.Net.Search.Regex
 			sb.Append("SpanRegexQuery(");
 			sb.Append(_term);
 			sb.Append(')');
-			sb.Append(ToStringUtils.Boost(GetBoost()));
+			sb.Append(ToStringUtils.Boost(Boost));
 			return sb.ToString();
 		}
 
@@ -61,7 +61,7 @@ namespace Lucene.Net.Search.Regex
 			orig.SetRegexImplementation(_regexImpl);
 
 			// RegexQuery (via MultiTermQuery).Rewrite always returns a BooleanQuery
-			orig.SetRewriteMethod(MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE);	//@@
+			orig.QueryRewriteMethod = MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE;	//@@
 			BooleanQuery bq = (BooleanQuery) orig.Rewrite(reader);
 
 			BooleanClause[] clauses = bq.GetClauses();
@@ -73,12 +73,12 @@ namespace Lucene.Net.Search.Regex
 				// Clauses from RegexQuery.Rewrite are always TermQuery's
 				TermQuery tq = (TermQuery) clause.GetQuery();
 
-				sqs[i] = new SpanTermQuery(tq.GetTerm());
-				sqs[i].SetBoost(tq.GetBoost());
+				sqs[i] = new SpanTermQuery(tq.Term);
+				sqs[i].Boost = tq.Boost;
 			} //efor
 
 			SpanOrQuery query = new SpanOrQuery(sqs);
-			query.SetBoost(orig.GetBoost());
+			query.Boost = orig.Boost;
 
 			return query;
 		}
@@ -92,9 +92,12 @@ namespace Lucene.Net.Search.Regex
 		}
 
 		/// <summary>Returns the name of the field matched by this query.</summary>
-		public override string GetField()
+		public override string Field
 		{
-			return _term.Field();
+            get
+            {
+                return _term.Field;
+            }
 		}
 
         public ICollection<Term> GetTerms()

Modified: incubator/lucene.net/trunk/src/contrib/Similarity/Similar/MoreLikeThis.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/Similarity/Similar/MoreLikeThis.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/Similarity/Similar/MoreLikeThis.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/Similarity/Similar/MoreLikeThis.cs Tue Mar 13 20:32:43 2012
@@ -581,7 +581,7 @@ namespace Similarity.Net
                     }
                     float myScore = (float) ((System.Single) ar[2]);
 					
-                    tq.SetBoost(myScore / bestScore);
+                    tq.Boost = myScore / bestScore;
                 }
 				
                 try
@@ -611,7 +611,7 @@ namespace Similarity.Net
         private PriorityQueue<object[]> CreateQueue(System.Collections.IDictionary words)
         {
             // have collected all words in doc and their freqs
-            int numDocs = ir.NumDocs();
+            int numDocs = ir.NumDocs;
             FreqQ res = new FreqQ(words.Count); // will order words by score
 			
             System.Collections.IEnumerator it = words.Keys.GetEnumerator();
@@ -706,7 +706,7 @@ namespace Similarity.Net
                               {AutoFlush = true};
             var dir = FSDirectory.Open(new DirectoryInfo(indexName));
             IndexReader r = IndexReader.Open(dir, true);
-            o.WriteLine("Open index " + indexName + " which has " + r.NumDocs() + " docs");
+            o.WriteLine("Open index " + indexName + " which has " + r.NumDocs + " docs");
 			
             MoreLikeThis mlt = new MoreLikeThis(r);
 			
@@ -738,9 +738,9 @@ namespace Similarity.Net
             ScoreDoc[] scoreDocs = hits.ScoreDocs;
             for (int i = 0; i < System.Math.Min(25, len); i++)
             {
-                Document d = searcher.Doc(scoreDocs[i].doc);
+                Document d = searcher.Doc(scoreDocs[i].Doc);
                 System.String summary = d.Get("summary");
-                o.WriteLine("score  : " + scoreDocs[i].score);
+                o.WriteLine("score  : " + scoreDocs[i].Score);
                 o.WriteLine("url    : " + d.Get("url"));
                 o.WriteLine("\ttitle  : " + d.Get("title"));
                 if (summary != null)

Modified: incubator/lucene.net/trunk/src/contrib/SimpleFacetedSearch/FieldValuesBitSets.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/SimpleFacetedSearch/FieldValuesBitSets.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/SimpleFacetedSearch/FieldValuesBitSets.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/SimpleFacetedSearch/FieldValuesBitSets.cs Tue Mar 13 20:32:43 2012
@@ -54,13 +54,13 @@ namespace Lucene.Net.Search
         {
             List<string> list = new List<string>();
             TermEnum te = _Reader.Terms(new Term(groupByField, ""));
-            if (te.Term().Field() != groupByField) return list;
-            list.Add(te.Term().Text());
+            if (te.Term().Field != groupByField) return list;
+            list.Add(te.Term().Text);
 
             while (te.Next())
             {
-                if (te.Term().Field() != groupByField) break;
-                list.Add(te.Term().Text());
+                if (te.Term().Field != groupByField) break;
+                list.Add(te.Term().Text);
             }
             return list;
         }
@@ -69,7 +69,7 @@ namespace Lucene.Net.Search
         {
             TermQuery query = new TermQuery(new Term(groupByField, group));
             Filter filter = new CachingWrapperFilter(new QueryWrapperFilter(query));
-            return new OpenBitSetDISI(filter.GetDocIdSet(_Reader).Iterator(), _Reader.MaxDoc());
+            return new OpenBitSetDISI(filter.GetDocIdSet(_Reader).Iterator(), _Reader.MaxDoc);
         }
     }
 }

Modified: incubator/lucene.net/trunk/src/contrib/SimpleFacetedSearch/SimpleFacetedSearch.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/SimpleFacetedSearch/SimpleFacetedSearch.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/SimpleFacetedSearch/SimpleFacetedSearch.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/SimpleFacetedSearch/SimpleFacetedSearch.cs Tue Mar 13 20:32:43 2012
@@ -102,7 +102,7 @@ namespace Lucene.Net.Search
             //and remove impossible comb's (for ex, B J 3) from list.
             Parallel.ForEach(cp, combinations =>
             {
-                OpenBitSetDISI bitSet = new OpenBitSetDISI(_Reader.MaxDoc());
+                OpenBitSetDISI bitSet = new OpenBitSetDISI(_Reader.MaxDoc);
                 bitSet.Set(0, bitSet.Size());
 
                 List<string> comb = combinations.ToList();

Modified: incubator/lucene.net/trunk/src/contrib/Spatial/GeoHash/GeoHashDistanceFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/Spatial/GeoHash/GeoHashDistanceFilter.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/Spatial/GeoHash/GeoHashDistanceFilter.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/Spatial/GeoHash/GeoHashDistanceFilter.cs Tue Mar 13 20:32:43 2012
@@ -49,7 +49,7 @@ namespace Lucene.Net.Spatial.GeoHash
 			var geoHashValues = FieldCache_Fields.DEFAULT.GetStrings(reader, _geoHashField);
 			
 			int docBase = NextDocBase;
-			NextDocBase += reader.MaxDoc();
+			NextDocBase += reader.MaxDoc;
 
 			return new GeoHashFilteredDocIdSet(StartingFilter.GetDocIdSet(reader), geoHashValues, DistanceLookupCache, _lat, _lng, docBase, Distance, Distances);
 		}

Modified: incubator/lucene.net/trunk/src/contrib/Spatial/Tier/CartesianShapeFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/Spatial/Tier/CartesianShapeFilter.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/Spatial/Tier/CartesianShapeFilter.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/Spatial/Tier/CartesianShapeFilter.cs Tue Mar 13 20:32:43 2012
@@ -35,7 +35,7 @@ namespace Lucene.Net.Spatial.Tier
 
 		public override DocIdSet GetDocIdSet(IndexReader reader)
 		{
-			var bits = new OpenBitSet(reader.MaxDoc());
+			var bits = new OpenBitSet(reader.MaxDoc);
 
 			TermDocs termDocs = reader.TermDocs();
 			List<double> area = _shape.Area;

Modified: incubator/lucene.net/trunk/src/contrib/Spatial/Tier/DistanceFieldComparatorSource.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/Spatial/Tier/DistanceFieldComparatorSource.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/Spatial/Tier/DistanceFieldComparatorSource.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/Spatial/Tier/DistanceFieldComparatorSource.cs Tue Mar 13 20:32:43 2012
@@ -96,12 +96,12 @@ namespace Lucene.Net.Spatial.Tier
 				_offset = docBase;
 			}
 
-			public override IComparable Value(int slot)
-			{
-				return _values[slot];
-			}
+		    public override IComparable this[int slot]
+		    {
+		        get { return _values[slot]; }
+		    }
 
-			public void CleanUp()
+		    public void CleanUp()
 			{
 				_distanceFilter = null;
 			}

Modified: incubator/lucene.net/trunk/src/contrib/Spatial/Tier/DistanceFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/Spatial/Tier/DistanceFilter.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/Spatial/Tier/DistanceFilter.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/Spatial/Tier/DistanceFilter.cs Tue Mar 13 20:32:43 2012
@@ -43,7 +43,7 @@ namespace Lucene.Net.Spatial.Tier
 			// NOTE: neither of the distance filters use precision
 			// now - if we turn that on, we'll need to pass top
 			// reader into here
-			// setPrecision(reader.maxDoc());
+			// setPrecision(reader.MaxDoc);
 
 			/* store calculated distances for reuse by other components */
 			Distances = new Dictionary<int, Double>();

Modified: incubator/lucene.net/trunk/src/contrib/Spatial/Tier/LatLongDistanceFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/Spatial/Tier/LatLongDistanceFilter.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/Spatial/Tier/LatLongDistanceFilter.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/Spatial/Tier/LatLongDistanceFilter.cs Tue Mar 13 20:32:43 2012
@@ -42,7 +42,7 @@ namespace Lucene.Net.Spatial.Tier
 			double[] lngIndex = FieldCache_Fields.DEFAULT.GetDoubles(reader, _lngField);
 
 			int docBase = NextDocBase;
-			NextDocBase += reader.MaxDoc();
+			NextDocBase += reader.MaxDoc;
 
 			return new LatLongFilteredDocIdSet(StartingFilter.GetDocIdSet(reader), latIndex, lngIndex, DistanceLookupCache, _lat, _lng, Distance, docBase, Distances);
 		}

Modified: incubator/lucene.net/trunk/src/contrib/SpellChecker/Spell/LuceneDictionary.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/SpellChecker/Spell/LuceneDictionary.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/SpellChecker/Spell/LuceneDictionary.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/SpellChecker/Spell/LuceneDictionary.cs Tue Mar 13 20:32:43 2012
@@ -78,7 +78,7 @@ namespace SpellChecker.Net.Search.Spell
                         MoveNext();
                     }
                     hasNextCalled = false;
-                    return (actualTerm != null) ? actualTerm.Text() : null;
+                    return (actualTerm != null) ? actualTerm.Text : null;
                 }
 
             }
@@ -93,7 +93,7 @@ namespace SpellChecker.Net.Search.Spell
                 // if there are no words return false
                 if (actualTerm == null) return false;
 
-                System.String fieldt = actualTerm.Field();
+                System.String fieldt = actualTerm.Field;
                 termEnum.Next();
 
                 // if the next word doesn't have the same field return false

Modified: incubator/lucene.net/trunk/src/contrib/SpellChecker/Spell/SpellChecker.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/SpellChecker/Spell/SpellChecker.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/SpellChecker/Spell/SpellChecker.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/SpellChecker/Spell/SpellChecker.cs Tue Mar 13 20:32:43 2012
@@ -262,7 +262,7 @@ namespace SpellChecker.Net.Search.Spell
                 for (int i = 0; i < stop; i++)
                 {
 
-                    sugWord.string_Renamed = indexSearcher.Doc(hits[i].doc).Get(F_WORD); // get orig word
+                    sugWord.string_Renamed = indexSearcher.Doc(hits[i].Doc).Get(F_WORD); // get orig word
 
                     // don't suggest a word for itself, that would be silly
                     if (sugWord.string_Renamed.Equals(word))
@@ -316,7 +316,7 @@ namespace SpellChecker.Net.Search.Spell
         private static void Add(BooleanQuery q, System.String k, System.String v, float boost)
         {
             Query tq = new TermQuery(new Term(k, v));
-            tq.SetBoost(boost);
+            tq.Boost = boost;
             q.Add(new BooleanClause(tq, BooleanClause.Occur.SHOULD));
         }
 
@@ -505,7 +505,7 @@ namespace SpellChecker.Net.Search.Spell
             lock (searcherLock)
             {
                 EnsureOpen();
-                searcher.GetIndexReader().IncRef();
+                searcher.IndexReader.IncRef();
                 return searcher;
             }
         }
@@ -514,7 +514,7 @@ namespace SpellChecker.Net.Search.Spell
         {
             // don't check if open - always decRef 
             // don't decrement the private searcher - could have been swapped
-            aSearcher.GetIndexReader().DecRef();
+            aSearcher.IndexReader.DecRef();
         }
 
         private void EnsureOpen()

Modified: incubator/lucene.net/trunk/src/core/Index/CheckIndex.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Index/CheckIndex.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Index/CheckIndex.cs (original)
+++ incubator/lucene.net/trunk/src/core/Index/CheckIndex.cs Tue Mar 13 20:32:43 2012
@@ -520,7 +520,7 @@ namespace Lucene.Net.Index
 						}
 						if (reader.deletedDocs.Count() > reader.MaxDoc)
 						{
-							throw new System.SystemException("too many deleted docs: maxDoc()=" + reader.MaxDoc + " vs deletedDocs.count()=" + reader.deletedDocs.Count());
+							throw new System.SystemException("too many deleted docs: MaxDoc=" + reader.MaxDoc + " vs deletedDocs.count()=" + reader.deletedDocs.Count());
 						}
 						if (info.docCount - numDocs != info.GetDelCount())
 						{
@@ -538,7 +538,7 @@ namespace Lucene.Net.Index
 						Msg("OK");
 					}
 					if (reader.MaxDoc != info.docCount)
-						throw new System.SystemException("SegmentReader.maxDoc() " + reader.MaxDoc + " != SegmentInfos.docCount " + info.docCount);
+						throw new System.SystemException("SegmentReader.MaxDoc " + reader.MaxDoc + " != SegmentInfos.docCount " + info.docCount);
 					
 					// Test getFieldNames()
 					if (infoStream != null)

Modified: incubator/lucene.net/trunk/src/core/Index/DirectoryReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Index/DirectoryReader.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Index/DirectoryReader.cs (original)
+++ incubator/lucene.net/trunk/src/core/Index/DirectoryReader.cs Tue Mar 13 20:32:43 2012
@@ -1185,9 +1185,9 @@ namespace Lucene.Net.Index
                 return "DirectoryReader.ReaderCommit(" + segmentsFileName + ")";
             }
 
-            public override bool IsOptimized()
+            public override bool IsOptimized
             {
-                return isOptimized;
+                get { return isOptimized; }
             }
 
             public override string SegmentsFileName

Modified: incubator/lucene.net/trunk/src/core/Index/DocumentsWriter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Index/DocumentsWriter.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Index/DocumentsWriter.cs (original)
+++ incubator/lucene.net/trunk/src/core/Index/DocumentsWriter.cs Tue Mar 13 20:32:43 2012
@@ -348,7 +348,7 @@ namespace Lucene.Net.Index
 			this.directory = directory;
 			this.writer = writer;
 			this.similarity = writer.Similarity;
-			flushedDocCount = writer.MaxDoc();
+			flushedDocCount = writer.MaxDoc;
 			
 			consumer = indexingChain.GetChain(this);
 			if (consumer is DocFieldProcessor)

Modified: incubator/lucene.net/trunk/src/core/Index/IndexCommit.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Index/IndexCommit.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Index/IndexCommit.cs (original)
+++ incubator/lucene.net/trunk/src/core/Index/IndexCommit.cs Tue Mar 13 20:32:43 2012
@@ -70,9 +70,9 @@ namespace Lucene.Net.Index
 	    public abstract bool IsDeleted { get; }
 
 	    /// <summary> Returns true if this commit is an optimized index.</summary>
-        public abstract bool IsOptimized();
+	    public abstract bool IsOptimized { get; }
 
-        /// <summary> Two IndexCommits are equal if both their Directory and versions are equal.</summary>
+	    /// <summary> Two IndexCommits are equal if both their Directory and versions are equal.</summary>
 		public  override bool Equals(System.Object other)
 		{
 			if (other is IndexCommit)

Modified: incubator/lucene.net/trunk/src/core/Index/IndexFileDeleter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Index/IndexFileDeleter.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Index/IndexFileDeleter.cs (original)
+++ incubator/lucene.net/trunk/src/core/Index/IndexFileDeleter.cs Tue Mar 13 20:32:43 2012
@@ -736,10 +736,10 @@ namespace Lucene.Net.Index
                 return "IndexFileDeleter.CommitPoint(" + segmentsFileName + ")";
             }
 
-			public override bool IsOptimized()
-			{
-				return isOptimized;
-			}
+		    public override bool IsOptimized
+		    {
+		        get { return isOptimized; }
+		    }
 
 		    public override string SegmentsFileName
 		    {

Modified: incubator/lucene.net/trunk/src/core/Index/IndexWriter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Index/IndexWriter.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Index/IndexWriter.cs (original)
+++ incubator/lucene.net/trunk/src/core/Index/IndexWriter.cs Tue Mar 13 20:32:43 2012
@@ -2199,20 +2199,23 @@ namespace Lucene.Net.Index
 		/// </summary>
 		/// <seealso cref="NumDocs">
 		/// </seealso>
-		public virtual int MaxDoc()
+		public virtual int MaxDoc
 		{
-			lock (this)
-			{
-				int count;
-				if (docWriter != null)
-					count = docWriter.NumDocsInRAM;
-				else
-					count = 0;
-				
-				for (int i = 0; i < segmentInfos.Count; i++)
-					count += segmentInfos.Info(i).docCount;
-				return count;
-			}
+            get
+            {
+                lock (this)
+                {
+                    int count;
+                    if (docWriter != null)
+                        count = docWriter.NumDocsInRAM;
+                    else
+                        count = 0;
+
+                    for (int i = 0; i < segmentInfos.Count; i++)
+                        count += segmentInfos.Info(i).docCount;
+                    return count;
+                }
+            }
 		}
 		
 		/// <summary>Returns total number of docs in this index, including

Modified: incubator/lucene.net/trunk/src/core/Index/ParallelReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Index/ParallelReader.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Index/ParallelReader.cs (original)
+++ incubator/lucene.net/trunk/src/core/Index/ParallelReader.cs Tue Mar 13 20:32:43 2012
@@ -88,7 +88,7 @@ namespace Lucene.Net.Index
 		/// <summary>     of documents
 		/// </summary>
 		/// <throws>  IllegalArgumentException if not all indexes have the same value </throws>
-		/// <summary>     of <see cref="IndexReader.MaxDoc()" />
+		/// <summary>     of <see cref="IndexReader.MaxDoc" />
 		/// </summary>
 		/// <throws>  IOException if there is a low-level IO error </throws>
 		public virtual void  Add(IndexReader reader, bool ignoreStoredFields)
@@ -433,7 +433,7 @@ namespace Lucene.Net.Index
 		public override int DocFreq(Term term)
 		{
 			EnsureOpen();
-			IndexReader reader = fieldToReader[term.Field()];
+			IndexReader reader = fieldToReader[term.Field];
 			return reader == null?0:reader.DocFreq(term);
 		}
 		
@@ -589,7 +589,7 @@ namespace Lucene.Net.Index
 			public ParallelTermEnum(ParallelReader enclosingInstance, Term term)
 			{
 				InitBlock(enclosingInstance);
-				field = term.Field();
+				field = term.Field;
 				IndexReader reader = Enclosing_Instance.fieldToReader[field];
 				if (reader != null)
 					termEnum = reader.Terms(term);
@@ -601,7 +601,7 @@ namespace Lucene.Net.Index
 					return false;
 				
 				// another term in this field?
-				if (termEnum.Next() && (System.Object) termEnum.Term().Field() == (System.Object) field)
+				if (termEnum.Next() && (System.Object) termEnum.Term().Field == (System.Object) field)
 					return true; // yes, keep going
 				
 				termEnum.Close(); // close old termEnum
@@ -624,7 +624,7 @@ namespace Lucene.Net.Index
 					field = fieldIterator.Current;
 					termEnum = Enclosing_Instance.fieldToReader[field].Terms(new Term(field));
 					Term term = termEnum.Term();
-					if (term != null && (System.Object) term.Field() == (System.Object) field)
+					if (term != null && (System.Object) term.Field == (System.Object) field)
 						return true;
 					else
 						termEnum.Close();
@@ -709,7 +709,7 @@ namespace Lucene.Net.Index
 			
 			public virtual void  Seek(Term term)
 			{
-				IndexReader reader = Enclosing_Instance.fieldToReader[term.Field()];
+				IndexReader reader = Enclosing_Instance.fieldToReader[term.Field];
 				termDocs = reader != null?reader.TermDocs(term):null;
 			}
 			
@@ -795,7 +795,7 @@ namespace Lucene.Net.Index
 			
 			public override void  Seek(Term term)
 			{
-				IndexReader reader = Enclosing_Instance.fieldToReader[term.Field()];
+				IndexReader reader = Enclosing_Instance.fieldToReader[term.Field];
 				termDocs = reader != null?reader.TermPositions(term):null;
 			}
 			

Modified: incubator/lucene.net/trunk/src/core/Index/Payload.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Index/Payload.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Index/Payload.cs (original)
+++ incubator/lucene.net/trunk/src/core/Index/Payload.cs Tue Mar 13 20:32:43 2012
@@ -99,10 +99,17 @@ namespace Lucene.Net.Index
 	    /// <summary> Gets or sets a reference to the underlying byte array
 	    /// that holds this payloads data.  Data is not copied.
 	    /// </summary>
-	    public virtual byte[] Data
+	    public virtual void SetData(byte[] value)
 	    {
-	        get { return this.data; }
-	        set { SetData(value, 0, value.Length); }
+	        SetData(value, 0, value.Length);
+	    }
+
+	    /// <summary> Gets or sets a reference to the underlying byte array
+	    /// that holds this payloads data.  Data is not copied.
+	    /// </summary>
+	    public virtual byte[] GetData()
+	    {
+	        return this.data;
 	    }
 
 	    /// <summary> Returns the offset in the underlying byte array </summary>

Modified: incubator/lucene.net/trunk/src/core/Index/SnapshotDeletionPolicy.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Index/SnapshotDeletionPolicy.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Index/SnapshotDeletionPolicy.cs (original)
+++ incubator/lucene.net/trunk/src/core/Index/SnapshotDeletionPolicy.cs Tue Mar 13 20:32:43 2012
@@ -183,10 +183,10 @@ namespace Lucene.Net.Index
 		        get { return cp.UserData; }
 		    }
 
-		    public override bool IsOptimized()
-            {
-                return cp.IsOptimized();
-            }
+		    public override bool IsOptimized
+		    {
+		        get { return cp.IsOptimized; }
+		    }
 		}
 		
 		private IList<IndexCommit> WrapCommits<T>(IList<T> commits) where T : IndexCommit

Modified: incubator/lucene.net/trunk/src/core/Index/Term.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Index/Term.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Index/Term.cs (original)
+++ incubator/lucene.net/trunk/src/core/Index/Term.cs Tue Mar 13 20:32:43 2012
@@ -28,7 +28,6 @@ namespace Lucene.Net.Index
 	/// Note that terms may represent more than words from text fields, but also
 	/// things like dates, email addresses, urls, etc.  
 	/// </summary>
-	
 	[Serializable]
     public sealed class Term : System.IComparable<Term>
 	{
@@ -61,25 +60,25 @@ namespace Lucene.Net.Index
 			field = intern?StringHelper.Intern(fld):fld; // field names are interned
 			text = txt; // unless already known to be
 		}
-		
-		/// <summary>Returns the field of this term, an interned string.   The field indicates
-		/// the part of a document which this term came from. 
-		/// </summary>
-		public System.String Field()
-		{
-			return field;
-		}
-		
-		/// <summary>Returns the text of this term.  In the case of words, this is simply the
-		/// text of the word.  In the case of dates and other types, this is an
-		/// encoding of the object as a string.  
-		/// </summary>
-		public System.String Text()
-		{
-			return text;
-		}
-		
-		/// <summary> Optimized construction of new Terms by reusing same field as this Term
+
+	    /// <summary>Returns the field of this term, an interned string.   The field indicates
+	    /// the part of a document which this term came from. 
+	    /// </summary>
+	    public string Field
+	    {
+	        get { return field; }
+	    }
+
+	    /// <summary>Returns the text of this term.  In the case of words, this is simply the
+	    /// text of the word.  In the case of dates and other types, this is an
+	    /// encoding of the object as a string.  
+	    /// </summary>
+	    public string Text
+	    {
+	        get { return text; }
+	    }
+
+	    /// <summary> Optimized construction of new Terms by reusing same field as this Term
 		/// - avoids field.intern() overhead 
 		/// </summary>
 		/// <param name="text">The text of the new term (field is implicitly same as this Term instance)
@@ -123,8 +122,8 @@ namespace Lucene.Net.Index
 		{
 			int prime = 31;
 			int result = 1;
-			result = prime * result + ((field == null)?0:field.GetHashCode());
-			result = prime * result + ((text == null)?0:text.GetHashCode());
+		    result = prime*result + ((field == null) ? 0 : field.GetHashCode());
+		    result = prime*result + ((text == null) ? 0 : text.GetHashCode());
 			return result;
 		}
 		
@@ -165,10 +164,5 @@ namespace Lucene.Net.Index
         {
             field = StringHelper.Intern(field);
         }
-
-        public System.String text_ForNUnit
-        {
-            get { return text; }
-        }
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/trunk/src/core/Index/TermBuffer.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Index/TermBuffer.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Index/TermBuffer.cs (original)
+++ incubator/lucene.net/trunk/src/core/Index/TermBuffer.cs Tue Mar 13 20:32:43 2012
@@ -108,12 +108,12 @@ namespace Lucene.Net.Index
 				Reset();
 				return ;
 			}
-			System.String termText = term.Text();
+			System.String termText = term.Text;
 			int termLen = termText.Length;
 			text.SetLength(termLen);
 			TextSupport.GetCharsFromString(termText, 0, termLen, text.result, 0);
 			dirty = true;
-			field = term.Field();
+			field = term.Field;
 			this.term = term;
 		}
 		

Modified: incubator/lucene.net/trunk/src/core/Search/Collector.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/Collector.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/Collector.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/Collector.cs Tue Mar 13 20:32:43 2012
@@ -81,7 +81,7 @@ namespace Lucene.Net.Search
 	/// 
     /// <code>
 	/// Searcher searcher = new IndexSearcher(indexReader);
-	/// final BitSet bits = new BitSet(indexReader.maxDoc());
+	/// final BitSet bits = new BitSet(indexReader.MaxDoc);
 	/// searcher.search(query, new Collector() {
 	/// private int docBase;
 	/// 

Modified: incubator/lucene.net/trunk/src/core/Search/FieldCache.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/FieldCache.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/FieldCache.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/FieldCache.cs Tue Mar 13 20:32:43 2012
@@ -376,7 +376,7 @@ namespace Lucene.Net.Search
 		
 		/// <summary>Checks the internal cache for an appropriate entry, and if none is
 		/// found, reads the terms in <c>field</c> as a single byte and returns an array
-		/// of size <c>reader.maxDoc()</c> of the value each document
+		/// of size <c>reader.MaxDoc</c> of the value each document
 		/// has in the given field.
 		/// </summary>
 		/// <param name="reader"> Used to get field values.
@@ -390,7 +390,7 @@ namespace Lucene.Net.Search
 		
 		/// <summary>Checks the internal cache for an appropriate entry, and if none is found,
 		/// reads the terms in <c>field</c> as bytes and returns an array of
-		/// size <c>reader.maxDoc()</c> of the value each document has in the
+		/// size <c>reader.MaxDoc</c> of the value each document has in the
 		/// given field.
 		/// </summary>
 		/// <param name="reader"> Used to get field values.
@@ -406,7 +406,7 @@ namespace Lucene.Net.Search
 		
 		/// <summary>Checks the internal cache for an appropriate entry, and if none is
 		/// found, reads the terms in <c>field</c> as shorts and returns an array
-		/// of size <c>reader.maxDoc()</c> of the value each document
+		/// of size <c>reader.MaxDoc</c> of the value each document
 		/// has in the given field.
 		/// </summary>
 		/// <param name="reader"> Used to get field values.
@@ -420,7 +420,7 @@ namespace Lucene.Net.Search
 		
 		/// <summary>Checks the internal cache for an appropriate entry, and if none is found,
 		/// reads the terms in <c>field</c> as shorts and returns an array of
-		/// size <c>reader.maxDoc()</c> of the value each document has in the
+		/// size <c>reader.MaxDoc</c> of the value each document has in the
 		/// given field.
 		/// </summary>
 		/// <param name="reader"> Used to get field values.
@@ -436,7 +436,7 @@ namespace Lucene.Net.Search
 		
 		/// <summary>Checks the internal cache for an appropriate entry, and if none is
 		/// found, reads the terms in <c>field</c> as integers and returns an array
-		/// of size <c>reader.maxDoc()</c> of the value each document
+		/// of size <c>reader.MaxDoc</c> of the value each document
 		/// has in the given field.
 		/// </summary>
 		/// <param name="reader"> Used to get field values.
@@ -450,7 +450,7 @@ namespace Lucene.Net.Search
 		
 		/// <summary>Checks the internal cache for an appropriate entry, and if none is found,
 		/// reads the terms in <c>field</c> as integers and returns an array of
-		/// size <c>reader.maxDoc()</c> of the value each document has in the
+		/// size <c>reader.MaxDoc</c> of the value each document has in the
 		/// given field.
 		/// </summary>
 		/// <param name="reader"> Used to get field values.
@@ -466,7 +466,7 @@ namespace Lucene.Net.Search
 		
 		/// <summary>Checks the internal cache for an appropriate entry, and if
 		/// none is found, reads the terms in <c>field</c> as floats and returns an array
-		/// of size <c>reader.maxDoc()</c> of the value each document
+		/// of size <c>reader.MaxDoc</c> of the value each document
 		/// has in the given field.
 		/// </summary>
 		/// <param name="reader"> Used to get field values.
@@ -480,7 +480,7 @@ namespace Lucene.Net.Search
 		
 		/// <summary>Checks the internal cache for an appropriate entry, and if
 		/// none is found, reads the terms in <c>field</c> as floats and returns an array
-		/// of size <c>reader.maxDoc()</c> of the value each document
+		/// of size <c>reader.MaxDoc</c> of the value each document
 		/// has in the given field.
 		/// </summary>
 		/// <param name="reader"> Used to get field values.
@@ -496,7 +496,7 @@ namespace Lucene.Net.Search
 		
 		/// <summary> Checks the internal cache for an appropriate entry, and if none is
 		/// found, reads the terms in <c>field</c> as longs and returns an array
-		/// of size <c>reader.maxDoc()</c> of the value each document
+		/// of size <c>reader.MaxDoc</c> of the value each document
 		/// has in the given field.
 		/// 
 		/// </summary>
@@ -511,7 +511,7 @@ namespace Lucene.Net.Search
 		
 		/// <summary> Checks the internal cache for an appropriate entry, and if none is found,
 		/// reads the terms in <c>field</c> as longs and returns an array of
-		/// size <c>reader.maxDoc()</c> of the value each document has in the
+		/// size <c>reader.MaxDoc</c> of the value each document has in the
 		/// given field.
 		/// 
 		/// </summary>
@@ -529,7 +529,7 @@ namespace Lucene.Net.Search
 		
 		/// <summary> Checks the internal cache for an appropriate entry, and if none is
 		/// found, reads the terms in <c>field</c> as integers and returns an array
-		/// of size <c>reader.maxDoc()</c> of the value each document
+		/// of size <c>reader.MaxDoc</c> of the value each document
 		/// has in the given field.
 		/// 
 		/// </summary>
@@ -544,7 +544,7 @@ namespace Lucene.Net.Search
 		
 		/// <summary> Checks the internal cache for an appropriate entry, and if none is found,
 		/// reads the terms in <c>field</c> as doubles and returns an array of
-		/// size <c>reader.maxDoc()</c> of the value each document has in the
+		/// size <c>reader.MaxDoc</c> of the value each document has in the
 		/// given field.
 		/// 
 		/// </summary>
@@ -561,7 +561,7 @@ namespace Lucene.Net.Search
 		
 		/// <summary>Checks the internal cache for an appropriate entry, and if none
 		/// is found, reads the term values in <c>field</c> and returns an array
-		/// of size <c>reader.maxDoc()</c> containing the value each document
+		/// of size <c>reader.MaxDoc</c> containing the value each document
 		/// has in the given field.
 		/// </summary>
 		/// <param name="reader"> Used to get field values.

Modified: incubator/lucene.net/trunk/src/core/Search/FieldCacheImpl.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/FieldCacheImpl.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/FieldCacheImpl.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/FieldCacheImpl.cs Tue Mar 13 20:32:43 2012
@@ -340,9 +340,9 @@ namespace Lucene.Net.Search
 					do 
 					{
 						Term term = termEnum.Term();
-						if (term == null || (System.Object) term.Field() != (System.Object) field)
+						if (term == null || (System.Object) term.Field != (System.Object) field)
 							break;
-						sbyte termval = parser.ParseByte(term.Text());
+						sbyte termval = parser.ParseByte(term.Text);
 						termDocs.Seek(termEnum);
 						while (termDocs.Next())
 						{
@@ -399,9 +399,9 @@ namespace Lucene.Net.Search
 					do 
 					{
 						Term term = termEnum.Term();
-						if (term == null || (System.Object) term.Field() != (System.Object) field)
+						if (term == null || (System.Object) term.Field != (System.Object) field)
 							break;
-						short termval = parser.ParseShort(term.Text());
+						short termval = parser.ParseShort(term.Text);
 						termDocs.Seek(termEnum);
 						while (termDocs.Next())
 						{
@@ -465,9 +465,9 @@ namespace Lucene.Net.Search
 					do 
 					{
 						Term term = termEnum.Term();
-						if (term == null || (System.Object) term.Field() != (System.Object) field)
+						if (term == null || (System.Object) term.Field != (System.Object) field)
 							break;
-						int termval = parser.ParseInt(term.Text());
+						int termval = parser.ParseInt(term.Text);
 						if (retArray == null)
 						// late init
 							retArray = new int[reader.MaxDoc];
@@ -539,9 +539,9 @@ namespace Lucene.Net.Search
 					do 
 					{
 						Term term = termEnum.Term();
-						if (term == null || (System.Object) term.Field() != (System.Object) field)
+						if (term == null || (System.Object) term.Field != (System.Object) field)
 							break;
-						float termval = parser.ParseFloat(term.Text());
+						float termval = parser.ParseFloat(term.Text);
 						if (retArray == null)
 						// late init
 							retArray = new float[reader.MaxDoc];
@@ -611,9 +611,9 @@ namespace Lucene.Net.Search
 					do 
 					{
 						Term term = termEnum.Term();
-						if (term == null || (System.Object) term.Field() != (System.Object) field)
+						if (term == null || (System.Object) term.Field != (System.Object) field)
 							break;
-						long termval = parser.ParseLong(term.Text());
+						long termval = parser.ParseLong(term.Text);
 						if (retArray == null)
 						// late init
 							retArray = new long[reader.MaxDoc];
@@ -683,9 +683,9 @@ namespace Lucene.Net.Search
 					do 
 					{
 						Term term = termEnum.Term();
-						if (term == null || (System.Object) term.Field() != (System.Object) field)
+						if (term == null || (System.Object) term.Field != (System.Object) field)
 							break;
-						double termval = parser.ParseDouble(term.Text());
+						double termval = parser.ParseDouble(term.Text);
 						if (retArray == null)
 						// late init
 							retArray = new double[reader.MaxDoc];
@@ -736,9 +736,9 @@ namespace Lucene.Net.Search
 					do 
 					{
 						Term term = termEnum.Term();
-						if (term == null || (System.Object) term.Field() != (System.Object) field)
+						if (term == null || (System.Object) term.Field != (System.Object) field)
 							break;
-						System.String termval = term.Text();
+						System.String termval = term.Text;
 						termDocs.Seek(termEnum);
 						while (termDocs.Next())
 						{
@@ -789,10 +789,10 @@ namespace Lucene.Net.Search
 					do 
 					{
 						Term term = termEnum.Term();
-                        if (term == null || term.Field() != field || t >= mterms.Length) break;
+                        if (term == null || term.Field != field || t >= mterms.Length) break;
 						
 						// store term text
-						mterms[t] = term.Text();
+						mterms[t] = term.Text;
 						
 						termDocs.Seek(termEnum);
 						while (termDocs.Next())

Modified: incubator/lucene.net/trunk/src/core/Search/FuzzyQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/FuzzyQuery.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/FuzzyQuery.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/FuzzyQuery.cs Tue Mar 13 20:32:43 2012
@@ -80,7 +80,7 @@ namespace Lucene.Net.Search
 			if (prefixLength < 0)
 				throw new System.ArgumentException("prefixLength < 0");
 			
-			if (term.Text().Length > 1.0f / (1.0f - minimumSimilarity))
+			if (term.Text.Length > 1.0f / (1.0f - minimumSimilarity))
 			{
 				this.termLongEnough = true;
 			}
@@ -195,12 +195,12 @@ namespace Lucene.Net.Search
 		public override System.String ToString(System.String field)
 		{
 			System.Text.StringBuilder buffer = new System.Text.StringBuilder();
-			if (!term.Field().Equals(field))
+			if (!term.Field.Equals(field))
 			{
-				buffer.Append(term.Field());
+				buffer.Append(term.Field);
 				buffer.Append(":");
 			}
-			buffer.Append(term.Text());
+			buffer.Append(term.Text);
 			buffer.Append('~');
 			buffer.Append(Single.ToString(minimumSimilarity));
 			buffer.Append(ToStringUtils.Boost(Boost));

Modified: incubator/lucene.net/trunk/src/core/Search/FuzzyTermEnum.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/FuzzyTermEnum.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/FuzzyTermEnum.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/FuzzyTermEnum.cs Tue Mar 13 20:32:43 2012
@@ -116,20 +116,20 @@ namespace Lucene.Net.Search
 			this.minimumSimilarity = minSimilarity;
 			this.scale_factor = 1.0f / (1.0f - minimumSimilarity);
 			this.searchTerm = term;
-			this.field = searchTerm.Field();
+			this.field = searchTerm.Field;
 			
 			//The prefix could be longer than the word.
 			//It's kind of silly though.  It means we must match the entire word.
-			int fullSearchTermLength = searchTerm.Text().Length;
+			int fullSearchTermLength = searchTerm.Text.Length;
 			int realPrefixLength = prefixLength > fullSearchTermLength?fullSearchTermLength:prefixLength;
 			
-			this.text = searchTerm.Text().Substring(realPrefixLength);
-			this.prefix = searchTerm.Text().Substring(0, (realPrefixLength) - (0));
+			this.text = searchTerm.Text.Substring(realPrefixLength);
+			this.prefix = searchTerm.Text.Substring(0, (realPrefixLength) - (0));
 
 		    this.p = new int[this.text.Length + 1];
             this.d = new int[this.text.Length + 1];
 			
-			SetEnum(reader.Terms(new Term(searchTerm.Field(), prefix)));
+			SetEnum(reader.Terms(new Term(searchTerm.Field, prefix)));
 		}
 		
 		/// <summary> The termCompare method in FuzzyTermEnum uses Levenshtein distance to 
@@ -137,9 +137,9 @@ namespace Lucene.Net.Search
 		/// </summary>
 		protected internal override bool TermCompare(Term term)
 		{
-			if ((System.Object) field == (System.Object) term.Field() && term.Text().StartsWith(prefix))
+			if ((System.Object) field == (System.Object) term.Field && term.Text.StartsWith(prefix))
 			{
-				System.String target = term.Text().Substring(prefix.Length);
+				System.String target = term.Text.Substring(prefix.Length);
 				this.similarity = Similarity(target);
 				return (similarity > minimumSimilarity);
 			}

Modified: incubator/lucene.net/trunk/src/core/Search/IndexSearcher.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/IndexSearcher.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/IndexSearcher.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/IndexSearcher.cs Tue Mar 13 20:32:43 2012
@@ -169,9 +169,9 @@ namespace Lucene.Net.Search
 		}
 		
 		// inherit javadoc
-		public override int MaxDoc()
+		public override int MaxDoc
 		{
-			return reader.MaxDoc;
+            get { return reader.MaxDoc; }
 		}
 		
 		// inherit javadoc

Modified: incubator/lucene.net/trunk/src/core/Search/MultiPhraseQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/MultiPhraseQuery.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/MultiPhraseQuery.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/MultiPhraseQuery.cs Tue Mar 13 20:32:43 2012
@@ -89,11 +89,11 @@ namespace Lucene.Net.Search
 		public virtual void  Add(Term[] terms, int position)
 		{
 			if (termArrays.Count == 0)
-				field = terms[0].Field();
+				field = terms[0].Field;
 			
 			for (int i = 0; i < terms.Length; i++)
 			{
-				if ((System.Object) terms[i].Field() != (System.Object) field)
+				if ((System.Object) terms[i].Field != (System.Object) field)
 				{
 					throw new System.ArgumentException("All phrase terms must be in the same field (" + field + "): " + terms[i]);
 				}
@@ -158,7 +158,7 @@ namespace Lucene.Net.Search
 				this.similarity = Enclosing_Instance.GetSimilarity(searcher);
 				
 				// compute idf
-			    int maxDoc = searcher.MaxDoc();
+			    int maxDoc = searcher.MaxDoc;
                 foreach (Term[] terms in enclosingInstance.termArrays)
                 {
                     foreach (Term term in terms)
@@ -343,7 +343,7 @@ namespace Lucene.Net.Search
 					buffer.Append("(");
 					for (int j = 0; j < terms.Length; j++)
 					{
-						buffer.Append(terms[j].Text());
+						buffer.Append(terms[j].Text);
 						if (j < terms.Length - 1)
 							buffer.Append(" ");
 					}
@@ -351,7 +351,7 @@ namespace Lucene.Net.Search
 				}
 				else
 				{
-					buffer.Append(terms[0].Text());
+					buffer.Append(terms[0].Text);
 				}
 			}
 			buffer.Append("\"");

Modified: incubator/lucene.net/trunk/src/core/Search/MultiSearcher.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/MultiSearcher.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/MultiSearcher.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/MultiSearcher.cs Tue Mar 13 20:32:43 2012
@@ -102,7 +102,7 @@ namespace Lucene.Net.Search
 				}
 				catch (KeyNotFoundException e) // C# equiv. of java code.
 				{
-					throw new System.ArgumentException("df for term " + term.Text() + " not available");
+					throw new System.ArgumentException("df for term " + term.Text + " not available");
 				}
 				return df;
 			}
@@ -117,9 +117,9 @@ namespace Lucene.Net.Search
 				return result;
 			}
 			
-			public override int MaxDoc()
+			public override int MaxDoc
 			{
-				return maxDoc;
+                get { return maxDoc; }
 			}
 			
 			public override Query Rewrite(Query query)
@@ -183,7 +183,7 @@ namespace Lucene.Net.Search
 			for (int i = 0; i < searchables.Length; i++)
 			{
 				starts[i] = maxDoc;
-				maxDoc += searchables[i].MaxDoc(); // compute maxDocs
+				maxDoc += searchables[i].MaxDoc; // compute maxDocs
 			}
 			starts[searchables.Length] = maxDoc;
 		}
@@ -250,13 +250,13 @@ namespace Lucene.Net.Search
 		{
 			return n - starts[SubSearcher(n)];
 		}
-		
-		public override int MaxDoc()
-		{
-			return maxDoc;
-		}
-		
-		public override TopDocs Search(Weight weight, Filter filter, int nDocs)
+
+	    public override int MaxDoc
+	    {
+	        get { return maxDoc; }
+	    }
+
+	    public override TopDocs Search(Weight weight, Filter filter, int nDocs)
 		{
 			HitQueue hq = new HitQueue(nDocs, false);
 			int totalHits = 0;
@@ -377,7 +377,7 @@ namespace Lucene.Net.Search
 			}
 			
 			// step4
-			int numDocs = MaxDoc();
+			int numDocs = MaxDoc;
 			CachedDfSource cacheSim = new CachedDfSource(dfMap, numDocs, Similarity);
 			
 			return rewrittenQuery.Weight(cacheSim);

Modified: incubator/lucene.net/trunk/src/core/Search/MultiTermQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/MultiTermQuery.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/MultiTermQuery.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/MultiTermQuery.cs Tue Mar 13 20:32:43 2012
@@ -254,7 +254,7 @@ namespace Lucene.Net.Search
 
 		    /// <summary>If the number of documents to be visited in the
 		    /// postings exceeds this specified percentage of the
-		    /// maxDoc() for the index, then <see cref="CONSTANT_SCORE_FILTER_REWRITE" />
+		    /// MaxDoc for the index, then <see cref="CONSTANT_SCORE_FILTER_REWRITE" />
 		    /// is used.
 		    /// </summary>
 		    /// <value> 0.0 to 100.0 </value>

Modified: incubator/lucene.net/trunk/src/core/Search/NumericRangeQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/NumericRangeQuery.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/NumericRangeQuery.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/NumericRangeQuery.cs Tue Mar 13 20:32:43 2012
@@ -514,7 +514,7 @@ namespace Lucene.Net.Search
 			//@Override
 			protected internal override bool TermCompare(Term term)
 			{
-				return (term.Field() == Enclosing_Instance.field && String.CompareOrdinal(term.Text(), currentUpperBound) <= 0);
+				return (term.Field == Enclosing_Instance.field && String.CompareOrdinal(term.Text, currentUpperBound) <= 0);
 			}
 			
 			/// <summary>Increments the enumeration to the next element.  True if one exists. </summary>

Modified: incubator/lucene.net/trunk/src/core/Search/Payloads/PayloadTermQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/Payloads/PayloadTermQuery.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/Payloads/PayloadTermQuery.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/Payloads/PayloadTermQuery.cs Tue Mar 13 20:32:43 2012
@@ -150,7 +150,7 @@ namespace Lucene.Net.Search.Payloads
 					if (positions.IsPayloadAvailable)
 					{
 						payload = positions.GetPayload(payload, 0);
-						payloadScore = Enclosing_Instance.Enclosing_Instance.function.CurrentScore(doc, Enclosing_Instance.Enclosing_Instance.term.Field(), spans.Start(), spans.End(), payloadsSeen, payloadScore, similarity.ScorePayload(doc, Enclosing_Instance.Enclosing_Instance.term.Field(), spans.Start(), spans.End(), payload, 0, positions.PayloadLength));
+						payloadScore = Enclosing_Instance.Enclosing_Instance.function.CurrentScore(doc, Enclosing_Instance.Enclosing_Instance.term.Field, spans.Start(), spans.End(), payloadsSeen, payloadScore, similarity.ScorePayload(doc, Enclosing_Instance.Enclosing_Instance.term.Field, spans.Start(), spans.End(), payload, 0, positions.PayloadLength));
 						payloadsSeen++;
 					}
 					else
@@ -194,7 +194,7 @@ namespace Lucene.Net.Search.Payloads
 				/// </returns>
 				protected internal virtual float GetPayloadScore()
 				{
-					return Enclosing_Instance.Enclosing_Instance.function.DocScore(doc, Enclosing_Instance.Enclosing_Instance.term.Field(), payloadsSeen, payloadScore);
+					return Enclosing_Instance.Enclosing_Instance.function.DocScore(doc, Enclosing_Instance.Enclosing_Instance.term.Field, payloadsSeen, payloadScore);
 				}
 				
 				protected internal override Explanation Explain(int doc)

Modified: incubator/lucene.net/trunk/src/core/Search/PhraseQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/PhraseQuery.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/PhraseQuery.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/PhraseQuery.cs Tue Mar 13 20:32:43 2012
@@ -88,8 +88,8 @@ namespace Lucene.Net.Search
 		public virtual void  Add(Term term, int position)
 		{
 			if (terms.Count == 0)
-				field = term.Field();
-			else if ((System.Object) term.Field() != (System.Object) field)
+				field = term.Field;
+			else if ((System.Object) term.Field != (System.Object) field)
 			{
 				throw new System.ArgumentException("All phrase terms must be in the same field: " + term);
 			}
@@ -219,7 +219,7 @@ namespace Lucene.Net.Search
 					
 					Term term = Enclosing_Instance.terms[i];
 					
-					query.Append(term.Text());
+					query.Append(term.Text);
 				}
 				query.Append('\"');
 				
@@ -318,11 +318,11 @@ namespace Lucene.Net.Search
 				System.String s = pieces[pos];
 				if (s == null)
 				{
-					s = terms[i].Text();
+					s = terms[i].Text;
 				}
 				else
 				{
-					s = s + "|" + terms[i].Text();
+					s = s + "|" + terms[i].Text;
 				}
 				pieces[pos] = s;
 			}

Modified: incubator/lucene.net/trunk/src/core/Search/PrefixQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/PrefixQuery.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/PrefixQuery.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/PrefixQuery.cs Tue Mar 13 20:32:43 2012
@@ -57,12 +57,12 @@ namespace Lucene.Net.Search
 		public override System.String ToString(System.String field)
 		{
 			System.Text.StringBuilder buffer = new System.Text.StringBuilder();
-			if (!prefix.Field().Equals(field))
+			if (!prefix.Field.Equals(field))
 			{
-				buffer.Append(prefix.Field());
+				buffer.Append(prefix.Field);
 				buffer.Append(":");
 			}
-			buffer.Append(prefix.Text());
+			buffer.Append(prefix.Text);
 			buffer.Append('*');
 			buffer.Append(ToStringUtils.Boost(Boost));
 			return buffer.ToString();

Modified: incubator/lucene.net/trunk/src/core/Search/PrefixTermEnum.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/PrefixTermEnum.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/PrefixTermEnum.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/PrefixTermEnum.cs Tue Mar 13 20:32:43 2012
@@ -40,7 +40,7 @@ namespace Lucene.Net.Search
 		{
 			this.prefix = prefix;
 			
-			SetEnum(reader.Terms(new Term(prefix.Field(), prefix.Text())));
+			SetEnum(reader.Terms(new Term(prefix.Field, prefix.Text)));
 		}
 		
 		public override float Difference()
@@ -60,7 +60,7 @@ namespace Lucene.Net.Search
 
 	    protected internal override bool TermCompare(Term term)
 		{
-			if ((System.Object) term.Field() == (System.Object) prefix.Field() && term.Text().StartsWith(prefix.Text()))
+			if ((System.Object) term.Field == (System.Object) prefix.Field && term.Text.StartsWith(prefix.Text))
 			{
 				return true;
 			}

Modified: incubator/lucene.net/trunk/src/core/Search/ScoreDoc.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/ScoreDoc.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/ScoreDoc.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/ScoreDoc.cs Tue Mar 13 20:32:43 2012
@@ -26,36 +26,25 @@ namespace Lucene.Net.Search
 	[Serializable]
 	public class ScoreDoc
 	{
-		private float score;
-		private int doc;
-		
-		/// <summary>Expert: Constructs a ScoreDoc. </summary>
+        /// <summary>Expert: The score of this document for the query. </summary>
+        public float Score { get; set; }
+
+        /// <summary>Expert: A hit document's number.</summary>
+        /// <seealso cref="Searcher.Doc(int)">
+        /// </seealso>
+        public int Doc { get; set; }
+
+	    /// <summary>Expert: Constructs a ScoreDoc. </summary>
 		public ScoreDoc(int doc, float score)
 		{
-			this.doc = doc;
-			this.score = score;
+			this.Doc = doc;
+			this.Score = score;
 		}
 
-	    /// <summary>Expert: The score of this document for the query. </summary>
-	    public float Score
-	    {
-	        get { return score; }
-	        set { score = value; }
-	    }
-
-	    /// <summary>Expert: A hit document's number.</summary>
-	    /// <seealso cref="Searcher.Doc(int)">
-	    /// </seealso>
-	    public int Doc
-	    {
-	        get { return doc; }
-	        set { doc = value; }
-	    }
-
 	    // A convenience method for debugging.
 		public override System.String ToString()
 		{
-			return "doc=" + doc + " score=" + score;
+			return "doc=" + Doc + " score=" + Score;
 		}
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/trunk/src/core/Search/Searchable.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/Searchable.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/Searchable.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/Searchable.cs Tue Mar 13 20:32:43 2012
@@ -82,13 +82,13 @@ namespace Lucene.Net.Search
 		/// document frequencies. Used to minimize number of remote calls.
 		/// </summary>
 		int[] DocFreqs(Term[] terms);
-		
-		/// <summary>Expert: Returns one greater than the largest possible document number.
-		/// Called by search code to compute term weights.
-		/// </summary>
-		/// <seealso cref="Lucene.Net.Index.IndexReader.MaxDoc()">
-		/// </seealso>
-		int MaxDoc();
+
+	    /// <summary>Expert: Returns one greater than the largest possible document number.
+	    /// Called by search code to compute term weights.
+	    /// </summary>
+	    /// <seealso cref="Lucene.Net.Index.IndexReader.MaxDoc">
+	    /// </seealso>
+	    int MaxDoc { get; }
 		
 		/// <summary>Expert: Low-level search implementation.  Finds the top <c>n</c>
 		/// hits for <c>query</c>, applying <c>filter</c> if non-null.

Modified: incubator/lucene.net/trunk/src/core/Search/Searcher.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/Searcher.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/Searcher.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/Searcher.cs Tue Mar 13 20:32:43 2012
@@ -180,7 +180,7 @@ namespace Lucene.Net.Search
 	    protected abstract void Dispose(bool disposing);
 
 		public abstract int DocFreq(Term term);
-		public abstract int MaxDoc();
+	    public abstract int MaxDoc { get; }
 		public abstract TopDocs Search(Weight weight, Filter filter, int n);
 		public abstract Document Doc(int i);
 	    public abstract Document Doc(int docid, FieldSelector fieldSelector);

Modified: incubator/lucene.net/trunk/src/core/Search/Similarity.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/Similarity.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/Similarity.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/Similarity.cs Tue Mar 13 20:32:43 2012
@@ -568,10 +568,10 @@ namespace Lucene.Net.Search
 		/// The default implementation uses:
 		/// 
         /// <code>
-		/// idf(searcher.docFreq(term), searcher.maxDoc());
+		/// idf(searcher.docFreq(term), searcher.MaxDoc);
         /// </code>
 		/// 
-		/// Note that <see cref="Searcher.MaxDoc()" /> is used instead of
+		/// Note that <see cref="Searcher.MaxDoc" /> is used instead of
 		/// <see cref="Lucene.Net.Index.IndexReader.NumDocs()" /> because it is
 		/// proportional to <see cref="Searcher.DocFreq(Term)" /> , i.e., when one is
 		/// inaccurate, so is the other, and in the same direction.
@@ -588,7 +588,7 @@ namespace Lucene.Net.Search
 		public virtual IDFExplanation IdfExplain(Term term, Searcher searcher)
 		{
 			int df = searcher.DocFreq(term);
-			int max = searcher.MaxDoc();
+			int max = searcher.MaxDoc;
 			float idf2 = Idf(df, max);
 			return new AnonymousClassIDFExplanation1(df, max, idf2, this);
 		}
@@ -611,7 +611,7 @@ namespace Lucene.Net.Search
 		/// <throws>  IOException </throws>
 		public virtual IDFExplanation IdfExplain(ICollection<Term> terms, Searcher searcher)
 		{
-			int max = searcher.MaxDoc();
+			int max = searcher.MaxDoc;
 			float idf2 = 0.0f;
 			System.Text.StringBuilder exp = new System.Text.StringBuilder();
             foreach (Term term in terms)
@@ -619,7 +619,7 @@ namespace Lucene.Net.Search
 				int df = searcher.DocFreq(term);
 				idf2 += Idf(df, max);
 				exp.Append(" ");
-				exp.Append(term.Text());
+				exp.Append(term.Text);
 				exp.Append("=");
 				exp.Append(df);
 			}

Modified: incubator/lucene.net/trunk/src/core/Search/Sort.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/Sort.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/Sort.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/Sort.cs Tue Mar 13 20:32:43 2012
@@ -78,11 +78,11 @@ namespace Lucene.Net.Search
 	/// 
 	/// <p/>Sorting uses of caches of term values maintained by the
 	/// internal HitQueue(s).  The cache is static and contains an integer
-	/// or float array of length <c>IndexReader.maxDoc()</c> for each field
+	/// or float array of length <c>IndexReader.MaxDoc</c> for each field
 	/// name for which a sort is performed.  In other words, the size of the
 	/// cache in bytes is:
 	/// 
-	/// <p/><c>4 * IndexReader.maxDoc() * (# of different fields actually used to sort)</c>
+	/// <p/><c>4 * IndexReader.MaxDoc * (# of different fields actually used to sort)</c>
 	/// 
 	/// <p/>For String fields, the cache is larger: in addition to the
 	/// above array, the value of every term in the field is kept in memory.

Modified: incubator/lucene.net/trunk/src/core/Search/Spans/SpanTermQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/Spans/SpanTermQuery.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/Spans/SpanTermQuery.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/Spans/SpanTermQuery.cs Tue Mar 13 20:32:43 2012
@@ -44,7 +44,7 @@ namespace Lucene.Net.Search.Spans
 
 	    public override string Field
 	    {
-	        get { return term.Field(); }
+	        get { return term.Field; }
 	    }
 
 	    public override void  ExtractTerms(System.Collections.Generic.ISet<Term> terms)
@@ -55,8 +55,8 @@ namespace Lucene.Net.Search.Spans
 		public override System.String ToString(System.String field)
 		{
 			System.Text.StringBuilder buffer = new System.Text.StringBuilder();
-			if (term.Field().Equals(field))
-				buffer.Append(term.Text());
+			if (term.Field.Equals(field))
+				buffer.Append(term.Text);
 			else
 			{
 				buffer.Append(term.ToString());

Modified: incubator/lucene.net/trunk/src/core/Search/TermQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/TermQuery.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/TermQuery.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/TermQuery.cs Tue Mar 13 20:32:43 2012
@@ -103,7 +103,7 @@ namespace Lucene.Net.Search
 				if (termDocs == null)
 					return null;
 				
-				return new TermScorer(this, termDocs, similarity, reader.Norms(Enclosing_Instance.term.Field()));
+				return new TermScorer(this, termDocs, similarity, reader.Norms(Enclosing_Instance.term.Field));
 			}
 			
 			public override Explanation Explain(IndexReader reader, int doc)
@@ -131,7 +131,7 @@ namespace Lucene.Net.Search
 				result.AddDetail(queryExpl);
 				
 				// explain field weight
-				System.String field = Enclosing_Instance.term.Field();
+				System.String field = Enclosing_Instance.term.Field;
 				ComplexExplanation fieldExpl = new ComplexExplanation();
 				fieldExpl.Description = "fieldWeight(" + Enclosing_Instance.term + " in " + doc + "), product of:";
 
@@ -212,12 +212,12 @@ namespace Lucene.Net.Search
 		public override System.String ToString(System.String field)
 		{
 			System.Text.StringBuilder buffer = new System.Text.StringBuilder();
-			if (!term.Field().Equals(field))
+			if (!term.Field.Equals(field))
 			{
-				buffer.Append(term.Field());
+				buffer.Append(term.Field);
 				buffer.Append(":");
 			}
-			buffer.Append(term.Text());
+			buffer.Append(term.Text);
 			buffer.Append(ToStringUtils.Boost(Boost));
 			return buffer.ToString();
 		}

Modified: incubator/lucene.net/trunk/src/core/Search/TermRangeTermEnum.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/TermRangeTermEnum.cs?rev=1300340&r1=1300339&r2=1300340&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/TermRangeTermEnum.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/TermRangeTermEnum.cs Tue Mar 13 20:32:43 2012
@@ -112,15 +112,15 @@ namespace Lucene.Net.Search
 			{
 				// Use Unicode code point ordering
 			    bool checkLower = !includeLower;
-			    if (term != null && (System.Object) term.Field() == (System.Object) field)
+			    if (term != null && (System.Object) term.Field == (System.Object) field)
 				{
 					// interned comparison
-					if (!checkLower || null == lowerTermText || String.CompareOrdinal(term.Text(), lowerTermText) > 0)
+					if (!checkLower || null == lowerTermText || String.CompareOrdinal(term.Text, lowerTermText) > 0)
 					{
 						checkLower = false;
 						if (upperTermText != null)
 						{
-							int compare = String.CompareOrdinal(upperTermText, term.Text());
+							int compare = String.CompareOrdinal(upperTermText, term.Text);
 							/*
 							* if beyond the upper term, or is exclusive and this is equal to
 							* the upper term, break out
@@ -144,10 +144,10 @@ namespace Lucene.Net.Search
 			}
 			else
 			{
-				if (term != null && (System.Object) term.Field() == (System.Object) field)
+				if (term != null && (System.Object) term.Field == (System.Object) field)
 				{
 					// interned comparison
-					if ((lowerTermText == null || (includeLower?collator.Compare(term.Text().ToString(), lowerTermText.ToString()) >= 0:collator.Compare(term.Text().ToString(), lowerTermText.ToString()) > 0)) && (upperTermText == null || (includeUpper?collator.Compare(term.Text().ToString(), upperTermText.ToString()) <= 0:collator.Compare(term.Text().ToString(), upperTermText.ToString()) < 0)))
+					if ((lowerTermText == null || (includeLower?collator.Compare(term.Text.ToString(), lowerTermText.ToString()) >= 0:collator.Compare(term.Text.ToString(), lowerTermText.ToString()) > 0)) && (upperTermText == null || (includeUpper?collator.Compare(term.Text.ToString(), upperTermText.ToString()) <= 0:collator.Compare(term.Text.ToString(), upperTermText.ToString()) < 0)))
 					{
 						return true;
 					}



Mime
View raw message