public function getSolrFieldName($field, $classNames = null) {
		if (!$classNames) {
			$classNames = Config::inst()->get('SolrSearch', 'default_searchable_types');
		}
		if (!is_array($classNames)) {
			$classNames = array($classNames);
		}

		foreach ($classNames as $className) {
			if (!class_exists($className)) {
				continue;
			}
			$dummy = singleton($className);
			$fields = $this->objectToFields($dummy);
			if ($field == 'ID') {
				$field = 'SS_ID';
			}
			if (isset($fields[$field])) {
				$configForType = $this->getSearchableFieldsFor($className);
				$hint = isset($configForType[$field]) ? $configForType[$field] : false;
				return $this->mapper->mapFieldNameFromType($field, $fields[$field]['Type'], $hint);
			}
		}
	}
public function getSolrFieldName($field, $classNames = null) {
		if (!$classNames) {
			$classNames = Config::inst()->get('SolrSearch', 'default_searchable_types');
		}
		if (!is_array($classNames)) {
			$classNames = array($classNames);
		}

		foreach ($classNames as $className) {
			if (!class_exists($className)) {
				continue;
			}
			$dummy = singleton($className);
			$fields = $this->objectToFields($dummy);
			if ($field == 'ID') {
				$field = 'SS_ID';
			}
			if (isset($fields[$field])) {
				$configForType = $this->getSearchableFieldsFor($className);
				$hint = isset($configForType[$field]) ? $configForType[$field] : false;
				return $this->mapper->mapFieldNameFromType($field, $fields[$field]['Type'], $hint);
			}
		}
	}
public function getSolrFieldName ( $ field , $ classNames = null ) { if ( ! $ classNames ) { $ classNames = Config :: inst ( ) -> get ( 'SolrSearch' , 'default_searchable_types' ) ; } if ( ! is_array ( $ classNames ) ) { $ classNames = array ( $ classNames ) ; } foreach ( $ classNames as $ className ) { if ( ! class_exists ( $ className ) ) { continue ; } $ dummy = singleton ( $ className ) ; $ fields = $ this -> objectToFields ( $ dummy ) ; if ( $ field == 'ID' ) { $ field = 'SS_ID' ; } if ( isset ( $ fields [ $ field ] ) ) { $ configForType = $ this -> getSearchableFieldsFor ( $ className ) ; $ hint = isset ( $ configForType [ $ field ] ) ? $ configForType [ $ field ] : false ; return $ this -> mapper -> mapFieldNameFromType ( $ field , $ fields [ $ field ] [ 'Type' ] , $ hint ) ; } } }
Return the field name for a given property within a given set of data object types

First matching data object with that field is used

@param String $field
The field name to get the Solr type for.
@param String $classNames
A list of data object class name.

@return String
Return the field name for a given property within a given set of data object types