/// <summary> /// Adds a new occurrence of the term. The occurrence /// information (field and position) will be added /// to an existing Posting object whenever possible. /// </summary> /// <param name="record">the record where the term was found</param> /// <param name="field">the field where the term was found</param> /// <param name="position">the position in the field where the term was found</param> public void Add(IRecord record, IndexedField field, int position) { Posting posting = _postings[record] as Posting; if (null == posting) { posting = new Posting(record); _postings[record] = posting; } posting.Occurrences.Add(field, position); }