public void TestInMemory() { var m = new NSMutableData(); var idx = SKIndex.CreateWithMutableData(m, "indexName", SKIndexType.Inverted, null); Assert.NotNull(idx); idx.AddDocumentWithText(new SKDocument(new NSUrl("file:///etc/passwd")), "These are the contents of the passwd file, well, not really", true); idx.Flush(); idx.Compact(); idx.Close(); idx = SKIndex.FromMutableData(m, "indexName"); Assert.NotNull(idx); idx.Close(); }
public void TestTextAnalysis() { var m = new NSMutableData(); var properties = new SKTextAnalysis() { StartTermChars = "", EndTermChars = "", TermChars = "\"-_@.'", MinTermLength = 3, StopWords = new NSSet("all", "and", "its", "it's", "the") }; var idx = SKIndex.CreateWithMutableData(m, "indexName", SKIndexType.Inverted, properties); Assert.NotNull(idx); }