public void Add(IIndexableItem data, FieldConfig config) { if (null == data) { throw new ArgumentNullException("data"); } Store.Add(JsonMappingUtils.JsonToDocument(data.GetScope(), data.GetId(), data.GetCreatedByUserId(), data.GetCreatedOnDate(), data.GetData(), data.GetSource(), config)); }
/// <summary> /// Deletes the matching objects in the IndexWriter. /// </summary> /// <param name="data"></param> public void Delete(IIndexableItem data) { Requires.NotNull(data); var selection = new TermQuery(new Term(JsonMappingUtils.FIELD_ID, data.GetId())); Query deleteQuery = new FilteredQuery(selection, JsonMappingUtils.GetTypeFilter(data.GetScope())); Store.Delete(deleteQuery); }
/// <summary> /// Deletes the matching objects in the IndexWriter. /// </summary> /// <param name="data"></param> public void Delete(IIndexableItem data) { if (null == data) { throw new ArgumentNullException("data"); } var selection = new TermQuery(new Term(JsonMappingUtils.FieldId, data.GetId())); Query deleteQuery = new FilteredQuery(selection, JsonMappingUtils.GetTypeFilter(data.GetScope())); Store.Delete(deleteQuery); }
public void Add(IIndexableItem data, FieldConfig config) { Requires.NotNull(data); Store.Add(JsonMappingUtils.JsonToDocument(data.GetScope(), data.GetId(), data.GetCreatedByUserId(), data.GetCreatedOnDate(), data.GetData(), data.GetSource(), config)); }