Пример #1
0
 /// <summary>
 /// Adds the specified field to this document.
 /// </summary>
 /// <param name="field">The field to add.</param>
 public void Add(FieldAbstract field)
 {
     if (field == null)
     {
         throw new ArgumentNullException("field", "field cannot be null");
     }
     this.luceneDoc.Add(field.GetLuceneField());
 }
Пример #2
0
        /// <summary>
        /// Determines whether the specified <see cref="System.Object"/> is equal to this instance.
        /// </summary>
        /// <param name="obj">The <see cref="System.Object"/> to compare with this instance.</param>
        /// <returns>
        ///   <c>true</c> if the specified <see cref="System.Object"/> is equal to this instance; otherwise, <c>false</c>.
        /// </returns>
        public override bool Equals(object obj)
        {
            if (obj == null || obj.GetType() != typeof(FieldAbstract))
            {
                return(false);
            }
            FieldAbstract temp = (FieldAbstract)obj;

            return(temp.FieldName == this.FieldName && temp.FieldValue == this.FieldValue && temp.Boost == this.Boost && temp.isStored == this.isStored);
        }
Пример #3
0
 /// <summary>
 /// Adds the specified field to this document. 
 /// </summary>
 /// <param name="field">The field to add.</param>
 public void Add(FieldAbstract field)
 {
     if (field == null)
         throw new ArgumentNullException("field", "field cannot be null");
     this.luceneDoc.Add(field.GetLuceneField());
 }