Skip to content

Commit

Permalink
Rename default field ID to ObjectID
Browse files Browse the repository at this point in the history
  • Loading branch information
marczhermo committed Jun 3, 2019
1 parent 4633142 commit 5c6d77e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Solr/5/templates/schema.ss
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
<fields>
<%-- Default fields, needed for all items --%>
<field name='id' type='string' indexed='true' stored='true' required='true' multiValued='false'/>
<field name='ID' type='tint' indexed='true' stored='true' required='true' multiValued='false'/>
<field name='ClassName' type='string' indexed='true' stored='true' required='true'/>
<field name='ObjectID' type='tint' indexed='true' stored='true' required='true' multiValued='false'/>
<field name='ClassName' type='string' indexed='true' stored='true' required='true' multiValued='false'/>
<field name='ClassHierarchy' type='string' indexed='true' stored='true' required='true' multiValued='true'/>
<field name='ViewStatus' type='string' indexed='true' stored='true' required='true' multiValued='true'/>
<% loop $CopyFields %>
Expand Down
2 changes: 1 addition & 1 deletion src/Factories/DocumentFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function buildItems($class, $fields, $index, $update, $group, &$count = 0
protected function addDefaultFields(Document $doc, DataObject $item)
{
$doc->setKey('id', $item->ClassName . '-' . $item->ID);
$doc->addField('ID', $item->ID);
$doc->addField('ObjectID', $item->ID);
$doc->addField('ClassName', $item->ClassName);
$doc->addField('ClassHierarchy', ClassInfo::ancestry($item));
}
Expand Down

0 comments on commit 5c6d77e

Please sign in to comment.