SlideShare ist ein Scribd-Unternehmen logo
1 von 55
Downloaden Sie, um offline zu lesen
MAKE YOUR GUI SHINE WITH AJAX SOLR
Troy D. Thomas Product Engineering Manager
Koorosh Vakhshoori Technical Architect
Make Your GUI Shine With AJAX Solr
Setting the Stage
Company Backgrounder
Project History
Business & Technical Requirements
Inspiration
Demo
Why AJAX Solr?
AJAX Solr Framework DEEP DIVE
Themes
Widgets
Challenges
Q & A
Agenda
Company - Background
Synopsys
25 year old company / 1.8B 2012 revenue
Electronic Design Automation (EDA)
Electrical engineers design computer chips
High level design
Simulation
Test
Place and route
IP blocks
Nearly every semiconductor built uses Synopsys software
microprocessors, RAM, etc.
Synopsys – What?
Company Background
SolvNet ÂŽ - online knowledge base system used by
customers and employees
Dedicated engineering team
20 year history
1993 Email
1995 A “Patchy” NCSA Web server + PERL CGI
1997 Verity Netscape search
2001 Java – Netscape Iplanet Portal + Verity
2005 Apache Lucene
2007 Pure Apache
2012 AJAX Solr / Solr 4
Synopsys – SolvNet ®
Lucene
Moved to Lucene - 2005
Custom tokenization helped results
+delay_mode_zero
Autocomplete - 2008
Custom Yahoo UI Widget
Relatively Complex
Tomcat w/ RMI callback
HTML parser
PDF text extraction using PDFBox
Generate Lucene documents
Separate collections – Articles, Docs, etc.
Open Source wins…
Requirements
Voice of the customer
Make it faster
Easier to use
Better results
Can you just use Google?
Technical team concerns
Custom code
Lucene aging
JSF foundation - GUI complexity
Business / Technical
Project Inspiration
Advanced Full-Text Search Capabilities
Optimized for High Volume Web Traffic
Standards Based Open Interfaces - XML,JSON and HTTP
Comprehensive HTML Administration Interfaces
Server statistics exposed over JMX for monitoring
Scalability - Efficient Replication to other Solr Search Servers
Flexible and Adaptable with XML configuration
Extensible Plugin Architecture
Solr Uses the Lucene Search Library and Extends it!
A Real Data Schema, with Numeric Types, Dynamic Fields, Unique Keys
Powerful Extensions to the Lucene Query Language
Faceted Search and Filtering
Advanced, Configurable Text Analysis
Highly Configurable and User Extensible Caching
Performance Optimizations
External Configuration via XML
An Administration Interface
Monitorable Logging
Fast Incremental Updates and Index Replication
Highly Scalable Distributed search with sharded index across multiple hosts
XML, CSV/delimited-text, and binary update formats
Easy ways to pull in data from databases and XML files from local disk and HTTP sources
Rich Document Parsing and Indexing (PDF, Word, HTML, etc) using Apache Tika
Multiple search indices
Apachecon 2010
Solr 4
Solr
Faceting!
Modernize GUI
Deprecate custom code base
Autocomplete using Yahoo UI
Did you mean?
Tika
ExtractingRequestHandler (Solr Cell)
Extract more mime types
Solr 4 (Trunk)
DirectSolrSpellChecker
More like this
Synonym list
Future migration path
Why?
Front-End
Screenshot / Demo
Front-End
Screenshot / Demo / 2
Requirements
Dynamic GUI Interface AJAX Solr / Solr 4
Faceting
Autocomplete
Spell checker
Did you mean?
Deeper search (attachments) Tika
Better hit highlighter Solr 4
Technical Translation
Why AJAX Solr?
Limited resources / no budget
No GUI designers on staff
Limited specialization
“Enough” JavaScript – but not experts
Dynamic GUIs are commonplace (AJAX)
Autocomplete
Faceting
AJAX Solr framework helps with all of these
Considerations
AJAX Solr
Modern Standards
JQUERY / JSON friendly
Widget Framework
Autocomplete
Query submit
Save settings
Sort /display results
Pagination
Facet by product
Facet by doc type
Challenges
Session management
Strength of community (Google Group)
Proxy Server
Benefits / Challenges
AJAX Solr DEEP DIVE
Solr
Search Server
Overall system architecture
Index
Browser
Client
Proxy
Server
Web
Application
Server
Why AJAX Solr?
• Dynamic GUI
– Faceting
– Autocomplete
• Faster GUI
– Less data traffic between server and client
– Less area to refresh
– Less mouse clicks
• Intuitive
What is AJAX Solr?
It is JavaScript framework-agnostic, but
requires an AJAX implementation for
communication with Solr. As such, you may
use the library whether you develop using
jQuery, MooTools, Prototype, Dojo, or any
other framework.
AJAX Solr Wiki
Intro AJAX Solr Framework
• MVC on top of an Ajax framework
– Our implementation uses Jquery
• Main components
– Manager
– Parameters
– Widgets
– Theming
Search Query
Search Black Box View
Browser
Client
index.jsp
solr/select?...&q=clock%20tree%2
0power&..
Web
Application
Server
Solr
Server
Search hits
JSON
Response
Search Results Response (JSON)
{
"responseHeader":{
"status":0,
"QTime":960,
"params":{
...
"facet":"true",
"facet.field":[... "{!ex=products}products"],
...
"fq":[... "{!tag=products}products:"Synplify FPGA""],
...
"q":"clock tree power",
...
"spellcheck":"true",
....}},
"response":{"numFound":12,"start":0,"maxScore":1.5953931,
"docs":[
{
...
"id":"913646",
...
"title":" Clock tree fan out using syn_maxfan",
...
"products":["Synplify FPGA"],
"teaser":"... Question: I have a design and I am targetting
Spartan devices. The clock is not meeting timing in a design,
..."},
...
},
"facet_counts":{
...
"facet_fields":{
...
"products":{
...
"Synplify FPGA":12,
...}},
....},
"highlighting":{
"913646":{
"title":[" <em>Clock</em> <em>tree</em> fan out using
syn_maxfan"],
"indexed_content":["The <em>clock</em> is not meeting
timing in a design,..."]},
...}},
"spellcheck":{
"suggestions":{}}}
Autocomplete
Autocomplete Black box view
Browser
Client
solr/terms?...&terms.regex=.*[_-
]clo.*|^[+|.|%60|-]?clo.*&...
Solr
Server
autocomplete
JSON Response
Autocomplete response
{
"responseHeader":{
"status":0,
"QTime":377},
"terms":{
"indexed_content":{
"run_clock_create_tree":41,
"clock_crossing":15,
"timing_crpr_remove_muxed_clock_crp":6,
"report_clock_crossing":5,
"crpr_remove_muxed_clock_crp":3,
...}
}
}
AJAX Solr Architecture
Web Browser
Widget
(View)
Manager
(Controller)
ParameterStore
(Model)
Solr
Server
Theme
(Helpers)
Manager
• Set solrUrl
Manager = new AjaxSolr.Manager({
solrUrl: 'http://www…com/solr/‘
});
Solr
Search Server
More on Manager
Index
Browser
Client
Proxy
Server
Web
Application
Server
Direct or Proxy
Manager Life Cycle
Manager ParameterStore WidgetWidgetWidget
On index.jsp page load
Instantiate
setStore()
Instantiate
InstantiateaddWidget()
For each
widget
init()
init()
init()
For each
widget
For each
widget doRequest() beforeRequest()
executeRequest()
For each
widget afterRequest()
Ajax call
ParameterStore
• Solr parameters
– Single: q, start
– Multi valued: fq
• Methods
– get, add, addByValue, …
Manager.store.addByValue('q', '*:*');
• Derived classes
– ParameterHashStore
– ParameterHistoryStore
– ParameterYUIStore
ParameterHashStore
• Esoteric Requirements
– Bookmarking
– Back button
– URL masking
Manager.setStore(new
AjaxSolr.ParameterHashStore());
Manager.store.exposed = [ 'fq', 'q', 'start', 'sort'];
Manager.init();
Widgets
• What is a Widget?
• AbstractWidget
– id, target
• Derived Widgets
– AbstractFacetWidget
– AbstractTextWidget
– AbstractSpellcheckWidget
– AbstractSpatialWidget
– PagerWidget
AbstractWidget
AjaxSolr.AbstractWidget = AjaxSolr.Class.extend(
{ //Attributes
id: null,
target: null,
//Methods
init: function () {
…
},
beforeRequest: function () {
…
},
afterRequest: function () {
…
}
}
Manager Life Cycle
Manager ParameterStore WidgetWidgetWidget
On index.jsp page load
Instantiate
setStore()
Instantiate
InstantiateaddWidget()
For each
widget
init()
init()
init()
For each
widget
For each
widget doRequest() beforeRequest()
executeRequest()
For each
widget afterRequest()
Ajax call
AbstractTextWidget
• The widget that manipulates
the ’q’ parameter
• Example implementations:
– TextWidget.q.js
– AutocompleteTermWidget.js
AutocompleteTermWidget
First term Two or more terms
AutocompleteTermWidget
AjaxSolr.AutocompleteTermWidget = AjaxSolr.AbstractTextWidget.extend(
{ //Attributes
field: null,
tokenized: true,
…
//Methods
init: function () {
//Event binding such as Keydown, <CR> and Autocomplete.
},
beforeRequest: function () {
//Example, blur & disable input field.
},
afterRequest: function () {
//Example, enable focus input field.
}
}
AutocompleteTermWidget
• Suggestion algorithms
– First term: TermsComponent
– Second, third, etc. : facet.prefix
• Analytics
– Search query
– Autocomplete
ResultWidget
ResultWidget
AjaxSolr.ResultWidget = AjaxSolr.AbstractWidget.extend(
{
//Methods
init: function () {
//Event binding such manipulating results, say hide details.
},
beforeRequest: function () {
//Example task done here, loading image.
},
afterRequest: function () {
//Main task of showing the hit results.
}
}
ResultWidget
• Function: Show the search results. Based
on tutorial example
• Extends AbstractWidget
• Analytics
– Total hit count
– Which filters and facets
– Selected content type
PagerWidget
• Function: Pager footer for going to next,
previous result pages, etc.
• Extends AbstractWidget
PagerWidget
AjaxSolr.PagerWidget = AjaxSolr.AbstractWidget.extend(
{
//Attributes
…
//Methods
init: function () {
//Empty
},
beforeRequest: function () {
//Empty
},
afterRequest: function () {
//Main task of building the pager.
}
}
AbstractFacetWidget
• For implementing
search faceting
• Product, DocType
AbstractFacetWidget
AjaxSolr.ProdTypeWidget = AjaxSolr.AbstractFacetWidget(
{
//Single vs. multiValue fq
multiValue: false
…
//Methods
init: function () {
//Initializes the facet field and related parameters.
},
beforeRequest: function () { //Empty},
afterRequest: function () {
//Setup click handler for the selected products.
}
clickhandler: function() { doRequest for selecting a product.}
unclickhandler: function() { doRequest when deselecting a product.}
}
Theme
• Separate presentation layer
– Result widget: Display metadata and
summary
– Facet widget: Attach click handler
AjaxSolr.theme.prototype.facet_link =
function (value, handler) {
return $('<a href="#"/>').text(value).click(handler);
};
AjaxSolr.theme('facet_link', facet_value,facetHandler)
Other Requirements
• Interaction with other applications
– Third party JavaScript
• Analytics, Survey
– Backend applications
• Recent searches
• Personalized search profile
• Error handling
– Ajax Exception
– Application logging
Security concerns
• Coarse vs. Granular
– Proxy blocking
– Role based filter
• Session management
– Error handling
– Timeout
Debugging
• Browser side debugging
– Firebug on Firefox
– Chrome developer tools
• Raw Solr JSON/XML
– Learn it!
Performance Tuning
• Reduce Traffic between Server and
Browser
– Filter on server
– Minimize browser side computation
– Solr schema consideration
– Compress JavaScript & CSS
• Proxy Server Caching
– JavaScript, CSS
Housekeeping
• Jquery & Jquery-UI upkeep
• Browser compatibilities
– NO IE 6 support
– IE 10
– Plugins
Summary
• Make your GUI Shine with AJAX Solr
• Understanding of the Framework
• Best practices
• Challenge and possibilities
Acknowledgements
• AJAX Solr creator James McKinney
• Lucene / Solr community
• SolvNet Development team
References
• AJAX Solr Wiki
https://github.com/evolvingweb/ajax-solr/wiki
• Google group ‘ajax-solr’
https://groups.google.com/forum/?fromgroups#!
forum/ajax-solr
CONFERENCE PARTY
The Tipsy Crow: 770 5th Ave
Starts after Stump The Chump
Conference badge gets you in
TOMORROW
Breakfast starts at 7:30
Keynotes start at 8:30
CONTACT US

Weitere ähnliche Inhalte

Was ist angesagt?

What-is-Laravel-23-August-2017.pptx
What-is-Laravel-23-August-2017.pptxWhat-is-Laravel-23-August-2017.pptx
What-is-Laravel-23-August-2017.pptxAbhijeetKumar456867
 
SOAP 기반/ RESTful기반 웹서비스 비교
SOAP 기반/ RESTful기반 웹서비스 비교SOAP 기반/ RESTful기반 웹서비스 비교
SOAP 기반/ RESTful기반 웹서비스 비교seungdols
 
ASP.NET Routing & MVC
ASP.NET Routing & MVCASP.NET Routing & MVC
ASP.NET Routing & MVCEmad Alashi
 
Single sign on using SAML
Single sign on using SAML Single sign on using SAML
Single sign on using SAML Programming Talents
 
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...Edureka!
 
Reasons to use React Query
Reasons to use React QueryReasons to use React Query
Reasons to use React Queryjavaria javaid
 
Selenium introduction
Selenium introductionSelenium introduction
Selenium introductionPankaj Dubey
 
Etiquetas bĂĄsicas jsf
Etiquetas bĂĄsicas jsfEtiquetas bĂĄsicas jsf
Etiquetas bĂĄsicas jsflauritat_9
 
Monitor và tối ưu sql server
Monitor và tối ưu sql serverMonitor và tối ưu sql server
Monitor và tối ưu sql serverHuân Bùi Đình
 
Spring AOP in Nutshell
Spring AOP in Nutshell Spring AOP in Nutshell
Spring AOP in Nutshell Onkar Deshpande
 
Asp.Net Identity
Asp.Net IdentityAsp.Net Identity
Asp.Net IdentityMarwa Ahmad
 

Was ist angesagt? (20)

What-is-Laravel-23-August-2017.pptx
What-is-Laravel-23-August-2017.pptxWhat-is-Laravel-23-August-2017.pptx
What-is-Laravel-23-August-2017.pptx
 
SOAP 기반/ RESTful기반 웹서비스 비교
SOAP 기반/ RESTful기반 웹서비스 비교SOAP 기반/ RESTful기반 웹서비스 비교
SOAP 기반/ RESTful기반 웹서비스 비교
 
ASP.NET Routing & MVC
ASP.NET Routing & MVCASP.NET Routing & MVC
ASP.NET Routing & MVC
 
Portfolio Software Engineer
Portfolio Software EngineerPortfolio Software Engineer
Portfolio Software Engineer
 
Selenium presentation
Selenium presentationSelenium presentation
Selenium presentation
 
Single sign on using SAML
Single sign on using SAML Single sign on using SAML
Single sign on using SAML
 
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
 
Reasons to use React Query
Reasons to use React QueryReasons to use React Query
Reasons to use React Query
 
Postman
PostmanPostman
Postman
 
Selenium introduction
Selenium introductionSelenium introduction
Selenium introduction
 
Jsp ppt
Jsp pptJsp ppt
Jsp ppt
 
LINQ in C#
LINQ in C#LINQ in C#
LINQ in C#
 
Etiquetas bĂĄsicas jsf
Etiquetas bĂĄsicas jsfEtiquetas bĂĄsicas jsf
Etiquetas bĂĄsicas jsf
 
Getting started with entity framework
Getting started with entity framework Getting started with entity framework
Getting started with entity framework
 
Monitor và tối ưu sql server
Monitor và tối ưu sql serverMonitor và tối ưu sql server
Monitor và tối ưu sql server
 
Oracle Enterprise Manager 12c & Management Packs
Oracle Enterprise Manager 12c & Management PacksOracle Enterprise Manager 12c & Management Packs
Oracle Enterprise Manager 12c & Management Packs
 
ASP.NET Core
ASP.NET CoreASP.NET Core
ASP.NET Core
 
Spring AOP in Nutshell
Spring AOP in Nutshell Spring AOP in Nutshell
Spring AOP in Nutshell
 
Connection Pooling
Connection PoolingConnection Pooling
Connection Pooling
 
Asp.Net Identity
Asp.Net IdentityAsp.Net Identity
Asp.Net Identity
 

Ähnlich wie Make your gui shine with ajax solr

Laurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus PresentationLaurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus PresentationAjax Experience 2009
 
Apex Code Analysis Using the Tooling API and Canvas
Apex Code Analysis Using the Tooling API and CanvasApex Code Analysis Using the Tooling API and Canvas
Apex Code Analysis Using the Tooling API and CanvasSalesforce Developers
 
C# Advanced L09-HTML5+ASP
C# Advanced L09-HTML5+ASPC# Advanced L09-HTML5+ASP
C# Advanced L09-HTML5+ASPMohammad Shaker
 
Session on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh GundechaSession on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh GundechaAgile Testing Alliance
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...Fabio Franzini
 
Introduction to ajax
Introduction to ajaxIntroduction to ajax
Introduction to ajaxVenkat Pinagadi
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop OverviewShubhra Kar
 
Clojure Web Development
Clojure Web DevelopmentClojure Web Development
Clojure Web DevelopmentHong Jiang
 
Using Ajax In Domino Web Applications
Using Ajax In Domino Web ApplicationsUsing Ajax In Domino Web Applications
Using Ajax In Domino Web Applicationsdominion
 
Advanced JavaScript
Advanced JavaScriptAdvanced JavaScript
Advanced JavaScriptMahmoud Tolba
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksSunil Patil
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworksSunil Patil
 
Developing Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web ApplicationDeveloping Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web ApplicationMark Gu
 
New-Age Search through Apache Solr
New-Age Search through Apache SolrNew-Age Search through Apache Solr
New-Age Search through Apache SolrEdureka!
 
Orms vs Micro-ORMs
Orms vs Micro-ORMsOrms vs Micro-ORMs
Orms vs Micro-ORMsDavid Paquette
 

Ähnlich wie Make your gui shine with ajax solr (20)

Laurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus PresentationLaurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus Presentation
 
Apex Code Analysis Using the Tooling API and Canvas
Apex Code Analysis Using the Tooling API and CanvasApex Code Analysis Using the Tooling API and Canvas
Apex Code Analysis Using the Tooling API and Canvas
 
C# Advanced L09-HTML5+ASP
C# Advanced L09-HTML5+ASPC# Advanced L09-HTML5+ASP
C# Advanced L09-HTML5+ASP
 
AD102 - Break out of the Box
AD102 - Break out of the BoxAD102 - Break out of the Box
AD102 - Break out of the Box
 
Session on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh GundechaSession on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh Gundecha
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
Introduction to ajax
Introduction to ajaxIntroduction to ajax
Introduction to ajax
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
 
Clojure Web Development
Clojure Web DevelopmentClojure Web Development
Clojure Web Development
 
Ajax
AjaxAjax
Ajax
 
Using Ajax In Domino Web Applications
Using Ajax In Domino Web ApplicationsUsing Ajax In Domino Web Applications
Using Ajax In Domino Web Applications
 
Advanced JavaScript
Advanced JavaScriptAdvanced JavaScript
Advanced JavaScript
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source Frameworks
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworks
 
Developing Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web ApplicationDeveloping Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web Application
 
Oracle OpenWorld 2014 Review Part Four - PaaS Middleware
Oracle OpenWorld 2014 Review Part Four - PaaS MiddlewareOracle OpenWorld 2014 Review Part Four - PaaS Middleware
Oracle OpenWorld 2014 Review Part Four - PaaS Middleware
 
AMIS Oracle OpenWorld 2013 Review Part 3 - Fusion Middleware
AMIS Oracle OpenWorld 2013 Review Part 3 - Fusion MiddlewareAMIS Oracle OpenWorld 2013 Review Part 3 - Fusion Middleware
AMIS Oracle OpenWorld 2013 Review Part 3 - Fusion Middleware
 
New-Age Search through Apache Solr
New-Age Search through Apache SolrNew-Age Search through Apache Solr
New-Age Search through Apache Solr
 
70487.pdf
70487.pdf70487.pdf
70487.pdf
 
Orms vs Micro-ORMs
Orms vs Micro-ORMsOrms vs Micro-ORMs
Orms vs Micro-ORMs
 

Mehr von lucenerevolution

Text Classification Powered by Apache Mahout and Lucene
Text Classification Powered by Apache Mahout and LuceneText Classification Powered by Apache Mahout and Lucene
Text Classification Powered by Apache Mahout and Lucenelucenerevolution
 
State of the Art Logging. Kibana4Solr is Here!
State of the Art Logging. Kibana4Solr is Here! State of the Art Logging. Kibana4Solr is Here!
State of the Art Logging. Kibana4Solr is Here! lucenerevolution
 
Building Client-side Search Applications with Solr
Building Client-side Search Applications with SolrBuilding Client-side Search Applications with Solr
Building Client-side Search Applications with Solrlucenerevolution
 
Integrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applicationsIntegrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applicationslucenerevolution
 
Scaling Solr with SolrCloud
Scaling Solr with SolrCloudScaling Solr with SolrCloud
Scaling Solr with SolrCloudlucenerevolution
 
Administering and Monitoring SolrCloud Clusters
Administering and Monitoring SolrCloud ClustersAdministering and Monitoring SolrCloud Clusters
Administering and Monitoring SolrCloud Clusterslucenerevolution
 
Implementing a Custom Search Syntax using Solr, Lucene, and Parboiled
Implementing a Custom Search Syntax using Solr, Lucene, and ParboiledImplementing a Custom Search Syntax using Solr, Lucene, and Parboiled
Implementing a Custom Search Syntax using Solr, Lucene, and Parboiledlucenerevolution
 
Using Solr to Search and Analyze Logs
Using Solr to Search and Analyze Logs Using Solr to Search and Analyze Logs
Using Solr to Search and Analyze Logs lucenerevolution
 
Enhancing relevancy through personalization & semantic search
Enhancing relevancy through personalization & semantic searchEnhancing relevancy through personalization & semantic search
Enhancing relevancy through personalization & semantic searchlucenerevolution
 
Real-time Inverted Search in the Cloud Using Lucene and Storm
Real-time Inverted Search in the Cloud Using Lucene and StormReal-time Inverted Search in the Cloud Using Lucene and Storm
Real-time Inverted Search in the Cloud Using Lucene and Stormlucenerevolution
 
Solr's Admin UI - Where does the data come from?
Solr's Admin UI - Where does the data come from?Solr's Admin UI - Where does the data come from?
Solr's Admin UI - Where does the data come from?lucenerevolution
 
Schemaless Solr and the Solr Schema REST API
Schemaless Solr and the Solr Schema REST APISchemaless Solr and the Solr Schema REST API
Schemaless Solr and the Solr Schema REST APIlucenerevolution
 
High Performance JSON Search and Relational Faceted Browsing with Lucene
High Performance JSON Search and Relational Faceted Browsing with LuceneHigh Performance JSON Search and Relational Faceted Browsing with Lucene
High Performance JSON Search and Relational Faceted Browsing with Lucenelucenerevolution
 
Text Classification with Lucene/Solr, Apache Hadoop and LibSVM
Text Classification with Lucene/Solr, Apache Hadoop and LibSVMText Classification with Lucene/Solr, Apache Hadoop and LibSVM
Text Classification with Lucene/Solr, Apache Hadoop and LibSVMlucenerevolution
 
Faceted Search with Lucene
Faceted Search with LuceneFaceted Search with Lucene
Faceted Search with Lucenelucenerevolution
 
Recent Additions to Lucene Arsenal
Recent Additions to Lucene ArsenalRecent Additions to Lucene Arsenal
Recent Additions to Lucene Arsenallucenerevolution
 
Turning search upside down
Turning search upside downTurning search upside down
Turning search upside downlucenerevolution
 
Spellchecking in Trovit: Implementing a Contextual Multi-language Spellchecke...
Spellchecking in Trovit: Implementing a Contextual Multi-language Spellchecke...Spellchecking in Trovit: Implementing a Contextual Multi-language Spellchecke...
Spellchecking in Trovit: Implementing a Contextual Multi-language Spellchecke...lucenerevolution
 
Shrinking the haystack wes caldwell - final
Shrinking the haystack   wes caldwell - finalShrinking the haystack   wes caldwell - final
Shrinking the haystack wes caldwell - finallucenerevolution
 

Mehr von lucenerevolution (20)

Text Classification Powered by Apache Mahout and Lucene
Text Classification Powered by Apache Mahout and LuceneText Classification Powered by Apache Mahout and Lucene
Text Classification Powered by Apache Mahout and Lucene
 
State of the Art Logging. Kibana4Solr is Here!
State of the Art Logging. Kibana4Solr is Here! State of the Art Logging. Kibana4Solr is Here!
State of the Art Logging. Kibana4Solr is Here!
 
Search at Twitter
Search at TwitterSearch at Twitter
Search at Twitter
 
Building Client-side Search Applications with Solr
Building Client-side Search Applications with SolrBuilding Client-side Search Applications with Solr
Building Client-side Search Applications with Solr
 
Integrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applicationsIntegrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applications
 
Scaling Solr with SolrCloud
Scaling Solr with SolrCloudScaling Solr with SolrCloud
Scaling Solr with SolrCloud
 
Administering and Monitoring SolrCloud Clusters
Administering and Monitoring SolrCloud ClustersAdministering and Monitoring SolrCloud Clusters
Administering and Monitoring SolrCloud Clusters
 
Implementing a Custom Search Syntax using Solr, Lucene, and Parboiled
Implementing a Custom Search Syntax using Solr, Lucene, and ParboiledImplementing a Custom Search Syntax using Solr, Lucene, and Parboiled
Implementing a Custom Search Syntax using Solr, Lucene, and Parboiled
 
Using Solr to Search and Analyze Logs
Using Solr to Search and Analyze Logs Using Solr to Search and Analyze Logs
Using Solr to Search and Analyze Logs
 
Enhancing relevancy through personalization & semantic search
Enhancing relevancy through personalization & semantic searchEnhancing relevancy through personalization & semantic search
Enhancing relevancy through personalization & semantic search
 
Real-time Inverted Search in the Cloud Using Lucene and Storm
Real-time Inverted Search in the Cloud Using Lucene and StormReal-time Inverted Search in the Cloud Using Lucene and Storm
Real-time Inverted Search in the Cloud Using Lucene and Storm
 
Solr's Admin UI - Where does the data come from?
Solr's Admin UI - Where does the data come from?Solr's Admin UI - Where does the data come from?
Solr's Admin UI - Where does the data come from?
 
Schemaless Solr and the Solr Schema REST API
Schemaless Solr and the Solr Schema REST APISchemaless Solr and the Solr Schema REST API
Schemaless Solr and the Solr Schema REST API
 
High Performance JSON Search and Relational Faceted Browsing with Lucene
High Performance JSON Search and Relational Faceted Browsing with LuceneHigh Performance JSON Search and Relational Faceted Browsing with Lucene
High Performance JSON Search and Relational Faceted Browsing with Lucene
 
Text Classification with Lucene/Solr, Apache Hadoop and LibSVM
Text Classification with Lucene/Solr, Apache Hadoop and LibSVMText Classification with Lucene/Solr, Apache Hadoop and LibSVM
Text Classification with Lucene/Solr, Apache Hadoop and LibSVM
 
Faceted Search with Lucene
Faceted Search with LuceneFaceted Search with Lucene
Faceted Search with Lucene
 
Recent Additions to Lucene Arsenal
Recent Additions to Lucene ArsenalRecent Additions to Lucene Arsenal
Recent Additions to Lucene Arsenal
 
Turning search upside down
Turning search upside downTurning search upside down
Turning search upside down
 
Spellchecking in Trovit: Implementing a Contextual Multi-language Spellchecke...
Spellchecking in Trovit: Implementing a Contextual Multi-language Spellchecke...Spellchecking in Trovit: Implementing a Contextual Multi-language Spellchecke...
Spellchecking in Trovit: Implementing a Contextual Multi-language Spellchecke...
 
Shrinking the haystack wes caldwell - final
Shrinking the haystack   wes caldwell - finalShrinking the haystack   wes caldwell - final
Shrinking the haystack wes caldwell - final
 

KĂźrzlich hochgeladen

Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 

KĂźrzlich hochgeladen (20)

Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
CĂłdigo Creativo y Arte de Software | Unidad 1
CĂłdigo Creativo y Arte de Software | Unidad 1CĂłdigo Creativo y Arte de Software | Unidad 1
CĂłdigo Creativo y Arte de Software | Unidad 1
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 

Make your gui shine with ajax solr

  • 1. MAKE YOUR GUI SHINE WITH AJAX SOLR Troy D. Thomas Product Engineering Manager Koorosh Vakhshoori Technical Architect
  • 2. Make Your GUI Shine With AJAX Solr Setting the Stage Company Backgrounder Project History Business & Technical Requirements Inspiration Demo Why AJAX Solr? AJAX Solr Framework DEEP DIVE Themes Widgets Challenges Q & A Agenda
  • 3. Company - Background Synopsys 25 year old company / 1.8B 2012 revenue Electronic Design Automation (EDA) Electrical engineers design computer chips High level design Simulation Test Place and route IP blocks Nearly every semiconductor built uses Synopsys software microprocessors, RAM, etc. Synopsys – What?
  • 4. Company Background SolvNet ÂŽ - online knowledge base system used by customers and employees Dedicated engineering team 20 year history 1993 Email 1995 A “Patchy” NCSA Web server + PERL CGI 1997 Verity Netscape search 2001 Java – Netscape Iplanet Portal + Verity 2005 Apache Lucene 2007 Pure Apache 2012 AJAX Solr / Solr 4 Synopsys – SolvNet ÂŽ
  • 5. Lucene Moved to Lucene - 2005 Custom tokenization helped results +delay_mode_zero Autocomplete - 2008 Custom Yahoo UI Widget Relatively Complex Tomcat w/ RMI callback HTML parser PDF text extraction using PDFBox Generate Lucene documents Separate collections – Articles, Docs, etc. Open Source wins…
  • 6. Requirements Voice of the customer Make it faster Easier to use Better results Can you just use Google? Technical team concerns Custom code Lucene aging JSF foundation - GUI complexity Business / Technical
  • 7. Project Inspiration Advanced Full-Text Search Capabilities Optimized for High Volume Web Traffic Standards Based Open Interfaces - XML,JSON and HTTP Comprehensive HTML Administration Interfaces Server statistics exposed over JMX for monitoring Scalability - Efficient Replication to other Solr Search Servers Flexible and Adaptable with XML configuration Extensible Plugin Architecture Solr Uses the Lucene Search Library and Extends it! A Real Data Schema, with Numeric Types, Dynamic Fields, Unique Keys Powerful Extensions to the Lucene Query Language Faceted Search and Filtering Advanced, Configurable Text Analysis Highly Configurable and User Extensible Caching Performance Optimizations External Configuration via XML An Administration Interface Monitorable Logging Fast Incremental Updates and Index Replication Highly Scalable Distributed search with sharded index across multiple hosts XML, CSV/delimited-text, and binary update formats Easy ways to pull in data from databases and XML files from local disk and HTTP sources Rich Document Parsing and Indexing (PDF, Word, HTML, etc) using Apache Tika Multiple search indices Apachecon 2010
  • 8. Solr 4 Solr Faceting! Modernize GUI Deprecate custom code base Autocomplete using Yahoo UI Did you mean? Tika ExtractingRequestHandler (Solr Cell) Extract more mime types Solr 4 (Trunk) DirectSolrSpellChecker More like this Synonym list Future migration path Why?
  • 11. Requirements Dynamic GUI Interface AJAX Solr / Solr 4 Faceting Autocomplete Spell checker Did you mean? Deeper search (attachments) Tika Better hit highlighter Solr 4 Technical Translation
  • 12. Why AJAX Solr? Limited resources / no budget No GUI designers on staff Limited specialization “Enough” JavaScript – but not experts Dynamic GUIs are commonplace (AJAX) Autocomplete Faceting AJAX Solr framework helps with all of these Considerations
  • 13. AJAX Solr Modern Standards JQUERY / JSON friendly Widget Framework Autocomplete Query submit Save settings Sort /display results Pagination Facet by product Facet by doc type Challenges Session management Strength of community (Google Group) Proxy Server Benefits / Challenges
  • 15. Solr Search Server Overall system architecture Index Browser Client Proxy Server Web Application Server
  • 16. Why AJAX Solr? • Dynamic GUI – Faceting – Autocomplete • Faster GUI – Less data traffic between server and client – Less area to refresh – Less mouse clicks • Intuitive
  • 17. What is AJAX Solr? It is JavaScript framework-agnostic, but requires an AJAX implementation for communication with Solr. As such, you may use the library whether you develop using jQuery, MooTools, Prototype, Dojo, or any other framework. AJAX Solr Wiki
  • 18. Intro AJAX Solr Framework • MVC on top of an Ajax framework – Our implementation uses Jquery • Main components – Manager – Parameters – Widgets – Theming
  • 20. Search Black Box View Browser Client index.jsp solr/select?...&q=clock%20tree%2 0power&.. Web Application Server Solr Server Search hits JSON Response
  • 21. Search Results Response (JSON) { "responseHeader":{ "status":0, "QTime":960, "params":{ ... "facet":"true", "facet.field":[... "{!ex=products}products"], ... "fq":[... "{!tag=products}products:"Synplify FPGA""], ... "q":"clock tree power", ... "spellcheck":"true", ....}}, "response":{"numFound":12,"start":0,"maxScore":1.5953931, "docs":[ { ... "id":"913646", ... "title":" Clock tree fan out using syn_maxfan", ... "products":["Synplify FPGA"], "teaser":"... Question: I have a design and I am targetting Spartan devices. The clock is not meeting timing in a design, ..."}, ... }, "facet_counts":{ ... "facet_fields":{ ... "products":{ ... "Synplify FPGA":12, ...}}, ....}, "highlighting":{ "913646":{ "title":[" <em>Clock</em> <em>tree</em> fan out using syn_maxfan"], "indexed_content":["The <em>clock</em> is not meeting timing in a design,..."]}, ...}}, "spellcheck":{ "suggestions":{}}}
  • 23. Autocomplete Black box view Browser Client solr/terms?...&terms.regex=.*[_- ]clo.*|^[+|.|%60|-]?clo.*&... Solr Server autocomplete JSON Response
  • 25. AJAX Solr Architecture Web Browser Widget (View) Manager (Controller) ParameterStore (Model) Solr Server Theme (Helpers)
  • 26. Manager • Set solrUrl Manager = new AjaxSolr.Manager({ solrUrl: 'http://www…com/solr/‘ });
  • 27. Solr Search Server More on Manager Index Browser Client Proxy Server Web Application Server Direct or Proxy
  • 28. Manager Life Cycle Manager ParameterStore WidgetWidgetWidget On index.jsp page load Instantiate setStore() Instantiate InstantiateaddWidget() For each widget init() init() init() For each widget For each widget doRequest() beforeRequest() executeRequest() For each widget afterRequest() Ajax call
  • 29. ParameterStore • Solr parameters – Single: q, start – Multi valued: fq • Methods – get, add, addByValue, … Manager.store.addByValue('q', '*:*'); • Derived classes – ParameterHashStore – ParameterHistoryStore – ParameterYUIStore
  • 30. ParameterHashStore • Esoteric Requirements – Bookmarking – Back button – URL masking Manager.setStore(new AjaxSolr.ParameterHashStore()); Manager.store.exposed = [ 'fq', 'q', 'start', 'sort']; Manager.init();
  • 31. Widgets • What is a Widget? • AbstractWidget – id, target • Derived Widgets – AbstractFacetWidget – AbstractTextWidget – AbstractSpellcheckWidget – AbstractSpatialWidget – PagerWidget
  • 32.
  • 33. AbstractWidget AjaxSolr.AbstractWidget = AjaxSolr.Class.extend( { //Attributes id: null, target: null, //Methods init: function () { … }, beforeRequest: function () { … }, afterRequest: function () { … } }
  • 34. Manager Life Cycle Manager ParameterStore WidgetWidgetWidget On index.jsp page load Instantiate setStore() Instantiate InstantiateaddWidget() For each widget init() init() init() For each widget For each widget doRequest() beforeRequest() executeRequest() For each widget afterRequest() Ajax call
  • 35. AbstractTextWidget • The widget that manipulates the ’q’ parameter • Example implementations: – TextWidget.q.js – AutocompleteTermWidget.js
  • 37. AutocompleteTermWidget AjaxSolr.AutocompleteTermWidget = AjaxSolr.AbstractTextWidget.extend( { //Attributes field: null, tokenized: true, … //Methods init: function () { //Event binding such as Keydown, <CR> and Autocomplete. }, beforeRequest: function () { //Example, blur & disable input field. }, afterRequest: function () { //Example, enable focus input field. } }
  • 38. AutocompleteTermWidget • Suggestion algorithms – First term: TermsComponent – Second, third, etc. : facet.prefix • Analytics – Search query – Autocomplete
  • 40. ResultWidget AjaxSolr.ResultWidget = AjaxSolr.AbstractWidget.extend( { //Methods init: function () { //Event binding such manipulating results, say hide details. }, beforeRequest: function () { //Example task done here, loading image. }, afterRequest: function () { //Main task of showing the hit results. } }
  • 41. ResultWidget • Function: Show the search results. Based on tutorial example • Extends AbstractWidget • Analytics – Total hit count – Which filters and facets – Selected content type
  • 42. PagerWidget • Function: Pager footer for going to next, previous result pages, etc. • Extends AbstractWidget
  • 43. PagerWidget AjaxSolr.PagerWidget = AjaxSolr.AbstractWidget.extend( { //Attributes … //Methods init: function () { //Empty }, beforeRequest: function () { //Empty }, afterRequest: function () { //Main task of building the pager. } }
  • 44. AbstractFacetWidget • For implementing search faceting • Product, DocType
  • 45. AbstractFacetWidget AjaxSolr.ProdTypeWidget = AjaxSolr.AbstractFacetWidget( { //Single vs. multiValue fq multiValue: false … //Methods init: function () { //Initializes the facet field and related parameters. }, beforeRequest: function () { //Empty}, afterRequest: function () { //Setup click handler for the selected products. } clickhandler: function() { doRequest for selecting a product.} unclickhandler: function() { doRequest when deselecting a product.} }
  • 46. Theme • Separate presentation layer – Result widget: Display metadata and summary – Facet widget: Attach click handler AjaxSolr.theme.prototype.facet_link = function (value, handler) { return $('<a href="#"/>').text(value).click(handler); }; AjaxSolr.theme('facet_link', facet_value,facetHandler)
  • 47. Other Requirements • Interaction with other applications – Third party JavaScript • Analytics, Survey – Backend applications • Recent searches • Personalized search profile • Error handling – Ajax Exception – Application logging
  • 48. Security concerns • Coarse vs. Granular – Proxy blocking – Role based filter • Session management – Error handling – Timeout
  • 49. Debugging • Browser side debugging – Firebug on Firefox – Chrome developer tools • Raw Solr JSON/XML – Learn it!
  • 50. Performance Tuning • Reduce Traffic between Server and Browser – Filter on server – Minimize browser side computation – Solr schema consideration – Compress JavaScript & CSS • Proxy Server Caching – JavaScript, CSS
  • 51. Housekeeping • Jquery & Jquery-UI upkeep • Browser compatibilities – NO IE 6 support – IE 10 – Plugins
  • 52. Summary • Make your GUI Shine with AJAX Solr • Understanding of the Framework • Best practices • Challenge and possibilities
  • 53. Acknowledgements • AJAX Solr creator James McKinney • Lucene / Solr community • SolvNet Development team
  • 54. References • AJAX Solr Wiki https://github.com/evolvingweb/ajax-solr/wiki • Google group ‘ajax-solr’ https://groups.google.com/forum/?fromgroups#! forum/ajax-solr
  • 55. CONFERENCE PARTY The Tipsy Crow: 770 5th Ave Starts after Stump The Chump Conference badge gets you in TOMORROW Breakfast starts at 7:30 Keynotes start at 8:30 CONTACT US