0

I have the following analyzer set up in my Elasticsearch 1.7.1 database:

{
   "settings" : {
            "analysis" : {
                "analyzer" : {
                    "my_whitespace_analyzer" : {
                        "tokenizer" : "my_whitespace_tokenizer",
                        "filter" : ["whitespace"]
                    }
                },
                "tokenizer" : {
                    "my_whitespace_tokenizer" : {
                        "type" : "standard",
                        "token_chars": [ "letter" , "digit" , "whitespace" , "symbol" ]
                    }
                }
            }
        }
    }

This means that whenever I search for a phrase that contains two or more words, it will seperate them to each word seperately, and the entire phrase. IE: "Hello world" will be tokenized as "Hello" , "world" , and "Hello world".

Now, when I search this, lets say the Elasticsearch cluster doesn't find the entire phrase completely, but only a part of it, like "Hello". Is there anyway in Elasticsearch.net for to get what phrase specificaly was found?

Rob
  • 9,664
  • 3
  • 41
  • 43
  • Do you mean [Posting highlighter](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-highlighting.html#postings-highlighter)? It will highlight the matched terms and gives you back the sentence, in which the match occured. – Michael Stockerl Apr 05 '16 at 12:10
  • Can I use that in Elasticsearch.net in order to get the result as a string to pass on to another function? If so how? – Eden Ben Shahar Apr 05 '16 at 12:50
  • I don't understand what you are trying to achieve. :/ Do you want to use the result within elasticsearch request or in your application? – Michael Stockerl Apr 06 '16 at 04:12

0 Answers0