Skip to content

Couln'nt find case_insensitive option in High Level Client Term Query(NEST) #5407

@Sangeetha-Murugesan

Description

@Sangeetha-Murugesan

Hi,
I am using ElasticSearch version 7.11. My TermQuery only returns case-sensitive matching results,to avoid that I set case_insensitive as true in DSL term query like below and it returns data as expected.

{
    "query": {
        "term": {
            "title": {
                "value": "BIG THEORY",
                "case_insensitive": true
            }
        }
    }
}

But when I am trying to implement in code using High Level Client [Nest], could'nt find the option to set case_insensitive as true.

   var searchResults = eClient.Search<Dictionary<string, object>>(s => s
                                 .Index("wss")
                                 .Query(q =>
                                    q.Term(t => t.Field("title").Value("BIG THEORY"))
                                )).Documents.ToList();

In above code how should I set the case_insensitive option as true in Term Query.

Thanks in Advance

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions