SlideShare a Scribd company logo
EXT:solr and FLUID:
Use FLUID templating for your search
1
EXT:solr short overview
Search Extension for TYPO3

Started in 2009 (pi based) by Ingo Renner

Code hosted on github: https://github.com/TYPO3-Solr/ext-solr

Financed by dkd and partners
Addons available:
* EXT:solrfal File indexing from FAL for TYPO3
2
About me
3
Timo Hund
33 years old
@TYPO3 since: 2003

@Apache Solr since: 2009

@dkd since: 2015



Email: timo.hund@dkd.de
Xing: https://www.xing.com/profile/Timo_Hund2

Github: https://github.com/timohund
Twitter: @TimoHund

Our team
4
Olivier
Dobberkau
Timo
Hund
Ingo
Renner
Markus
Friedrich
Thomas
Janke
Development Development Development Management Management
Rafael
Kähm
Development
Useful links
• Blogpost of solrfuid 1.0:

http://www.typo3-solr.com/en/blog/details/news/
solrfluid_100_has_been_released/

• Customizing boilerplate extension:

https://github.com/TYPO3-Solr/ext-solrfluidexample

• Slack channel:

https://typo3.slack.com/messages/ext-solr

• Documentation:

https://www.typo3-solr.com/en/solr-for-typo3/documentation/



5
Overview
Available frontend plugins and what they do…
6
Searchbox
7
• Renders the search form only
• Can be used as entry point from outside to start a search
• Triggers SearchController::formAction
Searchbox
8
Frequent searches
9
• Renders frequent searches from the statistics
• Triggers SearchController::frequentlySearchedAction()
Frequent searches
10
Search resultlist
11
• Renders the search results (Form, Results, AdditionalComponents)
• Triggers SearchController::resultsAction()
Search resultlist
12
Concepts & Structure
Concepts & Structure of the FLUID templating in EXT:solr
13(c) by Timo Hund & dkd Internet Service GmbH (Copy for internal use only).
Marker based templating
• Default before EXT:solr 7.0.0 

(FLUID was not available when EXT:solr was started)

• Extended marker concept of the core (loops, if/else, …), innovative at
that time…
• Limitations
• No Partials
• Limited ViewHelpers
• Additional learning
• Implicite loading of JS and CSS files
• Spreathed logic for url generation
• Templateengine was part of the extension => more maintenance
• PI based (No MVC)
14
FLUID based templating
• Since 7.0.0 part of EXT:solr
• Brings
• Domain model for Results/Facets/Sorting/…
• Extbase controllers (MVC & DDD Pattern)
• Default fluid layouts/partials and templates
• ViewHelpers needed for search
• Unified url generation
• Performance improvements
15
16
What happens when the
User hits „Search“?
17
Browser
HTTP GET
HTTP GET
JsonHtml
18
Browser
HTTP GET
HTTP GET
JsonHtml
19
• Simplified sequence diagram
• The searchAction passes the SearchResultSet to the view
• The SearchResultSet can be used to access results, facets,…
20
Browser
HTTP GET
HTTP GET
JsonHtml
Example query and response
http://8.7.local.typo3.org:8083/solr/core_en/select?fl=*,score
&fq=siteHash:“9e9d76a598c63d4ff578fea5c5254c27d9554fc6"
&fq={typo3access}-1,0
&debugQuery=true
&echoParams=all
&spellcheck.maxCollationTries=1
&qf=content^40.0 title^5.0 keywords^2.0 tagsH1^5.0 tagsH2H3^3.0 tagsH4H5H6^2.0 tagsInline&hl=true
&hl.fragsize=200
&hl.fl=content
&facet=true
&facet.mincount=1
&facet.limit=100&facet.field=type
&facet.field=keywords_stringM
&facet.query=created:[NOW/DAY-7DAYS TO *]
&facet.query=created:[NOW/DAY-1MONTH TO NOW/DAY-7DAYS]

&facet.query=created:[NOW/DAY-6MONTHS TO NOW/DAY-1MONTH]

&facet.query=created:[NOW/DAY-1YEAR TO NOW/DAY-6MONTHS]

&facet.query=created:[* TO NOW/DAY-1YEAR]

&facet.sort=count

&wt=json

&json.nl=map&q=cms&start=0&rows=10
21
EXT:solr builds this query
for your and queries the 

Apache Solr Server
Example query and response
22
Apache Solr delivers a json/xml
response that contains facets, results …
EXT:solr creates the SearchResultSet from
that.



The SearchResultSet can be used to access
all needed data for the output
Search resultlist
23
FormSorting
Facet Area Results
Last Searches
Frequent Searches
Get domain objects from SearchResultSet
24
25
Example:

<f:for each="{resultSet.searchResults}" as="result">

<h1>{result.title}</h1>

</f:for>

Get domain objects from SearchResultSet
Example:
<f:for each="{resultSet.facets.available}" as="facet">

<h1>{facet.label}</h1>
<f:for each="{facet.options}" as=“option“>
{option.label}
</f:for>

</f:for>

26
options, hierarchy, queryGroup
numericRange & dateRange
Get domain objects from SearchResultSet
Get domain objects from SearchResultSet
27
Example:

<f:if condition="{resultSet.sortings.hasSelected}">
<p>{resultSet.sortings.selected.label}</p>
</f:if>

Get domain objects from SearchResultSet
28
Example:
<p>{resultSet.usedSearchRequest.page}</p>


FLUID templates
overview
29
Search resultlist
30
FormSorting
Facet Area Results
Last Searches
Frequent Searches
• Rendering starts in: EXT:solr/Resources/Private/Templates/Search/Results.html
Search results
How to the search results are rendered
31
Search resultlist
32
Results
Search resultlist
<f:if condition="{hasSearched}">

<f:if condition="{resultSet.usedSearch.numberOfResults}">

<f:render partial="Result/PerPage" section="PerPage" arguments="{resultSet: resultSet}" />

</f:if>

<s:widget.resultPaginate resultSet="{resultSet}">

<ol start="{pagination.displayRangeStart}" class="results-list">

<f:for each="{documents}" as="document">

<f:render partial="Result/Document" section="Document" 

arguments="{resultSet:resultSet, document:document}" />

</f:for>

</ol>

</s:widget.resultPaginate>
</f:if>

33
Every document is passed
to the Results/Document
partial to render the
search result
• You can use: EXT:solr/Resources/Private/Partials/Result/Document.html and
adapt it to your needs.
Faceting
What are facets and how to configure them?
34
Faceting
35
Facet Area
Faceting
• Facets help the user to „narrow down“ or „filter“ the results, to find
what he is looking for.

• Based on a solr field

• Configured with TypoScript

• Have different types
• Option
• Query Group
• Hierarchical
• Date Range
• Numeric Range







36
Example
Content type facet of a page:

plugin.tx_solr.search.faceting.facets {

type {

label = Content Type

field = type
type = options*
}

}
*type „options“ is default
37
Available option based facets
38
options
hierarchy
queryGroup
Flat list of selectable options
Nested tree of options
Flat list based on solr querys
Example: EXT:solr/Configuration/TypoScript/Examples/Facets/QueryGroup/setup.txt
Example: EXT:solr/Configuration/TypoScript/Examples/Facets/Hierarchy/setup.txt
Default Partial: EXT:solr/Resources/Private/Partials/Facets/Options.html
Default Partial: EXT:solr/Resources/Private/Partials/Facets/Hierarchy.html
Default Partial: EXT:solr/Resources/Private/Partials/Facets/Options.html
Available range based facets
39
numericRange
dateRange
Numeric range between a

min and max value
Date range between a start and
end date
Example: EXT:solr/Configuration/TypoScript/Examples/Facets/NumericRange/setup.txt
Example: EXT:solr/Configuration/TypoScript/Examples/Facets/DateRange/setup.txt
Default Partial: EXT:solr/Resources/Private/Partials/Facets/NumericRange.html
Default Partial: EXT:solr/Resources/Private/Partials/Facets/DateRange.html
Customizing
Use custom Templates / Partials or ViewHelpers
40
Resources
• EXT:solrfluidexample - example extension that shows how to use:
• Custom Templates
• Custom Translations
• Custom ViewHelpers
• https://github.com/TYPO3-Solr/ext-solrfluidexample

• EXT:solr documentation:
• https://docs.typo3.org/typo3cms/extensions/solr/

41
Custom templates
Use templates for a custom extension
42
Using FLUID rootPaths
• FLUID supports fallbacks:

plugin.tx_solr.view {

partialRootPaths {

0 = EXT:solr/Resources/Private/Partials/

100 = EXT:myextension/Resources/Private/Partials/

}

templateRootPaths {

0 = EXT:solr/Resources/Private/Templates/

100 = EXT:myextension/Resources/Private/Templates/

}

}
• See also: https://www.fiedomedia.de/news/artikel/template-fallbacks-in-typo3-fluid/



43
Custom facet partials
How to render facets in a custom partials
44
Use custom facet partial
Change the partialName to „Custom“ in TypoScript:

plugin.tx_solr.search.faceting.facets {
category {
label = Category
field = keywords_stringM
type = options
partialName = Custom
}

}



Copy the default partial „Options.html“ to 

„Custom.html“



Use the core ViewHelper to make the option uppercase:

{option.label} => <f:format.case value="{option.label}" mode="upper"/>
45
Thanks!
46
• To all EB partners !
• Thanks to all contributors!
All previous partners can be found here: http://www.typo3-solr.com/en/sponsors/our-sponsors/
Questions & Answers
47
Excited and what to learn more?
48
Join the next Apache Solr
for TYPO3 Training or book an
exclusive training for your
company!
Get a 15%
camp
discount
when you book a workshop in
the next 10 days!
Do you want to support 

Apache Solr for TYPO3?
49
Become an EB
partner and
sponsor the development/
maintenance & support of
Apache Solr for TYPO3

More Related Content

What's hot

deployer, deployment for TYPO3 CMS with ease and fun
deployer, deployment for TYPO3 CMS with ease and fundeployer, deployment for TYPO3 CMS with ease and fun
deployer, deployment for TYPO3 CMS with ease and fun
Peter Niederlag
 
PHP Presentation
PHP PresentationPHP Presentation
PHP PresentationNikhil Jain
 
Resource-Oriented Web Services
Resource-Oriented Web ServicesResource-Oriented Web Services
Resource-Oriented Web Services
Bradley Holt
 
HTMLarea to CKEditor - create presets and your own plugin for TYPO3
HTMLarea to CKEditor - create presets and your own plugin for TYPO3HTMLarea to CKEditor - create presets and your own plugin for TYPO3
HTMLarea to CKEditor - create presets and your own plugin for TYPO3
Frans Saris
 
New Features in PHP 5.3
New Features in PHP 5.3New Features in PHP 5.3
New Features in PHP 5.3
Bradley Holt
 
Talking to Web Services
Talking to Web ServicesTalking to Web Services
Talking to Web Services
DrupalcampAtlanta2012
 
Writing multi-language documentation using Sphinx
Writing multi-language documentation using SphinxWriting multi-language documentation using Sphinx
Writing multi-language documentation using Sphinx
Markus Zapke-Gründemann
 
New in Plone 3.3. What to expect from Plone 4
New in Plone 3.3. What to expect from Plone 4New in Plone 3.3. What to expect from Plone 4
New in Plone 3.3. What to expect from Plone 4
Quintagroup
 
Introduction to python scrapping
Introduction to python scrappingIntroduction to python scrapping
Introduction to python scrapping
n|u - The Open Security Community
 
PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
Ankush Jain
 

What's hot (11)

deployer, deployment for TYPO3 CMS with ease and fun
deployer, deployment for TYPO3 CMS with ease and fundeployer, deployment for TYPO3 CMS with ease and fun
deployer, deployment for TYPO3 CMS with ease and fun
 
PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
 
Resource-Oriented Web Services
Resource-Oriented Web ServicesResource-Oriented Web Services
Resource-Oriented Web Services
 
Miyagawa
MiyagawaMiyagawa
Miyagawa
 
HTMLarea to CKEditor - create presets and your own plugin for TYPO3
HTMLarea to CKEditor - create presets and your own plugin for TYPO3HTMLarea to CKEditor - create presets and your own plugin for TYPO3
HTMLarea to CKEditor - create presets and your own plugin for TYPO3
 
New Features in PHP 5.3
New Features in PHP 5.3New Features in PHP 5.3
New Features in PHP 5.3
 
Talking to Web Services
Talking to Web ServicesTalking to Web Services
Talking to Web Services
 
Writing multi-language documentation using Sphinx
Writing multi-language documentation using SphinxWriting multi-language documentation using Sphinx
Writing multi-language documentation using Sphinx
 
New in Plone 3.3. What to expect from Plone 4
New in Plone 3.3. What to expect from Plone 4New in Plone 3.3. What to expect from Plone 4
New in Plone 3.3. What to expect from Plone 4
 
Introduction to python scrapping
Introduction to python scrappingIntroduction to python scrapping
Introduction to python scrapping
 
PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
 

Similar to Use FLUID templating for your TYPO3 search

Apache Solr for TYPO3 what's new 2018
Apache Solr for TYPO3 what's new 2018Apache Solr for TYPO3 what's new 2018
Apache Solr for TYPO3 what's new 2018
timohund
 
Siteocre Sxa and Solr - Sitecore User Group UAE Dubai- Jitendra Soni
Siteocre Sxa and Solr - Sitecore User Group UAE Dubai- Jitendra SoniSiteocre Sxa and Solr - Sitecore User Group UAE Dubai- Jitendra Soni
Siteocre Sxa and Solr - Sitecore User Group UAE Dubai- Jitendra Soni
Jitendra Soni
 
Siteocre Sxa and Solr - Sitecore User Group Bangalore -
Siteocre Sxa and Solr - Sitecore User Group Bangalore - Siteocre Sxa and Solr - Sitecore User Group Bangalore -
Siteocre Sxa and Solr - Sitecore User Group Bangalore -
Jitendra Soni
 
TYPO3 EXT:form for integrators
TYPO3 EXT:form for integratorsTYPO3 EXT:form for integrators
TYPO3 EXT:form for integrators
TRITUM
 
Zendcon zray
Zendcon zrayZendcon zray
Zendcon zray
Mathew Beane
 
2018 - CertiFUNcation - Olivier Dobberka: Apache Solr for Newbies
2018 - CertiFUNcation - Olivier Dobberka: Apache Solr for Newbies2018 - CertiFUNcation - Olivier Dobberka: Apache Solr for Newbies
2018 - CertiFUNcation - Olivier Dobberka: Apache Solr for Newbies
TYPO3 CertiFUNcation
 
Apache Solr Workshop
Apache Solr WorkshopApache Solr Workshop
Apache Solr Workshop
Saumitra Srivastav
 
Welcome Webinar Slides
Welcome Webinar SlidesWelcome Webinar Slides
Welcome Webinar Slides
Sumo Logic
 
Rebuilding Solr 6 examples - layer by layer (LuceneSolrRevolution 2016)
Rebuilding Solr 6 examples - layer by layer (LuceneSolrRevolution 2016)Rebuilding Solr 6 examples - layer by layer (LuceneSolrRevolution 2016)
Rebuilding Solr 6 examples - layer by layer (LuceneSolrRevolution 2016)
Alexandre Rafalovitch
 
Play framework: lessons learned
Play framework: lessons learnedPlay framework: lessons learned
Play framework: lessons learnedPeter Hilton
 
Apache Solr for TYPO3: More than a search engine
Apache Solr for TYPO3: More than a search engineApache Solr for TYPO3: More than a search engine
Apache Solr for TYPO3: More than a search engine
Olivier Dobberkau
 
Sumo Logic "How to" Webinar: Advanced Analytics
Sumo Logic "How to" Webinar: Advanced AnalyticsSumo Logic "How to" Webinar: Advanced Analytics
Sumo Logic "How to" Webinar: Advanced Analytics
Sumo Logic
 
EthicShare.org (Mostly Solr)
EthicShare.org (Mostly Solr)EthicShare.org (Mostly Solr)
EthicShare.org (Mostly Solr)libsys
 
Letting In the Light: Using Solr as an External Search Component
Letting In the Light: Using Solr as an External Search ComponentLetting In the Light: Using Solr as an External Search Component
Letting In the Light: Using Solr as an External Search Component
Jay Luker
 
NLP Project Full Circle
NLP Project Full CircleNLP Project Full Circle
NLP Project Full Circle
Vsevolod Dyomkin
 
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Esteve Castells
 
Search Intelligence & MarkLogic Search API
Search Intelligence & MarkLogic Search APISearch Intelligence & MarkLogic Search API
Search Intelligence & MarkLogic Search API
WillThompson78
 
Web analytics at scale with Druid at naver.com
Web analytics at scale with Druid at naver.comWeb analytics at scale with Druid at naver.com
Web analytics at scale with Druid at naver.com
Jungsu Heo
 

Similar to Use FLUID templating for your TYPO3 search (20)

Apache Solr for TYPO3 what's new 2018
Apache Solr for TYPO3 what's new 2018Apache Solr for TYPO3 what's new 2018
Apache Solr for TYPO3 what's new 2018
 
Siteocre Sxa and Solr - Sitecore User Group UAE Dubai- Jitendra Soni
Siteocre Sxa and Solr - Sitecore User Group UAE Dubai- Jitendra SoniSiteocre Sxa and Solr - Sitecore User Group UAE Dubai- Jitendra Soni
Siteocre Sxa and Solr - Sitecore User Group UAE Dubai- Jitendra Soni
 
Siteocre Sxa and Solr - Sitecore User Group Bangalore -
Siteocre Sxa and Solr - Sitecore User Group Bangalore - Siteocre Sxa and Solr - Sitecore User Group Bangalore -
Siteocre Sxa and Solr - Sitecore User Group Bangalore -
 
TYPO3 EXT:form for integrators
TYPO3 EXT:form for integratorsTYPO3 EXT:form for integrators
TYPO3 EXT:form for integrators
 
Zendcon zray
Zendcon zrayZendcon zray
Zendcon zray
 
2018 - CertiFUNcation - Olivier Dobberka: Apache Solr for Newbies
2018 - CertiFUNcation - Olivier Dobberka: Apache Solr for Newbies2018 - CertiFUNcation - Olivier Dobberka: Apache Solr for Newbies
2018 - CertiFUNcation - Olivier Dobberka: Apache Solr for Newbies
 
Apache Solr Workshop
Apache Solr WorkshopApache Solr Workshop
Apache Solr Workshop
 
Welcome Webinar Slides
Welcome Webinar SlidesWelcome Webinar Slides
Welcome Webinar Slides
 
Rebuilding Solr 6 examples - layer by layer (LuceneSolrRevolution 2016)
Rebuilding Solr 6 examples - layer by layer (LuceneSolrRevolution 2016)Rebuilding Solr 6 examples - layer by layer (LuceneSolrRevolution 2016)
Rebuilding Solr 6 examples - layer by layer (LuceneSolrRevolution 2016)
 
Solr a.b-ab
Solr a.b-abSolr a.b-ab
Solr a.b-ab
 
Play framework: lessons learned
Play framework: lessons learnedPlay framework: lessons learned
Play framework: lessons learned
 
Apache Solr for TYPO3: More than a search engine
Apache Solr for TYPO3: More than a search engineApache Solr for TYPO3: More than a search engine
Apache Solr for TYPO3: More than a search engine
 
Sumo Logic "How to" Webinar: Advanced Analytics
Sumo Logic "How to" Webinar: Advanced AnalyticsSumo Logic "How to" Webinar: Advanced Analytics
Sumo Logic "How to" Webinar: Advanced Analytics
 
EthicShare.org (Mostly Solr)
EthicShare.org (Mostly Solr)EthicShare.org (Mostly Solr)
EthicShare.org (Mostly Solr)
 
Letting In the Light: Using Solr as an External Search Component
Letting In the Light: Using Solr as an External Search ComponentLetting In the Light: Using Solr as an External Search Component
Letting In the Light: Using Solr as an External Search Component
 
NLP Project Full Circle
NLP Project Full CircleNLP Project Full Circle
NLP Project Full Circle
 
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
 
Mufix Network Programming Lecture
Mufix Network Programming LectureMufix Network Programming Lecture
Mufix Network Programming Lecture
 
Search Intelligence & MarkLogic Search API
Search Intelligence & MarkLogic Search APISearch Intelligence & MarkLogic Search API
Search Intelligence & MarkLogic Search API
 
Web analytics at scale with Druid at naver.com
Web analytics at scale with Druid at naver.comWeb analytics at scale with Druid at naver.com
Web analytics at scale with Druid at naver.com
 

Recently uploaded

ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
SupreethSP4
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 

Recently uploaded (20)

ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 

Use FLUID templating for your TYPO3 search

  • 1. EXT:solr and FLUID: Use FLUID templating for your search 1
  • 2. EXT:solr short overview Search Extension for TYPO3
 Started in 2009 (pi based) by Ingo Renner
 Code hosted on github: https://github.com/TYPO3-Solr/ext-solr
 Financed by dkd and partners Addons available: * EXT:solrfal File indexing from FAL for TYPO3 2
  • 3. About me 3 Timo Hund 33 years old @TYPO3 since: 2003
 @Apache Solr since: 2009
 @dkd since: 2015
 
 Email: timo.hund@dkd.de Xing: https://www.xing.com/profile/Timo_Hund2
 Github: https://github.com/timohund Twitter: @TimoHund

  • 5. Useful links • Blogpost of solrfuid 1.0:
 http://www.typo3-solr.com/en/blog/details/news/ solrfluid_100_has_been_released/
 • Customizing boilerplate extension:
 https://github.com/TYPO3-Solr/ext-solrfluidexample
 • Slack channel:
 https://typo3.slack.com/messages/ext-solr
 • Documentation:
 https://www.typo3-solr.com/en/solr-for-typo3/documentation/
 
 5
  • 6. Overview Available frontend plugins and what they do… 6
  • 7. Searchbox 7 • Renders the search form only • Can be used as entry point from outside to start a search • Triggers SearchController::formAction
  • 9. Frequent searches 9 • Renders frequent searches from the statistics • Triggers SearchController::frequentlySearchedAction()
  • 11. Search resultlist 11 • Renders the search results (Form, Results, AdditionalComponents) • Triggers SearchController::resultsAction()
  • 13. Concepts & Structure Concepts & Structure of the FLUID templating in EXT:solr 13(c) by Timo Hund & dkd Internet Service GmbH (Copy for internal use only).
  • 14. Marker based templating • Default before EXT:solr 7.0.0 
 (FLUID was not available when EXT:solr was started)
 • Extended marker concept of the core (loops, if/else, …), innovative at that time… • Limitations • No Partials • Limited ViewHelpers • Additional learning • Implicite loading of JS and CSS files • Spreathed logic for url generation • Templateengine was part of the extension => more maintenance • PI based (No MVC) 14
  • 15. FLUID based templating • Since 7.0.0 part of EXT:solr • Brings • Domain model for Results/Facets/Sorting/… • Extbase controllers (MVC & DDD Pattern) • Default fluid layouts/partials and templates • ViewHelpers needed for search • Unified url generation • Performance improvements 15
  • 16. 16 What happens when the User hits „Search“?
  • 19. 19 • Simplified sequence diagram • The searchAction passes the SearchResultSet to the view • The SearchResultSet can be used to access results, facets,…
  • 21. Example query and response http://8.7.local.typo3.org:8083/solr/core_en/select?fl=*,score &fq=siteHash:“9e9d76a598c63d4ff578fea5c5254c27d9554fc6" &fq={typo3access}-1,0 &debugQuery=true &echoParams=all &spellcheck.maxCollationTries=1 &qf=content^40.0 title^5.0 keywords^2.0 tagsH1^5.0 tagsH2H3^3.0 tagsH4H5H6^2.0 tagsInline&hl=true &hl.fragsize=200 &hl.fl=content &facet=true &facet.mincount=1 &facet.limit=100&facet.field=type &facet.field=keywords_stringM &facet.query=created:[NOW/DAY-7DAYS TO *] &facet.query=created:[NOW/DAY-1MONTH TO NOW/DAY-7DAYS]
 &facet.query=created:[NOW/DAY-6MONTHS TO NOW/DAY-1MONTH]
 &facet.query=created:[NOW/DAY-1YEAR TO NOW/DAY-6MONTHS]
 &facet.query=created:[* TO NOW/DAY-1YEAR]
 &facet.sort=count
 &wt=json
 &json.nl=map&q=cms&start=0&rows=10 21 EXT:solr builds this query for your and queries the 
 Apache Solr Server
  • 22. Example query and response 22 Apache Solr delivers a json/xml response that contains facets, results … EXT:solr creates the SearchResultSet from that.
 
 The SearchResultSet can be used to access all needed data for the output
  • 23. Search resultlist 23 FormSorting Facet Area Results Last Searches Frequent Searches
  • 24. Get domain objects from SearchResultSet 24
  • 26. Example: <f:for each="{resultSet.facets.available}" as="facet">
 <h1>{facet.label}</h1> <f:for each="{facet.options}" as=“option“> {option.label} </f:for>
 </f:for>
 26 options, hierarchy, queryGroup numericRange & dateRange Get domain objects from SearchResultSet
  • 27. Get domain objects from SearchResultSet 27 Example:
 <f:if condition="{resultSet.sortings.hasSelected}"> <p>{resultSet.sortings.selected.label}</p> </f:if>

  • 28. Get domain objects from SearchResultSet 28 Example: <p>{resultSet.usedSearchRequest.page}</p> 

  • 30. Search resultlist 30 FormSorting Facet Area Results Last Searches Frequent Searches • Rendering starts in: EXT:solr/Resources/Private/Templates/Search/Results.html
  • 31. Search results How to the search results are rendered 31
  • 33. Search resultlist <f:if condition="{hasSearched}">
 <f:if condition="{resultSet.usedSearch.numberOfResults}">
 <f:render partial="Result/PerPage" section="PerPage" arguments="{resultSet: resultSet}" />
 </f:if>
 <s:widget.resultPaginate resultSet="{resultSet}">
 <ol start="{pagination.displayRangeStart}" class="results-list">
 <f:for each="{documents}" as="document">
 <f:render partial="Result/Document" section="Document" 
 arguments="{resultSet:resultSet, document:document}" />
 </f:for>
 </ol>
 </s:widget.resultPaginate> </f:if>
 33 Every document is passed to the Results/Document partial to render the search result • You can use: EXT:solr/Resources/Private/Partials/Result/Document.html and adapt it to your needs.
  • 34. Faceting What are facets and how to configure them? 34
  • 36. Faceting • Facets help the user to „narrow down“ or „filter“ the results, to find what he is looking for.
 • Based on a solr field
 • Configured with TypoScript
 • Have different types • Option • Query Group • Hierarchical • Date Range • Numeric Range
 
 
 
 36
  • 37. Example Content type facet of a page:
 plugin.tx_solr.search.faceting.facets {
 type {
 label = Content Type
 field = type type = options* }
 } *type „options“ is default 37
  • 38. Available option based facets 38 options hierarchy queryGroup Flat list of selectable options Nested tree of options Flat list based on solr querys Example: EXT:solr/Configuration/TypoScript/Examples/Facets/QueryGroup/setup.txt Example: EXT:solr/Configuration/TypoScript/Examples/Facets/Hierarchy/setup.txt Default Partial: EXT:solr/Resources/Private/Partials/Facets/Options.html Default Partial: EXT:solr/Resources/Private/Partials/Facets/Hierarchy.html Default Partial: EXT:solr/Resources/Private/Partials/Facets/Options.html
  • 39. Available range based facets 39 numericRange dateRange Numeric range between a
 min and max value Date range between a start and end date Example: EXT:solr/Configuration/TypoScript/Examples/Facets/NumericRange/setup.txt Example: EXT:solr/Configuration/TypoScript/Examples/Facets/DateRange/setup.txt Default Partial: EXT:solr/Resources/Private/Partials/Facets/NumericRange.html Default Partial: EXT:solr/Resources/Private/Partials/Facets/DateRange.html
  • 40. Customizing Use custom Templates / Partials or ViewHelpers 40
  • 41. Resources • EXT:solrfluidexample - example extension that shows how to use: • Custom Templates • Custom Translations • Custom ViewHelpers • https://github.com/TYPO3-Solr/ext-solrfluidexample
 • EXT:solr documentation: • https://docs.typo3.org/typo3cms/extensions/solr/
 41
  • 42. Custom templates Use templates for a custom extension 42
  • 43. Using FLUID rootPaths • FLUID supports fallbacks:
 plugin.tx_solr.view {
 partialRootPaths {
 0 = EXT:solr/Resources/Private/Partials/
 100 = EXT:myextension/Resources/Private/Partials/
 }
 templateRootPaths {
 0 = EXT:solr/Resources/Private/Templates/
 100 = EXT:myextension/Resources/Private/Templates/
 }
 } • See also: https://www.fiedomedia.de/news/artikel/template-fallbacks-in-typo3-fluid/
 
 43
  • 44. Custom facet partials How to render facets in a custom partials 44
  • 45. Use custom facet partial Change the partialName to „Custom“ in TypoScript:
 plugin.tx_solr.search.faceting.facets { category { label = Category field = keywords_stringM type = options partialName = Custom }
 }
 
 Copy the default partial „Options.html“ to 
 „Custom.html“
 
 Use the core ViewHelper to make the option uppercase:
 {option.label} => <f:format.case value="{option.label}" mode="upper"/> 45
  • 46. Thanks! 46 • To all EB partners ! • Thanks to all contributors! All previous partners can be found here: http://www.typo3-solr.com/en/sponsors/our-sponsors/
  • 48. Excited and what to learn more? 48 Join the next Apache Solr for TYPO3 Training or book an exclusive training for your company! Get a 15% camp discount when you book a workshop in the next 10 days!
  • 49. Do you want to support 
 Apache Solr for TYPO3? 49 Become an EB partner and sponsor the development/ maintenance & support of Apache Solr for TYPO3