コード例 #1
0
        internal int docIDUpto = -1; // unassigned until applied, and confusing that it's here, when it's just used in BufferedDeletes...

        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="type"> the <see cref="DocValuesFieldUpdatesType"/> </param>
        /// <param name="term"> the <see cref="Term"/> which determines the documents that will be updated </param>
        /// <param name="field"> the <see cref="NumericDocValuesField"/> to update </param>
        /// <param name="value"> the updated value </param>
        protected DocValuesUpdate(DocValuesFieldUpdatesType type, Term term, string field, object value)
        {
            this.type  = type;
            this.term  = term;
            this.field = field;
            this.value = value;
        }
コード例 #2
0
            internal virtual DocValuesFieldUpdates NewUpdates(string field, DocValuesFieldUpdatesType type, int maxDoc)
            {
                switch (type)
                {
                case DocValuesFieldUpdatesType.NUMERIC:
                    NumericDocValuesFieldUpdates numericUpdates;
                    if (Debugging.AssertsEnabled)
                    {
                        Debugging.Assert(!numericDVUpdates.ContainsKey(field));
                    }
                    numericUpdates          = new NumericDocValuesFieldUpdates(field, maxDoc);
                    numericDVUpdates[field] = numericUpdates;
                    return(numericUpdates);

                case DocValuesFieldUpdatesType.BINARY:
                    BinaryDocValuesFieldUpdates binaryUpdates;
                    if (Debugging.AssertsEnabled)
                    {
                        Debugging.Assert(!binaryDVUpdates.ContainsKey(field));
                    }
                    binaryUpdates          = new BinaryDocValuesFieldUpdates(field, maxDoc);
                    binaryDVUpdates[field] = binaryUpdates;
                    return(binaryUpdates);

                default:
                    throw new ArgumentException("unsupported type: " + type);
                }
            }
コード例 #3
0
            internal virtual DocValuesFieldUpdates GetUpdates(string field, DocValuesFieldUpdatesType type)
            {
                switch (type)
                {
                case DocValuesFieldUpdatesType.NUMERIC:
                    NumericDocValuesFieldUpdates num;
                    numericDVUpdates.TryGetValue(field, out num);
                    return(num);

                case DocValuesFieldUpdatesType.BINARY:
                    BinaryDocValuesFieldUpdates bin;
                    binaryDVUpdates.TryGetValue(field, out bin);
                    return(bin);

                default:
                    throw new System.ArgumentException("unsupported type: " + type);
                }
            }
コード例 #4
0
            internal virtual DocValuesFieldUpdates NewUpdates(string field, DocValuesFieldUpdatesType type, int maxDoc)
            {
                switch (type)
                {
                case DocValuesFieldUpdatesType.NUMERIC:
                    NumericDocValuesFieldUpdates numericUpdates;
                    Debug.Assert(!numericDVUpdates.TryGetValue(field, out numericUpdates));
                    numericUpdates          = new NumericDocValuesFieldUpdates(field, maxDoc);
                    numericDVUpdates[field] = numericUpdates;
                    return(numericUpdates);

                case DocValuesFieldUpdatesType.BINARY:
                    BinaryDocValuesFieldUpdates binaryUpdates;
                    Debug.Assert(!binaryDVUpdates.TryGetValue(field, out binaryUpdates));
                    binaryUpdates          = new BinaryDocValuesFieldUpdates(field, maxDoc);
                    binaryDVUpdates[field] = binaryUpdates;
                    return(binaryUpdates);

                default:
                    throw new System.ArgumentException("unsupported type: " + type);
                }
            }
コード例 #5
0
 protected internal DocValuesFieldUpdates(string field, DocValuesFieldUpdatesType type)
 {
     this.field = field;
     this.type  = type;
 }
コード例 #6
0
        internal int docIDUpto = -1; // unassigned until applied, and confusing that it's here, when it's just used in BufferedDeletes...

        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="type"> the <see cref="DocValuesFieldUpdatesType"/> </param>
        /// <param name="term"> the <see cref="Term"/> which determines the documents that will be updated </param>
        /// <param name="field"> the <see cref="NumericDocValuesField"/> to update </param>
        ///// <param name="value"> the updated value </param>
        protected DocValuesUpdate(DocValuesFieldUpdatesType type, Term term, string field) // LUCENENET: Removed value (will be stored in subclasses with the strong type)
        {
            this.type  = type;
            this.term  = term;
            this.field = field;
        }