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

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

            writers.TryGetValue(fieldInfo.Name, out writer);
            SortedDocValuesWriter sortedWriter;

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