Commit 8622e5e3 authored by Thomas Löffler's avatar Thomas Löffler
Browse files

[TASK] Adds queryFields and indexes the whole dependency string

parent 4548c1d8
Pipeline #185 passed with stages
in 1 minute and 49 seconds
......@@ -15,6 +15,7 @@
use TYPO3\CMS\Core\Utility\GeneralUtility;
use ApacheSolrForTypo3\Solr\IndexQueue\Item;
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
/**
* Class Tx_TerFe2_Solr_Indexqueue_TerIndexer
......@@ -93,6 +94,11 @@ class Tx_TerFe2_Solr_Indexqueue_TerIndexer extends \ApacheSolrForTypo3\Solr\Inde
$document->setField('extensionMinTYPO3Version_tIntS', $typo3Dependency['minimum']);
$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);
}
......@@ -175,4 +181,4 @@ class Tx_TerFe2_Solr_Indexqueue_TerIndexer extends \ApacheSolrForTypo3\Solr\Inde
$fileType = strtolower(trim($fileType, '. '));
return $extension[0] . '/' . $extension[1] . '/' . $extension . '_' . $version . '.' . $fileType;
}
}
\ No newline at end of file
}
......@@ -141,12 +141,6 @@ plugin {
extensionDownloads_intS = downloads
extensionHasZipFile_intS = SOLR_RELATION
extensionHasZipFile_intS {
localField = last_version
foreignLabelField = has_zip_file
}
extensionManual_intS = SOLR_RELATION
extensionManual_intS {
localField = last_version
......@@ -213,12 +207,11 @@ plugin {
}
}
}
search{
query{
search {
query {
// 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