Thanks for the reply !
I am little confused there.
on the page, it said:
strict : If new fields are detected, an exception is thrown and the document is rejected.
for example, in the following case, my_index dost NOT allow the new fields to be added in if the new fields are not defined in the mapping before.
strict is for defining whether it is allowed to add the new fields; it is not for setting up the value of a field is mandatory, right?
I am asking , how to make sure, in my_index/my_type, user name has to have a value.