public override void PopulateDocumentIndex(IDocumentIndex document, out string description) { document.Add("title", InstanceName).Analyze().Store(); document.Add("meta_title", MetaTitle).Analyze(); document.Add("meta_keywords", MetaKeywords).Analyze(); document.Add("meta_description", MetaDescription).Analyze(); document.Add("body", BodyContent).Analyze().Store(); description = BodyContent; }
public void IsDirtyShouldBeTrueWhenIndexIsModified() { IDocumentIndex doc = _provider.New(1); doc.Add("foo", "value"); Assert.That(doc.IsDirty, Is.True); doc = _provider.New(1); doc.Add("foo", false); Assert.That(doc.IsDirty, Is.True); doc = _provider.New(1); doc.Add("foo", (float)1.0); Assert.That(doc.IsDirty, Is.True); doc = _provider.New(1); doc.Add("foo", 1); Assert.That(doc.IsDirty, Is.True); doc = _provider.New(1); doc.Add("foo", DateTime.Now); Assert.That(doc.IsDirty, Is.True); }