Does ES has limit of field count when using fields in query?

(Xudong You) #1

I use "fields" to return selected fields in response.

If I the fields numbers is small I can get the fields in response correctly, but if there is many fields in "fields", then some fields will be missing in response.

Example, if I put only two fields:

I can get productTypeID correctly in response. but if I put quite a lot, say 70+ fields, then the productTypeId field is missing in response.

Does ES has limit on the fields count?

(Xudong You) #2

I found the root cause, the reason why some fields are missing is that, those field name has whitespace in front of them.
like " ProductTypeID"

I am thinking whether ES should trim the whitespace automatically in fields?

(system) #3