Commit 8aae9437 authored by Thomas Löffler's avatar Thomas Löffler
Browse files

Merge branch '62-improve-solr-indexing' into 'develop'

[TASK] Adds queryFields and indexes the whole dependency string

See merge request !51
parents 5d96ab92 8622e5e3
Pipeline #187 passed with stages
in 2 minutes and 48 seconds
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\GeneralUtility;
use ApacheSolrForTypo3\Solr\IndexQueue\Item; use ApacheSolrForTypo3\Solr\IndexQueue\Item;
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
/** /**
* Class Tx_TerFe2_Solr_Indexqueue_TerIndexer * Class Tx_TerFe2_Solr_Indexqueue_TerIndexer
...@@ -93,6 +94,11 @@ class Tx_TerFe2_Solr_Indexqueue_TerIndexer extends \ApacheSolrForTypo3\Solr\Inde ...@@ -93,6 +94,11 @@ class Tx_TerFe2_Solr_Indexqueue_TerIndexer extends \ApacheSolrForTypo3\Solr\Inde
$document->setField('extensionMinTYPO3Version_tIntS', $typo3Dependency['minimum']); $document->setField('extensionMinTYPO3Version_tIntS', $typo3Dependency['minimum']);
$document->setField('extensionMaxTYPO3Version_tIntS', $typo3Dependency['maximum']); $document->setField('extensionMaxTYPO3Version_tIntS', $typo3Dependency['maximum']);
$dependencyString = '';
$dependencyString .= $typo3Dependency['minimum'] > 0 ? VersionNumberUtility::convertIntegerToVersionNumber($typo3Dependency['minimum']) : '';
$dependencyString .= $typo3Dependency['maximum'] > 0 ? ' - ' . VersionNumberUtility::convertIntegerToVersionNumber($typo3Dependency['maximum']) : '';
$document->setField('extensionDependency_stringS', $dependencyString ?: 'N/A');
$document->setField('outdated_boolS', $extension->getLastVersion()->getReviewState() === -2); $document->setField('outdated_boolS', $extension->getLastVersion()->getReviewState() === -2);
} }
...@@ -175,4 +181,4 @@ class Tx_TerFe2_Solr_Indexqueue_TerIndexer extends \ApacheSolrForTypo3\Solr\Inde ...@@ -175,4 +181,4 @@ class Tx_TerFe2_Solr_Indexqueue_TerIndexer extends \ApacheSolrForTypo3\Solr\Inde
$fileType = strtolower(trim($fileType, '. ')); $fileType = strtolower(trim($fileType, '. '));
return $extension[0] . '/' . $extension[1] . '/' . $extension . '_' . $version . '.' . $fileType; return $extension[0] . '/' . $extension[1] . '/' . $extension . '_' . $version . '.' . $fileType;
} }
} }
\ No newline at end of file
...@@ -141,12 +141,6 @@ plugin { ...@@ -141,12 +141,6 @@ plugin {
extensionDownloads_intS = downloads extensionDownloads_intS = downloads
extensionHasZipFile_intS = SOLR_RELATION
extensionHasZipFile_intS {
localField = last_version
foreignLabelField = has_zip_file
}
extensionManual_intS = SOLR_RELATION extensionManual_intS = SOLR_RELATION
extensionManual_intS { extensionManual_intS {
localField = last_version localField = last_version
...@@ -213,12 +207,11 @@ plugin { ...@@ -213,12 +207,11 @@ plugin {
} }
} }
} }
search{ search {
query{ query {
// qf parameter http://wiki.apache.org/solr/DisMaxQParserPlugin#qf_.28Query_Fields.29 // qf parameter http://wiki.apache.org/solr/DisMaxQParserPlugin#qf_.28Query_Fields.29
queryFields = content^40.0, extensionKey_textS^20.0, title^5.0, keywords^2.0, tagsH1^5.0, tagsH2H3^3.0, tagsH4H5H6^2.0, tagsInline^1.0, author^1.0 queryFields = extensionKey_stringS^60.0, keywords^55.0, title^50.0, content^40.0, author^1.0
}
} }
} }
} }
} }
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment