Added Downloads to search index.
This commit is contained in:
@@ -8,3 +8,6 @@ dependencies:
|
||||
- typo3/fluid-styled-content
|
||||
- friendsoftypo3/headless
|
||||
- nb-headless-content-blocks/headless-content-blocks
|
||||
# solr must load before us so our plugin.tx_solr overrides (statistics,
|
||||
# highlighting, content extraction) survive - set order follows dependencies
|
||||
- apache-solr-for-typo3/solr
|
||||
|
||||
@@ -336,3 +336,200 @@ plugin.tx_solr.index.queue.pages.fields {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Log every executed search (keywords, hit count) into tx_solr_statistics -
|
||||
# feeds the Search Phrase Statistics backend module, most useful for the
|
||||
# zero-hit list. anonymizeIP masks the last two octets before storing (GDPR).
|
||||
plugin.tx_solr.statistics = 1
|
||||
plugin.tx_solr.statistics.anonymizeIP = 2
|
||||
|
||||
# =============================================================================
|
||||
# Record indexing: custom domain models as their own search documents.
|
||||
# The configuration name becomes the document `type` in the search JSON, so the
|
||||
# frontend can facet/label results. Every type needs a resolvable `url` -
|
||||
# a hit without a link is useless, hence the where-clauses below.
|
||||
# NOT indexed (yet): solutions (no slug, no detail_page - nothing to link to),
|
||||
# downloads/events/locations (no public detail pages), Datapath news (pid 442,
|
||||
# import awaiting an editorial decision).
|
||||
# =============================================================================
|
||||
plugin.tx_solr.index.queue {
|
||||
|
||||
products = 1
|
||||
products {
|
||||
type = tx_vitec_domain_model_product
|
||||
fields {
|
||||
title = title
|
||||
content = SOLR_CONTENT
|
||||
content {
|
||||
cObject = COA
|
||||
cObject {
|
||||
10 = TEXT
|
||||
10.field = subtitle
|
||||
10.noTrimWrap = || |
|
||||
20 = TEXT
|
||||
20.field = teaser
|
||||
20.noTrimWrap = || |
|
||||
30 = TEXT
|
||||
30.field = description
|
||||
30.noTrimWrap = || |
|
||||
40 = TEXT
|
||||
40.field = description2
|
||||
40.noTrimWrap = || |
|
||||
50 = TEXT
|
||||
50.field = capabilities
|
||||
50.noTrimWrap = || |
|
||||
60 = TEXT
|
||||
60.field = highlights
|
||||
60.noTrimWrap = || |
|
||||
70 = TEXT
|
||||
70.field = applications
|
||||
70.noTrimWrap = || |
|
||||
}
|
||||
}
|
||||
url = TEXT
|
||||
url {
|
||||
typolink {
|
||||
parameter = 10
|
||||
additionalParams = &tx_vitec_productshow[product]={field:uid}
|
||||
additionalParams.insertData = 1
|
||||
returnLast = url
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
markets = 1
|
||||
markets {
|
||||
type = tx_vitec_domain_model_market
|
||||
# only markets with an editorially assigned detail page are linkable;
|
||||
# grows automatically as editors fill the field (4 of 34 right now)
|
||||
additionalWhereClause = detail_page > 0
|
||||
fields {
|
||||
title = title
|
||||
content = SOLR_CONTENT
|
||||
content {
|
||||
cObject = COA
|
||||
cObject {
|
||||
10 = TEXT
|
||||
10.field = subtitle
|
||||
10.noTrimWrap = || |
|
||||
20 = TEXT
|
||||
20.field = teaser
|
||||
20.noTrimWrap = || |
|
||||
30 = TEXT
|
||||
30.field = description
|
||||
30.noTrimWrap = || |
|
||||
}
|
||||
}
|
||||
url = TEXT
|
||||
url {
|
||||
typolink {
|
||||
parameter.field = detail_page
|
||||
returnLast = url
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
usecases = 1
|
||||
usecases {
|
||||
type = tx_vitec_domain_model_usecase
|
||||
fields {
|
||||
title = title
|
||||
content = SOLR_CONTENT
|
||||
content {
|
||||
cObject = COA
|
||||
cObject {
|
||||
10 = TEXT
|
||||
10.field = subtitle
|
||||
10.noTrimWrap = || |
|
||||
20 = TEXT
|
||||
20.field = teaser
|
||||
20.noTrimWrap = || |
|
||||
}
|
||||
}
|
||||
url = TEXT
|
||||
url {
|
||||
typolink {
|
||||
# page 26 carries the vitec_usecaseshow plugin; the route
|
||||
# enhancer turns this into /success-stories/story/<slug>
|
||||
parameter = 26
|
||||
additionalParams = &tx_vitec_usecaseshow[usecase]={field:uid}
|
||||
additionalParams.insertData = 1
|
||||
returnLast = url
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
news = 1
|
||||
news {
|
||||
type = tx_news_domain_model_news
|
||||
# type 1 ("page as news") points at pages that are already indexed as
|
||||
# pages - indexing them again would duplicate every one of them
|
||||
additionalWhereClause = pid = 11 AND type = '0'
|
||||
fields {
|
||||
title = title
|
||||
content = SOLR_CONTENT
|
||||
content {
|
||||
cObject = COA
|
||||
cObject {
|
||||
10 = TEXT
|
||||
10.field = teaser
|
||||
10.noTrimWrap = || |
|
||||
20 = TEXT
|
||||
20.field = bodytext
|
||||
20.noTrimWrap = || |
|
||||
}
|
||||
}
|
||||
url = TEXT
|
||||
url {
|
||||
typolink {
|
||||
parameter = 21
|
||||
additionalParams = &tx_news_pi1[controller]=News&tx_news_pi1[action]=detail&tx_news_pi1[news]={field:uid}
|
||||
additionalParams.insertData = 1
|
||||
returnLast = url
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Products are what visitors of a product site are usually looking for -
|
||||
# without this boost, decades of news articles dominate the first result page
|
||||
# for product-ish terms like "encoder". Stories get a smaller nudge.
|
||||
plugin.tx_solr.search.query.boostQuery (
|
||||
(type:tx_vitec_domain_model_product)^10.0 (type:tx_vitec_domain_model_usecase)^2.0
|
||||
)
|
||||
|
||||
# Downloads have no detail page but a public file endpoint served by
|
||||
# DownloadFileMiddleware. The where-clause keeps private / website-hidden
|
||||
# downloads out of the public index (the middleware itself does not enforce
|
||||
# private_download - the index must not advertise those files).
|
||||
plugin.tx_solr.index.queue {
|
||||
downloads = 1
|
||||
downloads {
|
||||
type = tx_vitec_domain_model_download
|
||||
additionalWhereClause = private_download = 0 AND hideonwebsite = 0
|
||||
fields {
|
||||
title = title
|
||||
content = SOLR_CONTENT
|
||||
content {
|
||||
cObject = COA
|
||||
cObject {
|
||||
10 = TEXT
|
||||
10.field = teaser
|
||||
10.noTrimWrap = || |
|
||||
20 = TEXT
|
||||
20.field = keywords
|
||||
20.noTrimWrap = || |
|
||||
30 = TEXT
|
||||
30.field = description
|
||||
30.noTrimWrap = || |
|
||||
}
|
||||
}
|
||||
url = TEXT
|
||||
url.dataWrap = /download/{field:slug}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user