SlideShare a Scribd company logo
1 of 52
Download to read offline
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
EB Premium Partner
48
b13.de jweiland.netdkd.de
EB Partner
49
• Albervanderveen
• Amedick & Sommer
• AUSY SA
• bgm Websolutions GmbH
• Citkomm services GmbH
• Cows Online GmbH
• food media Frank Wörner
• FTI Touristik GmbH
• Hochschule Furtwangen
• JUNGMUT Communications GmbH
• Kreis Coesfeld
• LOUIS INTERNET GmbH
• L.N. Schaffrath DigitalMedien GmbH
• Mercedes AMG GmbH
• Petz & Co
• Pluswerk AG
• ressourcenmangel an der panke GmbH
• Studio B12 GmbH
• systime
• Talleux & Zöllner GbR
• TOUMORO
• TWT Interactive GmbH
Feature Sponsors
50
bibus.ch linnearad.no in2code.de
Excited and what to learn more?
51
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?
52
Become an EB
partner and
sponsor the development/
maintenance & support of
Apache Solr for TYPO3

More Related Content

Similar to FLUID Templating in EXT:solr

TYPO3 8 is here - how we keep EXT:solr uptodate with the TYPO3 core
TYPO3 8 is here - how we keep EXT:solr uptodate with the TYPO3 coreTYPO3 8 is here - how we keep EXT:solr uptodate with the TYPO3 core
TYPO3 8 is here - how we keep EXT:solr uptodate with the TYPO3 coretimohund
 
TYPO3 EXT:form for integrators
TYPO3 EXT:form for integratorsTYPO3 EXT:form for integrators
TYPO3 EXT:form for integratorsTRITUM
 
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...Lucidworks
 
Play framework: lessons learned
Play framework: lessons learnedPlay framework: lessons learned
Play framework: lessons learnedPeter Hilton
 
Apache Solr for TYPO3 Components & Review 2016
Apache Solr for TYPO3 Components & Review 2016Apache Solr for TYPO3 Components & Review 2016
Apache Solr for TYPO3 Components & Review 2016timohund
 
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 #seoplus2018Esteve Castells
 
Drupal for ng_os
Drupal for ng_osDrupal for ng_os
Drupal for ng_osdstuartnz
 
IT talk SPb "Full text search for lazy guys"
IT talk SPb "Full text search for lazy guys" IT talk SPb "Full text search for lazy guys"
IT talk SPb "Full text search for lazy guys" DataArt
 
Sumo Logic Cert Jam - Fundamentals
Sumo Logic Cert Jam - FundamentalsSumo Logic Cert Jam - Fundamentals
Sumo Logic Cert Jam - FundamentalsSumo Logic
 
Using Search API, Search API Solr and Facets in Drupal 8
Using Search API, Search API Solr and Facets in Drupal 8Using Search API, Search API Solr and Facets in Drupal 8
Using Search API, Search API Solr and Facets in Drupal 8Websolutions Agency
 
Unleashing Creative Freedom with MODX (2015-07-21 @ PHP FRL)
Unleashing Creative Freedom with MODX (2015-07-21 @ PHP FRL)Unleashing Creative Freedom with MODX (2015-07-21 @ PHP FRL)
Unleashing Creative Freedom with MODX (2015-07-21 @ PHP FRL)Mark Hamstra
 
Dev8d Apache Solr Tutorial
Dev8d Apache Solr TutorialDev8d Apache Solr Tutorial
Dev8d Apache Solr TutorialSourcesense
 
Speed up your developments with Symfony2
Speed up your developments with Symfony2Speed up your developments with Symfony2
Speed up your developments with Symfony2Hugo Hamon
 
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...Crossref
 
Unleashing Creative Freedom with MODX (2015-09-08 at PHPAmersfoort)
Unleashing Creative Freedom with MODX (2015-09-08 at PHPAmersfoort)Unleashing Creative Freedom with MODX (2015-09-08 at PHPAmersfoort)
Unleashing Creative Freedom with MODX (2015-09-08 at PHPAmersfoort)Mark Hamstra
 
Simplify your professional web development with symfony
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfonyFrancois Zaninotto
 

Similar to FLUID Templating in EXT:solr (20)

Apache Solr Workshop
Apache Solr WorkshopApache Solr Workshop
Apache Solr Workshop
 
Solr Masterclass Bangkok, June 2014
Solr Masterclass Bangkok, June 2014Solr Masterclass Bangkok, June 2014
Solr Masterclass Bangkok, June 2014
 
TYPO3 8 is here - how we keep EXT:solr uptodate with the TYPO3 core
TYPO3 8 is here - how we keep EXT:solr uptodate with the TYPO3 coreTYPO3 8 is here - how we keep EXT:solr uptodate with the TYPO3 core
TYPO3 8 is here - how we keep EXT:solr uptodate with the TYPO3 core
 
TYPO3 EXT:form for integrators
TYPO3 EXT:form for integratorsTYPO3 EXT:form for integrators
TYPO3 EXT:form for integrators
 
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
 
Play framework: lessons learned
Play framework: lessons learnedPlay framework: lessons learned
Play framework: lessons learned
 
Apache Solr for TYPO3 Components & Review 2016
Apache Solr for TYPO3 Components & Review 2016Apache Solr for TYPO3 Components & Review 2016
Apache Solr for TYPO3 Components & Review 2016
 
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
 
Drupal for ng_os
Drupal for ng_osDrupal for ng_os
Drupal for ng_os
 
Solr Presentation
Solr PresentationSolr Presentation
Solr Presentation
 
IT talk SPb "Full text search for lazy guys"
IT talk SPb "Full text search for lazy guys" IT talk SPb "Full text search for lazy guys"
IT talk SPb "Full text search for lazy guys"
 
Solr a.b-ab
Solr a.b-abSolr a.b-ab
Solr a.b-ab
 
Sumo Logic Cert Jam - Fundamentals
Sumo Logic Cert Jam - FundamentalsSumo Logic Cert Jam - Fundamentals
Sumo Logic Cert Jam - Fundamentals
 
Using Search API, Search API Solr and Facets in Drupal 8
Using Search API, Search API Solr and Facets in Drupal 8Using Search API, Search API Solr and Facets in Drupal 8
Using Search API, Search API Solr and Facets in Drupal 8
 
Unleashing Creative Freedom with MODX (2015-07-21 @ PHP FRL)
Unleashing Creative Freedom with MODX (2015-07-21 @ PHP FRL)Unleashing Creative Freedom with MODX (2015-07-21 @ PHP FRL)
Unleashing Creative Freedom with MODX (2015-07-21 @ PHP FRL)
 
Dev8d Apache Solr Tutorial
Dev8d Apache Solr TutorialDev8d Apache Solr Tutorial
Dev8d Apache Solr Tutorial
 
Speed up your developments with Symfony2
Speed up your developments with Symfony2Speed up your developments with Symfony2
Speed up your developments with Symfony2
 
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
 
Unleashing Creative Freedom with MODX (2015-09-08 at PHPAmersfoort)
Unleashing Creative Freedom with MODX (2015-09-08 at PHPAmersfoort)Unleashing Creative Freedom with MODX (2015-09-08 at PHPAmersfoort)
Unleashing Creative Freedom with MODX (2015-09-08 at PHPAmersfoort)
 
Simplify your professional web development with symfony
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfony
 

Recently uploaded

Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 

Recently uploaded (20)

Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 

FLUID Templating in EXT:solr

  • 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. EB Premium Partner 48 b13.de jweiland.netdkd.de
  • 49. EB Partner 49 • Albervanderveen • Amedick & Sommer • AUSY SA • bgm Websolutions GmbH • Citkomm services GmbH • Cows Online GmbH • food media Frank Wörner • FTI Touristik GmbH • Hochschule Furtwangen • JUNGMUT Communications GmbH • Kreis Coesfeld • LOUIS INTERNET GmbH • L.N. Schaffrath DigitalMedien GmbH • Mercedes AMG GmbH • Petz & Co • Pluswerk AG • ressourcenmangel an der panke GmbH • Studio B12 GmbH • systime • Talleux & Zöllner GbR • TOUMORO • TWT Interactive GmbH
  • 51. Excited and what to learn more? 51 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!
  • 52. Do you want to support 
 Apache Solr for TYPO3? 52 Become an EB partner and sponsor the development/ maintenance & support of Apache Solr for TYPO3