In my app, I created custom fields to write the search.
So when other users install my app, custom fields have to be created automatically. Is it possible?
When you create a field it's part of your app automatically. You can verify that by checking etc/apps/local/props.conf. So when you build the app, it should be automatically included and hence will be available for all. Just make sure that the field has enough permissions (sharing) so that others also can use it.