public void SimplAnalyzeDifferentIndexAndField() { //analyze text using a different index and custom analyzer var text = "this is a string with some spaces and stuff"; var analyzer = new AnalyzeParams { Field = "content", Index = ElasticsearchConfiguration.DefaultIndex }; var r = this._client.Analyze(analyzer, text); this._defaultAnalyzeAssertations(r); Assert.False(r.Tokens.Count() == text.Split(new[] { ' ' }).Count()); }
public void SimplAnalyzeDifferentIndex() { //analyze text using a different index and custom analyzer var text = "this is a string with some spaces and stuff"; var analyzer = new AnalyzeParams { Analyzer = "whitespace", Index = Test.Default.DefaultIndex + "_clone" }; var r = this.ConnectedClient.Analyze(analyzer, text); this._defaultAnalyzeAssertations(r); Assert.True(r.Tokens.Count() == text.Split(new[] { ' ' }).Count()); }