first commit

This commit is contained in:
Sven Wappler
2021-04-24 04:44:44 +02:00
parent cadcc8edb4
commit 2c9e27b3b7
55 changed files with 333 additions and 3877 deletions

View File

@@ -2,13 +2,11 @@
// TypoScript
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('meilisearch',
'Configuration/TypoScript/Meilisearch/', 'Search - Base Configuration');
'Configuration/TypoScript/Meilisearch/', 'Meilisearch');
// StyleSheets
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('meilisearch',
'Configuration/TypoScript/BootstrapCss/', 'Search - Bootstrap CSS Framework');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('meilisearch',
'Configuration/TypoScript/StyleSheets/', 'Search - Default Stylesheets');
'Configuration/TypoScript/BootstrapCSS/', 'Meilisearch - Bootstrap CSS');
// OpenSearch++
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('meilisearch',

View File

@@ -1,2 +0,0 @@
# Important: This file is deprecated and will removed with EXT:meilisearch 12.x
@import 'EXT:meilisearch/Configuration/TypoScript/BootstrapCss/setup.typoscript'

View File

@@ -0,0 +1,28 @@
plugin.tx_meilisearch {
# cat=meilisearch: basic/10/enable; type=boolean; label=Enable/disable Meilisearch extension: EXT:meilisearch should only be enabled for relevant sys_languages, to avoid unnecessary connections and overwritten contents.
enabled = 1
view {
# cat=plugin.tx_meilisearch/file; type=string; label=Path to template root (FE)
templateRootPath = EXT:meilisearch/Resources/Private/Templates/
# cat=plugin.tx_meilisearch/file; type=string; label=Path to template partials (FE)
partialRootPath = EXT:meilisearch/Resources/Private/Partials/
# cat=plugin.tx_meilisearch/file; type=string; label=Path to template layouts (FE)
layoutRootPath = EXT:meilisearch/Resources/Private/Layouts/
}
meilisearch {
scheme = http
host = localhost
port = 7700
apiKey =
}
search {
targetPage = 0
results {
resultsPerPage = 10
}
}
}

View File

@@ -8,20 +8,31 @@ plugin.tx_meilisearch {
dateFormat.date = d.m.Y H:i
}
meilisearch {
read {
scheme = {$plugin.tx_meilisearch.meilisearch.scheme}
host = {$plugin.tx_meilisearch.meilisearch.host}
port = {$plugin.tx_meilisearch.meilisearch.port}
apiKey = {$plugin.tx_meilisearch.meilisearch.apiKey}
view {
pluginNamespace = tx_meilisearch
templateRootPaths {
0 = EXT:meilisearch/Resources/Private/Templates/
10 = {$plugin.tx_meilisearch.view.templateRootPath}
}
write {
scheme = {$plugin.tx_meilisearch.meilisearch.scheme}
host = {$plugin.tx_meilisearch.meilisearch.host}
port = {$plugin.tx_meilisearch.meilisearch.port}
apiKey = {$plugin.tx_meilisearch.meilisearch.apiKey}
partialRootPaths {
0 = EXT:meilisearch/Resources/Private/Partials/
10 = {$plugin.tx_meilisearch.view.partialRootPath}
}
layoutRootPaths {
0 = EXT:meilisearch/Resources/Private/Layouts/
10 = {$plugin.tx_meilisearch.view.layoutRootPath}
}
}
meilisearch {
scheme = {$plugin.tx_meilisearch.meilisearch.scheme}
host = {$plugin.tx_meilisearch.meilisearch.host}
port = {$plugin.tx_meilisearch.meilisearch.port}
apiKey = {$plugin.tx_meilisearch.meilisearch.apiKey}
}
index {
@@ -39,8 +50,6 @@ plugin.tx_meilisearch {
queue {
// mapping tableName.fields.MeilisearchFieldName => TableFieldName (+ cObj processing)
pages = 1
pages {
initialization = WapplerSystems\Meilisearch\IndexQueue\Initializer\Page
@@ -116,9 +125,6 @@ plugin.tx_meilisearch {
sortBy =
// https://www.hathitrust.org/blogs/large-scale-search/slow-queries-and-common-words-part-2
// http://blog.thedigitalgroup.com/vijaym/understanding-phrasequery-and-slop-in-meilisearch/
// https://meilisearch.pl/en/2010/07/14/meilisearch-and-phrasequery-phrase-bonus-in-query-stage/
// see https://lucene.apache.org/meilisearch/guide/7_0/the-dismax-query-parser.html#TheDisMaxQueryParser-Thepf_PhraseFields_Parameter
// EXT:Meilisearch configures Schemas from Meilisearch to use content field with boost of 2.0 per default.
@@ -313,47 +319,6 @@ plugin.tx_meilisearch {
anonymizeIP = 1
}
view {
pluginNamespace = tx_meilisearch
templateRootPaths {
0 = EXT:meilisearch/Resources/Private/Templates/
10 = {$plugin.tx_meilisearch.view.templateRootPath}
}
partialRootPaths {
0 = EXT:meilisearch/Resources/Private/Partials/
10 = {$plugin.tx_meilisearch.view.partialRootPath}
}
layoutRootPaths {
0 = EXT:meilisearch/Resources/Private/Layouts/
10 = {$plugin.tx_meilisearch.view.layoutRootPath}
}
// By convention the templates is loaded from EXT:meilisearch/Resources/Private/Templates/Frontend/Search/(ActionName).html
// If you want to define a different entry template, you can do this here to overwrite the conventional default template
// if you want to use FLUID fallbacks you can just configure the template name, otherwise you could also use a full reference EXT:/.../
// The templates that you configure in availableTemplate can be used in the flexform by the editor to select a template for the concrete plugin instance.
templateFiles {
// results = Results
// results.availableTemplates {
// default {
// label = Default Searchresults Template
// file = Results
// }
// }
// form = Form
// form.availableTemplates {
// default {
// label = Default Searchform Template
// file = Form
// }
// }
// frequentSearched = FrequentlySearched
}
}
logging {
exceptions = 1
debugOutput = 0

View File

@@ -1,2 +0,0 @@
# Important: This file is deprecated and will removed with EXT:meilisearch 12.x
@import 'EXT:meilisearch/Configuration/TypoScript/OpenSearch/constants.typoscript'

View File

@@ -1,10 +1,9 @@
plugin.tx_meilisearch.OpenSearch {
# cat=plugin.meilisearch: OpenSearch/10; type=text; label=Short Name: Brief title of the search, up to 16 characters.
shortName = Website Search
# cat=plugin.meilisearch: OpenSearch/10; type=text; label=Short Name: Brief title of the search, up to 16 characters.
shortName = Website Search
# cat=plugin.meilisearch: OpenSearch/20; type=text; label=Description: Textual description of the search.
description = Search this website
# cat=plugin.meilisearch: OpenSearch/20; type=text; label=Description: Textual description of the search.
description = Search this website
}

View File

@@ -1,2 +0,0 @@
# Important: This file is deprecated and will removed with EXT:meilisearch 12.x
@import 'EXT:meilisearch/Configuration/TypoScript/OpenSearch/setup.typoscript'

View File

@@ -1,42 +1,41 @@
// 7567 = SOLR as vanity number
page {
headerData.7567 = TEXT
headerData.7567 {
typolink.parameter.data = leveluid:0
typolink.parameter.wrap = |,7567
typolink.forceAbsoluteUrl = 1
typolink.returnLast = url
headerData.7567 = TEXT
headerData.7567 {
typolink.parameter.data = leveluid:0
typolink.parameter.wrap = |,7567
typolink.forceAbsoluteUrl = 1
typolink.returnLast = url
wrap (
wrap (
<link rel="profile" href="http://a9.com/-/spec/opensearch/1.1/" />
<link rel="search"
type="application/opensearchdescription+xml"
href="|"
title="{$plugin.tx_meilisearch.OpenSearch.shortName}"
/>
)
}
)
}
}
OpenSearch = PAGE
OpenSearch {
typeNum = 7567
typeNum = 7567
config {
disableAllHeaderCode = 1
additionalHeaders.10.header = Content-type:application/opensearchdescription+xml
xhtml_cleaning = 0
admPanel = 0
}
config {
disableAllHeaderCode = 1
additionalHeaders.10.header = Content-type:application/opensearchdescription+xml
xhtml_cleaning = 0
admPanel = 0
}
10 = TEXT
10.insertData = 1
10.value (
10 = TEXT
10.insertData = 1
10.value (
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>{$plugin.tx_meilisearch.OpenSearch.shortName}</ShortName>
@@ -44,61 +43,57 @@ OpenSearch {
<InputEncoding>UTF-8</InputEncoding>
<OutputEncoding>UTF-8</OutputEncoding>
)
)
11 = TEXT
11.insertData = 1
11.value (
11 = TEXT
11.insertData = 1
11.value (
<Image height="16" width="16" type="image/x-icon">{getIndpEnv:TYPO3_SITE_URL}favicon.ico</Image>
)
)
# link to this description file for automatic updates
20 = TEXT
20.insertData = 1
20.value (
# link to this description file for automatic updates
20 = TEXT
20.insertData = 1
20.value (
<Url type="application/opensearchdescription+xml"
rel="self"
template="{getIndpEnv:TYPO3_SITE_URL}index.php?type={TSFE:type}&amp;L={TSFE:sys_language_uid}" />
)
)
# link the search page
30 = TEXT
30.insertData = 1
30.value (
# link the search page
30 = TEXT
30.insertData = 1
30.value (
<Url type="text/html"
method="GET"
template="{getIndpEnv:TYPO3_SITE_URL}index.php?id={$plugin.tx_meilisearch.search.targetPage}&amp;L={TSFE:sys_language_uid}
)
)
31 = TEXT
31.value = q
31.wrap = &amp;|={searchTerms}" />
31 = TEXT
31.value = q
31.wrap = &amp;|={searchTerms}" />
# link to auto suggestion provider
40 = TEXT
40.insertData = 1
40.value (
# link to auto suggestion provider
40 = TEXT
40.insertData = 1
40.value (
<Url type="application/x-suggestions+json"
rel="suggestions"
template="{getIndpEnv:TYPO3_SITE_URL}index.php?id={$plugin.tx_meilisearch.search.targetPage}&amp;L={TSFE:sys_language_uid}&amp;eID=tx_meilisearch_suggest&amp;format=OpenSearch
)
)
41 = TEXT
41.value = q
41.wrap = &amp;|={searchTerms}" />
41 = TEXT
41.value = q
41.wrap = &amp;|={searchTerms}" />
500 = TEXT
500.value (
500 = TEXT
500.value (
</OpenSearchDescription>
)
)
}

View File

@@ -1,2 +0,0 @@
# Important: This file is deprecated and will removed with EXT:meilisearch 12.x
@import 'EXT:meilisearch/Configuration/TypoScript/Meilisearch/constants.typoscript'

View File

@@ -1,27 +0,0 @@
plugin.tx_meilisearch {
# cat=meilisearch: basic/10/enable; type=boolean; label=Enable/disable Meilisearch extension: EXT:meilisearch should only be enabled for relevant sys_languages, to avoid unnecessary connections and overwritten contents.
enabled = 1
view {
templateRootPath =
partialRootPath =
layoutRootPath =
}
meilisearch {
scheme = http
host = localhost
port = 7700
path = /meilisearch/core_en/
username =
password =
}
search {
targetPage = 0
results {
resultsPerPage = 10
}
}
}

View File

@@ -1,2 +0,0 @@
# Important: This file is deprecated and will removed with EXT:meilisearch 12.x
@import 'EXT:meilisearch/Configuration/TypoScript/Meilisearch/setup.typoscript'

View File

@@ -1,2 +0,0 @@
# Important: This file is deprecated and will removed with EXT:meilisearch 12.x
@import 'EXT:meilisearch/Configuration/TypoScript/StyleSheets/setup.typoscript'

View File

@@ -1,4 +1,4 @@
page.includeCSS {
search = EXT:meilisearch/Resources/Public/StyleSheets/Frontend/results.css
meilisearch-loader = EXT:meilisearch/Resources/Public/StyleSheets/Frontend/loader.css
search = EXT:meilisearch/Resources/Public/StyleSheets/Frontend/results.css
meilisearch-loader = EXT:meilisearch/Resources/Public/StyleSheets/Frontend/loader.css
}