diff --git a/Solr/5/extras/elevate.xml b/Solr/5/extras/elevate.xml index d0d6a4e3..0e934fdd 100644 --- a/Solr/5/extras/elevate.xml +++ b/Solr/5/extras/elevate.xml @@ -23,14 +23,14 @@ - - - + + + - - + + diff --git a/Solr/5/extras/solrconfig.xml b/Solr/5/extras/solrconfig.xml index b01b3db7..4386de28 100644 --- a/Solr/5/extras/solrconfig.xml +++ b/Solr/5/extras/solrconfig.xml @@ -810,7 +810,7 @@ explicit 10 - _text + text default - _text + text solr.DirectSolrSpellChecker internal @@ -1307,7 +1307,7 @@ wordbreak solr.WordBreakSolrSpellChecker - _text + text true true 10 @@ -1367,7 +1367,7 @@ --> - _text + text - _text + text true @@ -1551,7 +1551,7 @@ --> - string + text elevate.xml diff --git a/Solr/5/templates/schema.ss b/Solr/5/templates/schema.ss index e62ac030..d07fe627 100644 --- a/Solr/5/templates/schema.ss +++ b/Solr/5/templates/schema.ss @@ -51,8 +51,8 @@ <%-- Default fields, needed for all items --%> - - + + @@ -62,11 +62,9 @@ <% loop $FulltextFieldDefinitions %> <% end_loop %> - <% loop $FilterFieldDefinitions %> <% end_loop %> - @@ -74,7 +72,7 @@ <% end_loop %> - _documentid + id $DefaultField diff --git a/src/Factories/DocumentFactory.php b/src/Factories/DocumentFactory.php index 634dfb33..53202743 100644 --- a/src/Factories/DocumentFactory.php +++ b/src/Factories/DocumentFactory.php @@ -100,7 +100,7 @@ public function buildItems($class, $fields, $index, $update, $group, &$count = 0 */ protected function addDefaultFields(Document $doc, DataObject $item) { - $doc->setKey('_documentid', $item->ClassName . '-' . $item->ID); + $doc->setKey('id', $item->ClassName . '-' . $item->ID); $doc->addField('ID', $item->ID); $doc->addField('ClassName', $item->ClassName); $doc->addField('ClassHierarchy', ClassInfo::ancestry($item)); @@ -115,7 +115,7 @@ protected function addDefaultFields(Document $doc, DataObject $item) protected function addField($doc, $object, $field) { $typeMap = Statics::getTypeMap(); - if (!$this->classIs($object, $field['origin'])) { + if (!$this->classIs(ClassInfo::shortName($object), $field['class'])) { return; } diff --git a/src/Indexes/BaseIndex.php b/src/Indexes/BaseIndex.php index 43a89a15..be0c87f0 100644 --- a/src/Indexes/BaseIndex.php +++ b/src/Indexes/BaseIndex.php @@ -65,14 +65,15 @@ abstract class BaseIndex * @var array */ protected $copyFields = [ - '_text' => [ + 'text' => [ '*' ], ]; /** * @var string */ - protected $defaultField = '_text'; + protected $defaultField = 'text'; + /** * @var SchemaService */