eZPublishCommunityProject  2012.12
eZ\Publish\Core\Persistence\Solr\Content\Search\FieldNameGenerator Class Reference

Generator for Solr field names. More...

Public Member Functions

 getName ($name, $field=null, $type=null)
 Get name for Solr document field. More...
 
 getTypedName ($name, FieldType $type)
 Map field type. More...
 

Protected Attributes

 $fieldNameMapping
 

Detailed Description

Generator for Solr field names.

Member Function Documentation

eZ\Publish\Core\Persistence\Solr\Content\Search\FieldNameGenerator::getName (   $name,
  $field = null,
  $type = null 
)

Get name for Solr document field.

Consists of a name, and optionally field anem and a content type name.

Parameters
string$name
string$field
string$type
Returns
string
eZ\Publish\Core\Persistence\Solr\Content\Search\FieldNameGenerator::getTypedName (   $name,
FieldType  $type 
)

Map field type.

For Solr indexing the following scheme will always be used for names: {name}_{type}.

Using dynamic fields this allows to define fields either depending on types, or names.

Only the field with the name ID remains untouched.

Parameters
string$name
FieldType$type
Returns
string

Member Data Documentation

eZ\Publish\Core\Persistence\Solr\Content\Search\FieldNameGenerator::$fieldNameMapping
protected
Initial value:
= array(
"ez_integer" => "i",
"ez_id" => "id",
"ez_string" => "s",
"ez_long" => "l",
"ez_text" => "t",
"ez_html" => "h",
"ez_boolean" => "b",
"ez_float" => "f",
"ez_double" => "d",
"ez_date" => "dt",
"ez_point" => "p",
"ez_currency" => "c",
)

The documentation for this class was generated from the following file: