Buffers up pending byte[]s per doc, deref and sorting via int ord, then flushes when segment flushes.
상속: Lucene.Net.Index.DocValuesWriter
예제 #1
0
        internal void AddSortedSetField(FieldInfo fieldInfo, int docID, BytesRef value)
        {
            SortedSetDocValuesWriter sortedSetWriter;

            if (!writers.TryGetValue(fieldInfo.Name, out DocValuesWriter writer) || writer is null)
            {
                sortedSetWriter         = new SortedSetDocValuesWriter(fieldInfo, bytesUsed);
                writers[fieldInfo.Name] = sortedSetWriter;
            }
            else if (writer is SortedSetDocValuesWriter temp)
            {
                sortedSetWriter = temp;
            }
            else
            {
                throw new ArgumentException($"Incompatible DocValues type: field \"{fieldInfo.Name}\" changed from {GetTypeDesc(writer)} to sorted");
            }
            sortedSetWriter.AddValue(docID, value);
        }
예제 #2
0
        internal void AddSortedSetField(FieldInfo fieldInfo, int docID, BytesRef value)
        {
            DocValuesWriter writer;

            writers.TryGetValue(fieldInfo.Name, out writer);
            SortedSetDocValuesWriter sortedSetWriter;

            if (writer == null)
            {
                sortedSetWriter         = new SortedSetDocValuesWriter(fieldInfo, bytesUsed);
                writers[fieldInfo.Name] = sortedSetWriter;
            }
            else if (!(writer is SortedSetDocValuesWriter))
            {
                throw new System.ArgumentException("Incompatible DocValues type: field \"" + fieldInfo.Name + "\" changed from " + GetTypeDesc(writer) + " to sorted");
            }
            else
            {
                sortedSetWriter = (SortedSetDocValuesWriter)writer;
            }
            sortedSetWriter.AddValue(docID, value);
        }
예제 #3
0
 internal void AddSortedSetField(FieldInfo fieldInfo, int docID, BytesRef value)
 {
     DocValuesWriter writer;
     Writers.TryGetValue(fieldInfo.Name, out writer);
     SortedSetDocValuesWriter sortedSetWriter;
     if (writer == null)
     {
         sortedSetWriter = new SortedSetDocValuesWriter(fieldInfo, BytesUsed);
         Writers[fieldInfo.Name] = sortedSetWriter;
     }
     else if (!(writer is SortedSetDocValuesWriter))
     {
         throw new System.ArgumentException("Incompatible DocValues type: field \"" + fieldInfo.Name + "\" changed from " + GetTypeDesc(writer) + " to sorted");
     }
     else
     {
         sortedSetWriter = (SortedSetDocValuesWriter)writer;
     }
     sortedSetWriter.AddValue(docID, value);
 }