hoangvu68
hoangvu68

Reputation: 865

NULL or blank in elasticsearch

I am using elasticsearch to make search server. I am having problem. All field in my index is full-text search. I am using n-gram.

But now I need write query search where field_a is null or field_a = blank. But seem missing or exists filter can search null value, they can't search blank value. When I google, I found we can't search blank value with analyzed index.

How can I do it?

Anyway I found a solution is write a script update all field blank in elasticsearch to null. How can I do it? maybe need write a plugin using BeforeBulk...

Upvotes: 0

Views: 229

Answers (1)

Bách Hoàng
Bách Hoàng

Reputation: 36

You have no way to do it. You must set null values.

Upvotes: 2

Related Questions