SlideShare uma empresa Scribd logo
1 de 49
Baixar para ler 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
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

Mais conteúdo relacionado

Mais procurados

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 funPeter Niederlag
 
PHP Presentation
PHP PresentationPHP Presentation
PHP PresentationNikhil Jain
 
Resource-Oriented Web Services
Resource-Oriented Web ServicesResource-Oriented Web Services
Resource-Oriented Web ServicesBradley 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 TYPO3Frans Saris
 
New Features in PHP 5.3
New Features in PHP 5.3New Features in PHP 5.3
New Features in PHP 5.3Bradley Holt
 
Writing multi-language documentation using Sphinx
Writing multi-language documentation using SphinxWriting multi-language documentation using Sphinx
Writing multi-language documentation using SphinxMarkus 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 4Quintagroup
 
PHP Presentation
PHP PresentationPHP Presentation
PHP PresentationAnkush Jain
 

Mais procurados (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
 

Semelhante a EXT:solr and FLUID: Use FLUID templating for your 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 2018timohund
 
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 SoniJitendra 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 integratorsTRITUM
 
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 NewbiesTYPO3 CertiFUNcation
 
Welcome Webinar Slides
Welcome Webinar SlidesWelcome Webinar Slides
Welcome Webinar SlidesSumo 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 engineOlivier 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 AnalyticsSumo 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 ComponentJay Luker
 
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
 
Search Intelligence & MarkLogic Search API
Search Intelligence & MarkLogic Search APISearch Intelligence & MarkLogic Search API
Search Intelligence & MarkLogic Search APIWillThompson78
 
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.comJungsu Heo
 

Semelhante a EXT:solr and FLUID: Use FLUID templating for your 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
 

Último

Solving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptSolving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptJasonTagapanGulla
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgsaravananr517913
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction managementMariconPadriquez1
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
lifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxlifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxsomshekarkn64
 

Último (20)

Solving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptSolving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.ppt
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction management
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
lifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxlifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptx
 

EXT:solr and FLUID: Use FLUID templating for your 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