@Override public boolean hasProperty(String fieldName,String value){
  String[] fields=doc.getValues(fieldName);
  if (fields != null) {
    for (    String field : fields) {
      if (value.equals(field)) {
        return true;
      }
    }
  }
  return false;
}

@ Override public boolean hasProperty ( String fieldName , String value ) { String [ ] fields = doc . getValues ( fieldName ) ; if ( fields != null ) { for ( String field : fields ) { if ( value . equals ( field ) ) { return true ; } } } return false ; }
checks whether a field occurs with a specified value in a document .
