Skip to content

Commit

Permalink
add a new Field to Solr Index
Browse files Browse the repository at this point in the history
  • Loading branch information
xinyuexrow committed Oct 6, 2017
1 parent 8705870 commit e954be8
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions classes/ezfSolrDocumentFieldxrowMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ class ezfSolrDocumentFieldxrowMetadata extends ezfSolrDocumentFieldBase
* @var array
*/
public static $subattributesDefinition = array(
self::DEFAULT_SUBATTRIBUTE => 'text',
'description' => 'text',
'title' => 'text'
self::DEFAULT_SUBATTRIBUTE => 'text',
'description' => 'text',
'title' => 'text',
'sitemap_use' => 'text'
);

/**
Expand Down Expand Up @@ -48,8 +49,9 @@ public function getData()
if($this->ContentObjectAttribute->attribute( 'has_content' ))
{
$data[self::getFieldName( $contentClassAttribute, 'title' )] = $this->ContentObjectAttribute->attribute( 'content' )->attribute( 'title' );
$data[self::getFieldName( $contentClassAttribute, 'description' )] = $this->ContentObjectAttribute->attribute( 'content' )->attribute( 'description' );
$data[self::getFieldName( $contentClassAttribute, self::DEFAULT_SUBATTRIBUTE )] = implode(",", $this->ContentObjectAttribute->attribute( 'content' )->attribute( 'keywords' ) );
$data[self::getFieldName( $contentClassAttribute, 'description' )] = $this->ContentObjectAttribute->attribute( 'content' )->attribute( 'description' );
$data[self::getFieldName( $contentClassAttribute, 'sitemap_use' )] = $this->ContentObjectAttribute->attribute( 'content' )->attribute( 'sitemap_use' );
$data[self::getFieldName( $contentClassAttribute, self::DEFAULT_SUBATTRIBUTE )] = implode(",", $this->ContentObjectAttribute->attribute( 'content' )->attribute( 'keywords' ) );
}
return $data;
}
Expand Down

0 comments on commit e954be8

Please sign in to comment.