external/aws/src/main/java/com/digitalpebble/stormcrawler/aws/bolt/CloudSearchUtils.java
public static String cleanFieldName(String name) {
        String lowercase = name.toLowerCase();
        lowercase = lowercase.replaceAll("[^a-z_0-9]", "_");
        if (lowercase.length() < 3 || lowercase.length() > 64)
            throw new RuntimeException(
                    "Field name must be between 3 and 64 chars : " + lowercase);
        if (lowercase.equals("score"))
            throw new RuntimeException("Field name must be score");
        return lowercase;
    }
public static String cleanFieldName(String name) {
        String lowercase = name.toLowerCase();
        lowercase = lowercase.replaceAll("[^a-z_0-9]", "_");
        if (lowercase.length() < 3 || lowercase.length() > 64)
            throw new RuntimeException(
                    "Field name must be between 3 and 64 chars : " + lowercase);
        if (lowercase.equals("score"))
            throw new RuntimeException("Field name must be score");
        return lowercase;
    }
public static String cleanFieldName ( String name ) { String lowercase = name . toLowerCase ( ) ; lowercase = lowercase . replaceAll ( "[^a-z_0-9]" , "_" ) ; if ( lowercase . length ( ) < 3 || lowercase . length ( ) > 64 ) throw new RuntimeException ( "Field name must be between 3 and 64 chars : " + lowercase ) ; if ( lowercase . equals ( "score" ) ) throw new RuntimeException ( "Field name must be score" ) ; return lowercase ; }
Remove the non-cloudSearch-legal characters. Note that this might convert
two fields to the same name.

@see <a
href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-index-fields.html">
configuring-index-fields.html</a>
@param name
@return
Remove the non - cloudSearch - legal characters . Note that this might convert two fields to the same name .