Added constructor for fieldsearch

added the constructor so the code has less errors.