lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [Lucene.Net] svn commit: r1166814 - in /incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core: Document/ Index/ Search/ Search/Function/ Search/Spans/ Util/
Date Thu, 08 Sep 2011 17:24:42 GMT
Author: digy
Date: Thu Sep  8 17:24:41 2011
New Revision: 1166814

URL: http://svn.apache.org/viewvc?rev=1166814&view=rev
Log:
[LUCENENET-412] Added harmless "params" to some methods as in Lucene.java 3.0.3

Modified:
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Document/MapFieldSelector.cs
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Index/IndexWriter.cs
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Index/MultiReader.cs
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/ConjunctionScorer.cs
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/FieldCacheTermsFilter.cs
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Function/CustomScoreQuery.cs
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/MultiPhraseQuery.cs
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/MultiSearcher.cs
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Query.cs
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Sort.cs
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Spans/SpanOrQuery.cs
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Util/FieldCacheSanityChecker.cs
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Util/SortedVIntList.cs

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Document/MapFieldSelector.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Document/MapFieldSelector.cs?rev=1166814&r1=1166813&r2=1166814&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Document/MapFieldSelector.cs
(original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Document/MapFieldSelector.cs
Thu Sep  8 17:24:41 2011
@@ -51,7 +51,7 @@ namespace Lucene.Net.Documents
 		/// <summary>Create a a MapFieldSelector</summary>
 		/// <param name="fields">fields to LOAD.  All other fields are NO_LOAD.
 		/// </param>
-		public MapFieldSelector(System.String[] fields)
+		public MapFieldSelector(params System.String[] fields)
 		{
             fieldSelections = new Dictionary<string, FieldSelectorResult>(fields.Length
* 5 / 3);
 			for (int i = 0; i < fields.Length; i++)

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Index/IndexWriter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Index/IndexWriter.cs?rev=1166814&r1=1166813&r2=1166814&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Index/IndexWriter.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Index/IndexWriter.cs Thu Sep
 8 17:24:41 2011
@@ -2977,7 +2977,7 @@ namespace Lucene.Net.Index
 		/// </param>
 		/// <throws>  CorruptIndexException if the index is corrupt </throws>
 		/// <throws>  IOException if there is a low-level IO error </throws>
-		public virtual void  DeleteDocuments(Term[] terms)
+		public virtual void  DeleteDocuments(params Term[] terms)
 		{
 			EnsureOpen();
 			try
@@ -3024,7 +3024,7 @@ namespace Lucene.Net.Index
 		/// </param>
 		/// <throws>  CorruptIndexException if the index is corrupt </throws>
 		/// <throws>  IOException if there is a low-level IO error </throws>
-		public virtual void  DeleteDocuments(Query[] queries)
+		public virtual void  DeleteDocuments(params Query[] queries)
 		{
 			EnsureOpen();
 			bool doFlush = docWriter.BufferDeleteQueries(queries);
@@ -4159,7 +4159,7 @@ namespace Lucene.Net.Index
 		/// <throws>  CorruptIndexException if the index is corrupt </throws>
 		/// <throws>  IOException if there is a low-level IO error </throws>
         [Obsolete("Use {@link #addIndexesNoOptimize} instead,then separately call {@link
#optimize} afterwards if you need to.")]
-		public virtual void  AddIndexes(Directory[] dirs)
+		public virtual void  AddIndexes(params Directory[] dirs)
 		{
 			
 			EnsureOpen();
@@ -4306,7 +4306,7 @@ namespace Lucene.Net.Index
 		/// </summary>
 		/// <throws>  CorruptIndexException if the index is corrupt </throws>
 		/// <throws>  IOException if there is a low-level IO error </throws>
-		public virtual void  AddIndexesNoOptimize(Directory[] dirs)
+		public virtual void  AddIndexesNoOptimize(params Directory[] dirs)
 		{
 			
 			EnsureOpen();
@@ -4504,7 +4504,7 @@ namespace Lucene.Net.Index
 		/// </summary>
 		/// <throws>  CorruptIndexException if the index is corrupt </throws>
 		/// <throws>  IOException if there is a low-level IO error </throws>
-		public virtual void  AddIndexes(IndexReader[] readers)
+		public virtual void  AddIndexes(params IndexReader[] readers)
 		{
 			
 			EnsureOpen();

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Index/MultiReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Index/MultiReader.cs?rev=1166814&r1=1166813&r2=1166814&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Index/MultiReader.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Index/MultiReader.cs Thu Sep
 8 17:24:41 2011
@@ -51,7 +51,7 @@ namespace Lucene.Net.Index
 		/// <param name="subReaders">set of (sub)readers
 		/// </param>
 		/// <throws>  IOException </throws>
-		public MultiReader(IndexReader[] subReaders)
+		public MultiReader(params IndexReader[] subReaders)
 		{
 			Initialize(subReaders, true);
 		}

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/ConjunctionScorer.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/ConjunctionScorer.cs?rev=1166814&r1=1166813&r2=1166814&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/ConjunctionScorer.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/ConjunctionScorer.cs Thu
Sep  8 17:24:41 2011
@@ -32,7 +32,7 @@ namespace Lucene.Net.Search
 		{
 		}
 		
-		public ConjunctionScorer(Similarity similarity, Scorer[] scorers):base(similarity)
+		public ConjunctionScorer(Similarity similarity, params Scorer[] scorers):base(similarity)
 		{
 			this.scorers = scorers;
 			coord = similarity.Coord(scorers.Length, scorers.Length);

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/FieldCacheTermsFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/FieldCacheTermsFilter.cs?rev=1166814&r1=1166813&r2=1166814&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/FieldCacheTermsFilter.cs
(original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/FieldCacheTermsFilter.cs
Thu Sep  8 17:24:41 2011
@@ -99,7 +99,7 @@ namespace Lucene.Net.Search
 		private System.String field;
 		private System.String[] terms;
 		
-		public FieldCacheTermsFilter(System.String field, System.String[] terms)
+		public FieldCacheTermsFilter(System.String field, params System.String[] terms)
 		{
 			this.field = field;
 			this.terms = terms;

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Function/CustomScoreQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Function/CustomScoreQuery.cs?rev=1166814&r1=1166813&r2=1166814&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Function/CustomScoreQuery.cs
(original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Function/CustomScoreQuery.cs
Thu Sep  8 17:24:41 2011
@@ -80,7 +80,7 @@ namespace Lucene.Net.Search.Function
 		/// {@link Lucene.Net.Search.Function.FieldScoreQuery FieldScoreQueries}.
 		/// This parameter is optional - it can be null or even an empty array.
 		/// </param>
-		public CustomScoreQuery(Query subQuery, ValueSourceQuery[] valSrcQueries)
+		public CustomScoreQuery(Query subQuery, params ValueSourceQuery[] valSrcQueries)
 		{
 			this.subQuery = subQuery;
 			this.valSrcQueries = valSrcQueries != null?valSrcQueries:new ValueSourceQuery[0];

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/MultiPhraseQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/MultiPhraseQuery.cs?rev=1166814&r1=1166813&r2=1166814&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/MultiPhraseQuery.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/MultiPhraseQuery.cs Thu
Sep  8 17:24:41 2011
@@ -76,7 +76,7 @@ namespace Lucene.Net.Search
 		/// </summary>
 		/// <seealso cref="PhraseQuery.add(Term)">
 		/// </seealso>
-		public virtual void  Add(Term[] terms)
+		public virtual void  Add(params Term[] terms)
 		{
 			int position = 0;
 			if (positions.Count > 0)

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/MultiSearcher.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/MultiSearcher.cs?rev=1166814&r1=1166813&r2=1166814&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/MultiSearcher.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/MultiSearcher.cs Thu Sep
 8 17:24:41 2011
@@ -179,7 +179,7 @@ namespace Lucene.Net.Search
 		private int maxDoc = 0;
 		
 		/// <summary>Creates a searcher which searches <i>searchers</i>. </summary>
-		public MultiSearcher(Searchable[] searchables)
+		public MultiSearcher(params Searchable[] searchables)
 		{
 			this.searchables = searchables;
 			

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Query.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Query.cs?rev=1166814&r1=1166813&r2=1166814&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Query.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Query.cs Thu Sep  8 17:24:41
2011
@@ -199,7 +199,7 @@ namespace Lucene.Net.Search
 		/// 
 		/// <p/>A utility for use by {@link #Combine(Query[])} implementations.
 		/// </summary>
-		public static Query MergeBooleanQueries(BooleanQuery[] queries)
+		public static Query MergeBooleanQueries(params BooleanQuery[] queries)
 		{
             Support.Set<BooleanClause> allClauses = new Support.Set<BooleanClause>();
 			for (int i = 0; i < queries.Length; i++)

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Sort.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Sort.cs?rev=1166814&r1=1166813&r2=1166814&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Sort.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Sort.cs Thu Sep  8 17:24:41
2011
@@ -169,7 +169,7 @@ namespace Lucene.Net.Search
 		/// #Sort(SortField[])}
 		/// </deprecated>
         [Obsolete("Please specify the type explicitly by first creating SortFields and then
use Sort(SortField[])")]
-		public Sort(System.String[] fields)
+		public Sort(params System.String[] fields)
 		{
 			SetSort(fields);
 		}
@@ -181,7 +181,7 @@ namespace Lucene.Net.Search
 		}
 		
 		/// <summary>Sorts in succession by the criteria in each SortField. </summary>
-		public Sort(SortField[] fields)
+		public Sort(params SortField[] fields)
 		{
 			SetSort(fields);
 		}
@@ -218,7 +218,7 @@ namespace Lucene.Net.Search
 		/// #SetSort(SortField[])} 
 		/// </deprecated>
         [Obsolete("Please specify the type explicitly by first creating a SortFields and
then use SetSort(SortField[])")]
-		public virtual void  SetSort(System.String[] fieldnames)
+		public virtual void  SetSort(params System.String[] fieldnames)
 		{
 			int n = fieldnames.Length;
 			SortField[] nfields = new SortField[n];
@@ -236,7 +236,7 @@ namespace Lucene.Net.Search
 		}
 		
 		/// <summary>Sets the sort to the given criteria in succession. </summary>
-		public virtual void  SetSort(SortField[] fields)
+		public virtual void  SetSort(params SortField[] fields)
 		{
 			this.fields = fields;
 		}

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Spans/SpanOrQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Spans/SpanOrQuery.cs?rev=1166814&r1=1166813&r2=1166814&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Spans/SpanOrQuery.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Spans/SpanOrQuery.cs Thu
Sep  8 17:24:41 2011
@@ -166,7 +166,7 @@ namespace Lucene.Net.Search.Spans
 		private System.String field;
 		
 		/// <summary>Construct a SpanOrQuery merging the provided clauses. </summary>
-		public SpanOrQuery(SpanQuery[] clauses)
+		public SpanOrQuery(params SpanQuery[] clauses)
 		{
 			
 			// copy clauses array into an ArrayList

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Util/FieldCacheSanityChecker.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Util/FieldCacheSanityChecker.cs?rev=1166814&r1=1166813&r2=1166814&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Util/FieldCacheSanityChecker.cs
(original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Util/FieldCacheSanityChecker.cs
Thu Sep  8 17:24:41 2011
@@ -83,7 +83,7 @@ namespace Lucene.Net.Util
 		/// </summary>
 		/// <seealso cref="check">
 		/// </seealso>
-		public static Insanity[] CheckSanity(CacheEntry[] cacheEntries)
+		public static Insanity[] CheckSanity(params CacheEntry[] cacheEntries)
 		{
 			FieldCacheSanityChecker sanityChecker = new FieldCacheSanityChecker();
 			// doesn't check for interned
@@ -98,7 +98,7 @@ namespace Lucene.Net.Util
 		/// (:TODO: is this a bad idea? are we masking a real problem?)
 		/// <p/>
 		/// </summary>
-		public Insanity[] Check(CacheEntry[] cacheEntries)
+		public Insanity[] Check(params CacheEntry[] cacheEntries)
 		{
 			if (null == cacheEntries || 0 == cacheEntries.Length)
 				return new Insanity[0];

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Util/SortedVIntList.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Util/SortedVIntList.cs?rev=1166814&r1=1166813&r2=1166814&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Util/SortedVIntList.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Util/SortedVIntList.cs Thu Sep
 8 17:24:41 2011
@@ -141,7 +141,7 @@ namespace Lucene.Net.Util
 		/// </summary>
 		/// <param name="sortedInts"> A sorted array of non negative integers.
 		/// </param>
-		public SortedVIntList(int[] sortedInts):this(sortedInts, sortedInts.Length)
+		public SortedVIntList(params int[] sortedInts):this(sortedInts, sortedInts.Length)
 		{
 		}
 		



Mime
View raw message