@@ -96,20 +96,20 @@ |
||
| 96 | 96 | foreach ($collections as $collection) { |
| 97 | 97 | $solr_query = ''; |
| 98 | 98 | if ($collection->getIndexSearch() != '') { |
| 99 | - $solr_query .= '(' . $collection->getIndexSearch() . ')'; |
|
| 99 | + $solr_query .= '('.$collection->getIndexSearch().')'; |
|
| 100 | 100 | } else { |
| 101 | - $solr_query .= 'collection:("' . Solr::escapeQuery($collection->getIndexName()) . '")'; |
|
| 101 | + $solr_query .= 'collection:("'.Solr::escapeQuery($collection->getIndexName()).'")'; |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | // virtual collection might yield documents, that are not toplevel true or partof anything |
| 105 | 105 | if ($collection->getIndexSearch()) { |
| 106 | 106 | $params['query'] = $solr_query; |
| 107 | 107 | } else { |
| 108 | - $params['query'] = $solr_query . ' AND partof:0 AND toplevel:true'; |
|
| 108 | + $params['query'] = $solr_query.' AND partof:0 AND toplevel:true'; |
|
| 109 | 109 | } |
| 110 | 110 | $partOfNothing = $solr->search_raw($params); |
| 111 | 111 | |
| 112 | - $params['query'] = $solr_query . ' AND NOT partof:0 AND toplevel:true'; |
|
| 112 | + $params['query'] = $solr_query.' AND NOT partof:0 AND toplevel:true'; |
|
| 113 | 113 | $partOfSomething = $solr->search_raw($params); |
| 114 | 114 | // Titles are all documents that are "root" elements i.e. partof == 0 |
| 115 | 115 | $collectionInfo['titles'] = []; |
@@ -108,13 +108,13 @@ discard block |
||
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | // sanitize date search input |
| 111 | - if(empty($this->searchParams['dateFrom']) && !empty($this->searchParams['dateTo'])) { |
|
| 111 | + if (empty($this->searchParams['dateFrom']) && !empty($this->searchParams['dateTo'])) { |
|
| 112 | 112 | $this->searchParams['dateFrom'] = '*'; |
| 113 | 113 | } |
| 114 | - if(empty($this->searchParams['dateTo']) && !empty($this->searchParams['dateFrom'])) { |
|
| 114 | + if (empty($this->searchParams['dateTo']) && !empty($this->searchParams['dateFrom'])) { |
|
| 115 | 115 | $this->searchParams['dateTo'] = 'NOW'; |
| 116 | 116 | } |
| 117 | - if($this->searchParams['dateFrom'] > $this->searchParams['dateTo']) { |
|
| 117 | + if ($this->searchParams['dateFrom'] > $this->searchParams['dateTo']) { |
|
| 118 | 118 | $tmpDate = $this->searchParams['dateFrom']; |
| 119 | 119 | $this->searchParams['dateFrom'] = $this->searchParams['dateTo']; |
| 120 | 120 | $this->searchParams['dateTo'] = $tmpDate; |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | |
| 176 | 176 | // Add uHash parameter to suggest parameter to make a basic protection of this form. |
| 177 | 177 | if ($this->settings['suggest']) { |
| 178 | - $this->view->assign('uHash', GeneralUtility::hmac((string) (new Typo3Version()) . Environment::getExtensionsPath(), 'SearchSuggest')); |
|
| 178 | + $this->view->assign('uHash', GeneralUtility::hmac((string) (new Typo3Version()).Environment::getExtensionsPath(), 'SearchSuggest')); |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | $this->view->assign('viewData', $this->viewData); |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | // Get facets from plugin configuration. |
| 199 | 199 | $facets = []; |
| 200 | 200 | foreach (GeneralUtility::trimExplode(',', $this->settings['facets'], true) as $facet) { |
| 201 | - $facets[$facet . '_faceting'] = Helper::translate($facet, 'tx_dlf_metadata', $this->settings['storagePid']); |
|
| 201 | + $facets[$facet.'_faceting'] = Helper::translate($facet, 'tx_dlf_metadata', $this->settings['storagePid']); |
|
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | $this->view->assign('facetsMenu', $this->makeFacetsMenuArray($facets)); |
@@ -240,13 +240,13 @@ discard block |
||
| 240 | 240 | $searchParams = $this->searchParams; |
| 241 | 241 | if ( |
| 242 | 242 | (!empty($searchParams['fulltext'])) |
| 243 | - || preg_match('/' . $fields['fulltext'] . ':\((.*)\)/', trim($searchParams['query']), $matches) |
|
| 243 | + || preg_match('/'.$fields['fulltext'].':\((.*)\)/', trim($searchParams['query']), $matches) |
|
| 244 | 244 | ) { |
| 245 | 245 | // If the query already is a fulltext query e.g using the facets |
| 246 | 246 | $searchParams['query'] = empty($matches[1]) ? $searchParams['query'] : $matches[1]; |
| 247 | 247 | // Search in fulltext field if applicable. Query must not be empty! |
| 248 | 248 | if (!empty($this->searchParams['query'])) { |
| 249 | - $search['query'] = $fields['fulltext'] . ':(' . Solr::escapeQuery(trim($searchParams['query'])) . ')'; |
|
| 249 | + $search['query'] = $fields['fulltext'].':('.Solr::escapeQuery(trim($searchParams['query'])).')'; |
|
| 250 | 250 | } |
| 251 | 251 | } else { |
| 252 | 252 | // Retain given search field if valid. |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | // extract collections from collection parameter |
| 260 | 260 | $collection = null; |
| 261 | 261 | if ($this->searchParams['collection']) { |
| 262 | - foreach(explode(',', $this->searchParams['collection']) as $collectionEntry) { |
|
| 262 | + foreach (explode(',', $this->searchParams['collection']) as $collectionEntry) { |
|
| 263 | 263 | $collection[] = $this->collectionRepository->findByUid($collectionEntry); |
| 264 | 264 | } |
| 265 | 265 | |
@@ -269,26 +269,26 @@ discard block |
||
| 269 | 269 | $virtualCollectionsQueryString = ''; |
| 270 | 270 | foreach ($collection as $collectionEntry) { |
| 271 | 271 | // check for virtual collections query string |
| 272 | - if($collectionEntry->getIndexSearch()) { |
|
| 273 | - $virtualCollectionsQueryString .= empty($virtualCollectionsQueryString) ? '(' . $collectionEntry->getIndexSearch() . ')' : ' OR ('. $collectionEntry->getIndexSearch() . ')' ; |
|
| 272 | + if ($collectionEntry->getIndexSearch()) { |
|
| 273 | + $virtualCollectionsQueryString .= empty($virtualCollectionsQueryString) ? '('.$collectionEntry->getIndexSearch().')' : ' OR ('.$collectionEntry->getIndexSearch().')'; |
|
| 274 | 274 | } |
| 275 | 275 | else { |
| 276 | - $collectionsQueryString .= empty($collectionsQueryString) ? '"' . $collectionEntry->getIndexName() . '"' : ' OR "' . $collectionEntry->getIndexName() . '"'; |
|
| 276 | + $collectionsQueryString .= empty($collectionsQueryString) ? '"'.$collectionEntry->getIndexName().'"' : ' OR "'.$collectionEntry->getIndexName().'"'; |
|
| 277 | 277 | } |
| 278 | 278 | } |
| 279 | 279 | |
| 280 | 280 | // distinguish between simple collection browsing and actual searching within the collection(s) |
| 281 | - if(!empty($collectionsQueryString)) { |
|
| 282 | - if(empty($searchParams['query'])) { |
|
| 283 | - $collectionsQueryString = '(collection_faceting:(' . $collectionsQueryString . ') AND toplevel:true AND partof:0)'; |
|
| 281 | + if (!empty($collectionsQueryString)) { |
|
| 282 | + if (empty($searchParams['query'])) { |
|
| 283 | + $collectionsQueryString = '(collection_faceting:('.$collectionsQueryString.') AND toplevel:true AND partof:0)'; |
|
| 284 | 284 | } else { |
| 285 | - $collectionsQueryString = '(collection_faceting:(' . $collectionsQueryString . '))'; |
|
| 285 | + $collectionsQueryString = '(collection_faceting:('.$collectionsQueryString.'))'; |
|
| 286 | 286 | } |
| 287 | 287 | } |
| 288 | 288 | |
| 289 | 289 | // virtual collections might query documents that are neither toplevel:true nor partof:0 and need to be searched separatly |
| 290 | - if(!empty($virtualCollectionsQueryString)) { |
|
| 291 | - $virtualCollectionsQueryString = '(' . $virtualCollectionsQueryString . ')'; |
|
| 290 | + if (!empty($virtualCollectionsQueryString)) { |
|
| 291 | + $virtualCollectionsQueryString = '('.$virtualCollectionsQueryString.')'; |
|
| 292 | 292 | } |
| 293 | 293 | |
| 294 | 294 | // combine both querystrings into a single filterquery via OR if both are given, otherwise pass either of those |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | // add filter query for date search |
| 299 | 299 | if (!empty($this->searchParams['dateFrom']) && !empty($this->searchParams['dateTo'])) { |
| 300 | 300 | // combine dateFrom and dateTo into filterquery as range search |
| 301 | - $search['params']['filterquery'][]['query'] = '{!join from=' . $fields['uid'] . ' to=' . $fields['uid'] . '}' . $fields['date'] . ':[' . $this->searchParams['dateFrom'] . ' TO ' . $this->searchParams['dateTo'] . ']'; |
|
| 301 | + $search['params']['filterquery'][]['query'] = '{!join from='.$fields['uid'].' to='.$fields['uid'].'}'.$fields['date'].':['.$this->searchParams['dateFrom'].' TO '.$this->searchParams['dateTo'].']'; |
|
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | // Add extended search query. |
@@ -316,9 +316,9 @@ discard block |
||
| 316 | 316 | in_array($searchParams['extOperator'][$i], $allowedOperators) |
| 317 | 317 | ) { |
| 318 | 318 | if (!empty($search['query'])) { |
| 319 | - $search['query'] .= ' ' . $searchParams['extOperator'][$i] . ' '; |
|
| 319 | + $search['query'] .= ' '.$searchParams['extOperator'][$i].' '; |
|
| 320 | 320 | } |
| 321 | - $search['query'] .= Indexer::getIndexFieldName($searchParams['extField'][$i], $this->settings['storagePid']) . ':(' . Solr::escapeQuery($searchParams['extQuery'][$i]) . ')'; |
|
| 321 | + $search['query'] .= Indexer::getIndexFieldName($searchParams['extField'][$i], $this->settings['storagePid']).':('.Solr::escapeQuery($searchParams['extQuery'][$i]).')'; |
|
| 322 | 322 | } |
| 323 | 323 | } |
| 324 | 324 | } |
@@ -444,7 +444,7 @@ discard block |
||
| 444 | 444 | $entryArray['doNotLinkIt'] = 0; |
| 445 | 445 | // Check if facet is already selected. |
| 446 | 446 | $queryColumn = array_column($search['params']['filterquery'], 'query'); |
| 447 | - $index = array_search($field . ':("' . Solr::escapeQuery($value) . '")', $queryColumn); |
|
| 447 | + $index = array_search($field.':("'.Solr::escapeQuery($value).'")', $queryColumn); |
|
| 448 | 448 | if ($index !== false) { |
| 449 | 449 | // Facet is selected, thus remove it from filter. |
| 450 | 450 | unset($queryColumn[$index]); |
@@ -458,7 +458,7 @@ discard block |
||
| 458 | 458 | } |
| 459 | 459 | } else { |
| 460 | 460 | // Facet is not selected, thus add it to filter. |
| 461 | - $queryColumn[] = $field . ':("' . Solr::escapeQuery($value) . '")'; |
|
| 461 | + $queryColumn[] = $field.':("'.Solr::escapeQuery($value).'")'; |
|
| 462 | 462 | $entryArray['ITEM_STATE'] = 'NO'; |
| 463 | 463 | } |
| 464 | 464 | $entryArray['queryColumn'] = $queryColumn; |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | // extract collection(s) from collection parameter |
| 76 | 76 | $collection = null; |
| 77 | 77 | if ($this->searchParams['collection']) { |
| 78 | - foreach(explode(',', $this->searchParams['collection']) as $collectionEntry) { |
|
| 78 | + foreach (explode(',', $this->searchParams['collection']) as $collectionEntry) { |
|
| 79 | 79 | $collection[] = $this->collectionRepository->findByUid($collectionEntry); |
| 80 | 80 | } |
| 81 | 81 | } |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | // in which case metadata of toplevel entry isn't yet filled. |
| 99 | 99 | if (empty($document['metadata'])) { |
| 100 | 100 | $document['metadata'] = $this->fetchToplevelMetadataFromSolr([ |
| 101 | - 'query' => 'uid:' . $document['uid'], |
|
| 101 | + 'query' => 'uid:'.$document['uid'], |
|
| 102 | 102 | 'start' => 0, |
| 103 | 103 | 'rows' => 1, |
| 104 | 104 | 'sort' => ['score' => 'desc'], |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | if (empty($document['title']) && $document['partOf'] > 0) { |
| 110 | 110 | $superiorTitle = Doc::getTitle($document['partOf'], true); |
| 111 | 111 | if (!empty($superiorTitle)) { |
| 112 | - $document['title'] = '[' . $superiorTitle . ']'; |
|
| 112 | + $document['title'] = '['.$superiorTitle.']'; |
|
| 113 | 113 | } |
| 114 | 114 | } |
| 115 | 115 | } |
@@ -172,13 +172,13 @@ discard block |
||
| 172 | 172 | // Set search query. |
| 173 | 173 | if ( |
| 174 | 174 | (!empty($this->searchParams['fulltext'])) |
| 175 | - || preg_match('/' . $fields['fulltext'] . ':\((.*)\)/', trim($this->searchParams['query']), $matches) |
|
| 175 | + || preg_match('/'.$fields['fulltext'].':\((.*)\)/', trim($this->searchParams['query']), $matches) |
|
| 176 | 176 | ) { |
| 177 | 177 | // If the query already is a fulltext query e.g using the facets |
| 178 | 178 | $this->searchParams['query'] = empty($matches[1]) ? $this->searchParams['query'] : $matches[1]; |
| 179 | 179 | // Search in fulltext field if applicable. Query must not be empty! |
| 180 | 180 | if (!empty($this->searchParams['query'])) { |
| 181 | - $query = $fields['fulltext'] . ':(' . Solr::escapeQuery(trim($this->searchParams['query'])) . ')'; |
|
| 181 | + $query = $fields['fulltext'].':('.Solr::escapeQuery(trim($this->searchParams['query'])).')'; |
|
| 182 | 182 | } |
| 183 | 183 | $params['fulltext'] = true; |
| 184 | 184 | } else { |
@@ -201,9 +201,9 @@ discard block |
||
| 201 | 201 | in_array($this->searchParams['extOperator'][$i], $allowedOperators) |
| 202 | 202 | ) { |
| 203 | 203 | if (!empty($query)) { |
| 204 | - $query .= ' ' . $this->searchParams['extOperator'][$i] . ' '; |
|
| 204 | + $query .= ' '.$this->searchParams['extOperator'][$i].' '; |
|
| 205 | 205 | } |
| 206 | - $query .= Indexer::getIndexFieldName($this->searchParams['extField'][$i], $this->settings['storagePid']) . ':(' . Solr::escapeQuery($this->searchParams['extQuery'][$i]) . ')'; |
|
| 206 | + $query .= Indexer::getIndexFieldName($this->searchParams['extField'][$i], $this->settings['storagePid']).':('.Solr::escapeQuery($this->searchParams['extQuery'][$i]).')'; |
|
| 207 | 207 | } |
| 208 | 208 | } |
| 209 | 209 | } |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | // Add filter query for date search |
| 213 | 213 | if (!empty($this->searchParams['dateFrom']) && !empty($this->searchParams['dateTo'])) { |
| 214 | 214 | // combine dateFrom and dateTo into range search |
| 215 | - $params['filterquery'][]['query'] = '{!join from=' . $fields['uid'] . ' to=' . $fields['uid'] . '}'. $fields['date'] . ':[' . $this->searchParams['dateFrom'] . ' TO ' . $this->searchParams['dateTo'] . ']'; |
|
| 215 | + $params['filterquery'][]['query'] = '{!join from='.$fields['uid'].' to='.$fields['uid'].'}'.$fields['date'].':['.$this->searchParams['dateFrom'].' TO '.$this->searchParams['dateTo'].']'; |
|
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | // Add filter query for faceting. |
@@ -229,12 +229,12 @@ discard block |
||
| 229 | 229 | ) { |
| 230 | 230 | // Search in document and all subordinates (valid for up to three levels of hierarchy). |
| 231 | 231 | $params['filterquery'][]['query'] = '_query_:"{!join from=' |
| 232 | - . $fields['uid'] . ' to=' . $fields['partof'] . '}' |
|
| 233 | - . $fields['uid'] . ':{!join from=' . $fields['uid'] . ' to=' . $fields['partof'] . '}' |
|
| 234 | - . $fields['uid'] . ':' . $this->searchParams['documentId'] . '"' . ' OR {!join from=' |
|
| 235 | - . $fields['uid'] . ' to=' . $fields['partof'] . '}' |
|
| 236 | - . $fields['uid'] . ':' . $this->searchParams['documentId'] . ' OR ' |
|
| 237 | - . $fields['uid'] . ':' . $this->searchParams['documentId']; |
|
| 232 | + . $fields['uid'].' to='.$fields['partof'].'}' |
|
| 233 | + . $fields['uid'].':{!join from='.$fields['uid'].' to='.$fields['partof'].'}' |
|
| 234 | + . $fields['uid'].':'.$this->searchParams['documentId'].'"'.' OR {!join from=' |
|
| 235 | + . $fields['uid'].' to='.$fields['partof'].'}' |
|
| 236 | + . $fields['uid'].':'.$this->searchParams['documentId'].' OR ' |
|
| 237 | + . $fields['uid'].':'.$this->searchParams['documentId']; |
|
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | // if collections are given, we prepare the collection query string |
@@ -243,25 +243,25 @@ discard block |
||
| 243 | 243 | $virtualCollectionsQueryString = ''; |
| 244 | 244 | foreach ($this->collection as $collectionEntry) { |
| 245 | 245 | // check for virtual collections query string |
| 246 | - if($collectionEntry->getIndexSearch()) { |
|
| 247 | - $virtualCollectionsQueryString .= empty($virtualCollectionsQueryString) ? '(' . $collectionEntry->getIndexSearch() . ')' : ' OR ('. $collectionEntry->getIndexSearch() . ')' ; |
|
| 246 | + if ($collectionEntry->getIndexSearch()) { |
|
| 247 | + $virtualCollectionsQueryString .= empty($virtualCollectionsQueryString) ? '('.$collectionEntry->getIndexSearch().')' : ' OR ('.$collectionEntry->getIndexSearch().')'; |
|
| 248 | 248 | } else { |
| 249 | - $collectionsQueryString .= empty($collectionsQueryString) ? '"' . $collectionEntry->getIndexName() . '"' : ' OR "' . $collectionEntry->getIndexName() . '"'; |
|
| 249 | + $collectionsQueryString .= empty($collectionsQueryString) ? '"'.$collectionEntry->getIndexName().'"' : ' OR "'.$collectionEntry->getIndexName().'"'; |
|
| 250 | 250 | } |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | // distinguish between simple collection browsing and actual searching within the collection(s) |
| 254 | - if(!empty($collectionsQueryString)) { |
|
| 255 | - if(empty($query)) { |
|
| 256 | - $collectionsQueryString = '(collection_faceting:(' . $collectionsQueryString . ') AND toplevel:true AND partof:0)'; |
|
| 254 | + if (!empty($collectionsQueryString)) { |
|
| 255 | + if (empty($query)) { |
|
| 256 | + $collectionsQueryString = '(collection_faceting:('.$collectionsQueryString.') AND toplevel:true AND partof:0)'; |
|
| 257 | 257 | } else { |
| 258 | - $collectionsQueryString = '(collection_faceting:(' . $collectionsQueryString . '))'; |
|
| 258 | + $collectionsQueryString = '(collection_faceting:('.$collectionsQueryString.'))'; |
|
| 259 | 259 | } |
| 260 | 260 | } |
| 261 | 261 | |
| 262 | 262 | // virtual collections might query documents that are neither toplevel:true nor partof:0 and need to be searched separatly |
| 263 | - if(!empty($virtualCollectionsQueryString)) { |
|
| 264 | - $virtualCollectionsQueryString = '(' . $virtualCollectionsQueryString . ')'; |
|
| 263 | + if (!empty($virtualCollectionsQueryString)) { |
|
| 264 | + $virtualCollectionsQueryString = '('.$virtualCollectionsQueryString.')'; |
|
| 265 | 265 | } |
| 266 | 266 | |
| 267 | 267 | // combine both querystrings into a single filterquery via OR if both are given, otherwise pass either of those |
@@ -294,8 +294,8 @@ discard block |
||
| 294 | 294 | if ($this->listedMetadata) { |
| 295 | 295 | foreach ($this->listedMetadata as $metadata) { |
| 296 | 296 | if ($metadata->getIndexStored() || $metadata->getIndexIndexed()) { |
| 297 | - $listMetadataRecord = $metadata->getIndexName() . '_' . ($metadata->getIndexTokenized() ? 't' : 'u') . ($metadata->getIndexStored() ? 's' : 'u') . ($metadata->getIndexIndexed() ? 'i' : 'u'); |
|
| 298 | - $params['fields'] .= ',' . $listMetadataRecord; |
|
| 297 | + $listMetadataRecord = $metadata->getIndexName().'_'.($metadata->getIndexTokenized() ? 't' : 'u').($metadata->getIndexStored() ? 's' : 'u').($metadata->getIndexIndexed() ? 'i' : 'u'); |
|
| 298 | + $params['fields'] .= ','.$listMetadataRecord; |
|
| 299 | 299 | $params['listMetadataRecords'][$metadata->getIndexName()] = $listMetadataRecord; |
| 300 | 300 | } |
| 301 | 301 | } |
@@ -339,8 +339,8 @@ discard block |
||
| 339 | 339 | } |
| 340 | 340 | if ($documents[$doc['uid']]) { |
| 341 | 341 | // translate language code if applicable |
| 342 | - if($doc['metadata']['language']) { |
|
| 343 | - foreach($doc['metadata']['language'] as $indexName => $language) { |
|
| 342 | + if ($doc['metadata']['language']) { |
|
| 343 | + foreach ($doc['metadata']['language'] as $indexName => $language) { |
|
| 344 | 344 | $doc['metadata']['language'][$indexName] = Helper::getLanguageName($doc['metadata']['language'][$indexName]); |
| 345 | 345 | } |
| 346 | 346 | } |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | $children = $childrenOf[$doc['uid']] ?? []; |
| 380 | 380 | if (!empty($children)) { |
| 381 | 381 | $metadataOf = $this->fetchToplevelMetadataFromSolr([ |
| 382 | - 'query' => 'partof:' . $doc['uid'], |
|
| 382 | + 'query' => 'partof:'.$doc['uid'], |
|
| 383 | 383 | 'start' => 0, |
| 384 | 384 | 'rows' => 100, |
| 385 | 385 | ]); |
@@ -426,8 +426,8 @@ discard block |
||
| 426 | 426 | if ($this->listedMetadata) { |
| 427 | 427 | foreach ($this->listedMetadata as $metadata) { |
| 428 | 428 | if ($metadata->getIndexStored() || $metadata->getIndexIndexed()) { |
| 429 | - $listMetadataRecord = $metadata->getIndexName() . '_' . ($metadata->getIndexTokenized() ? 't' : 'u') . ($metadata->getIndexStored() ? 's' : 'u') . ($metadata->getIndexIndexed() ? 'i' : 'u'); |
|
| 430 | - $params['fields'] .= ',' . $listMetadataRecord; |
|
| 429 | + $listMetadataRecord = $metadata->getIndexName().'_'.($metadata->getIndexTokenized() ? 't' : 'u').($metadata->getIndexStored() ? 's' : 'u').($metadata->getIndexIndexed() ? 'i' : 'u'); |
|
| 430 | + $params['fields'] .= ','.$listMetadataRecord; |
|
| 431 | 431 | $params['listMetadataRecords'][$metadata->getIndexName()] = $listMetadataRecord; |
| 432 | 432 | } |
| 433 | 433 | } |
@@ -440,8 +440,8 @@ discard block |
||
| 440 | 440 | |
| 441 | 441 | foreach ($result['documents'] as $doc) { |
| 442 | 442 | // translate language code if applicable |
| 443 | - if($doc['metadata']['language']) { |
|
| 444 | - foreach($doc['metadata']['language'] as $indexName => $language) { |
|
| 443 | + if ($doc['metadata']['language']) { |
|
| 444 | + foreach ($doc['metadata']['language'] as $indexName => $language) { |
|
| 445 | 445 | $doc['metadata']['language'][$indexName] = Helper::getLanguageName($doc['metadata']['language'][$indexName]); |
| 446 | 446 | } |
| 447 | 447 | } |
@@ -483,7 +483,7 @@ discard block |
||
| 483 | 483 | $cache = null; |
| 484 | 484 | // Calculate cache identifier. |
| 485 | 485 | if ($enableCache === true) { |
| 486 | - $cacheIdentifier = Helper::digest($solr->core . print_r($parameters, true)); |
|
| 486 | + $cacheIdentifier = Helper::digest($solr->core.print_r($parameters, true)); |
|
| 487 | 487 | $cache = GeneralUtility::makeInstance(CacheManager::class)->getCache('tx_dlf_solr'); |
| 488 | 488 | } |
| 489 | 489 | $resultSet = [ |