Ejemplo n.º 1
0
 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());
 }
Ejemplo n.º 2
0
 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());
 }
Ejemplo n.º 3
0
        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());
        }
Ejemplo n.º 4
0
        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());
        }