Lucene.Net.Search.FieldComparator.StringOrdValComparator.Convert C# (CSharp) Method

Convert() private method

private Convert ( int slot ) : void
slot int
return void
			private void  Convert(int slot)
			{
				readerGen[slot] = currentReaderGen;
				int index = 0;
				System.String value_Renamed = values[slot];
				if (value_Renamed == null)
				{
					ords[slot] = 0;
					return ;
				}
				
				if (sortPos == 0 && bottomSlot != - 1 && bottomSlot != slot)
				{
					// Since we are the primary sort, the entries in the
					// queue are bounded by bottomOrd:
					System.Diagnostics.Debug.Assert(bottomOrd < lookup.Length);
					if (reversed)
					{
						index = BinarySearch(lookup, value_Renamed, bottomOrd, lookup.Length - 1);
					}
					else
					{
						index = BinarySearch(lookup, value_Renamed, 0, bottomOrd);
					}
				}
				else
				{
					// Full binary search
					index = BinarySearch(lookup, value_Renamed);
				}
				
				if (index < 0)
				{
					index = - index - 2;
				}
				ords[slot] = index;
			}