public IndexDocument CreateDocument(ContentItem item) { var d = new IndexDocument(); d.ID = item.ID; d.Tokens["LuceneDocument"] = CreateLuceneDocument(item); return(d); }
public void Update(IndexDocument document) { var doc = (Document)document.Tokens["LuceneDocument"]; foreach (var field in document.Values) { doc.Add(new Field(field.Name, field.Value, field.Stored ? Field.Store.YES : Field.Store.NO, field.Analyzed ? Field.Index.ANALYZED : Field.Index.NO)); } WriteToIndex(document.ID, doc); }
public void Update(IndexDocument document) { }
public void Update(IndexDocument document) { var doc = (Document)document.Tokens["LuceneDocument"]; foreach (var field in document.Values) doc.Add(new Field(field.Name, field.Value, field.Stored ? Field.Store.YES : Field.Store.NO, field.Analyzed ? Field.Index.ANALYZED : Field.Index.NO)); WriteToIndex(document.ID, doc); }
public IndexDocument CreateDocument(ContentItem item) { var d = new IndexDocument(); d.ID = item.ID; d.Tokens["LuceneDocument"] = CreateLuceneDocument(item); return d; }