Elastic Search-Search string having spaces and special characters in it using C#

后端 未结 3 1491
执笔经年
执笔经年 2020-12-19 11:01

I am looking for ElasticSearch nest query which will provide exact match on string having spaces in it using C#.

for example - I want to search for a word like \'XYZ

3条回答
  •  失恋的感觉
    2020-12-19 11:09

    It looks like you just need to refresh the new index following the re-indexing operation.

    Using your code example (and your first term query), I was seeing the same result -- 0 hits.

    Adding the following Refresh call after the reindex.Subscribe() call results in a single hit being returned:

    objElasticClient.Refresh(new RefreshRequest() { });
    

提交回复
热议问题