i have a field and its type is ip but the problem is that i want to specify its type keyword and ip
I very field has to have one distinct mapping, so in order to do what you describe you will need to use multi field in your mapping or index template.