SlideShare une entreprise Scribd logo
1  sur  27
Enterprise Search in
  Plone using Solr
      Calvin Hendryx-Parker
    Plone Symposium East 2010




            nowhere to go but
           open source
           s i xf e e tu p . c om
What is Solr?
•   Java Based
•   Full-Text Search
•   Web Services API
•   Standards Based Interfaces
•   Scalable
•   XML Configuration
•   Extensible

                                 sixfeetup.com/deploy
Playing with Solr


•   Indexing
•   Query




                    sixfeetup.com/deploy
nowhere to go but
open source
s i xf e e tu p . c om
nowhere to go but
open source
s i xf e e tu p . c om
Solr Features
•   Data Schema
•   Faceted Search
•   Administrative Interface
•   Incremental Updates
•   Supports Sharding
•   Index Databases, Local Files and Web Pages
•   Supports Multiple Indexes

                                                 sixfeetup.com/deploy
Solr Features
•   Stopwords
•   Synonyms
•   Highlighted Context Snippets
•   Spelling Suggestions
•   More Like This Suggestions
•   Supports Rich Documents


                                   sixfeetup.com/deploy
nowhere to go but
open source
s i xf e e tu p . c om
nowhere to go but
open source
s i xf e e tu p . c om
nowhere to go but
open source
s i xf e e tu p . c om
Solr Performance
•   Wiktionary Dataset
•   49.5 Millions lines of XML
•   1.3 GB of data
•   1.7 Million Pages Index 5.5 hours
•   ZODB Size after import 1.1GB



                                        sixfeetup.com/deploy
Integration Options with Plone



•   collective.solr




                            sixfeetup.com/deploy
collective.solr Issues
•   Monkey Patching
•   Relies on collective.indexing
•   Duplicates all indexes
•   Sub-Optimal Integration with Zope Transactions
•   Relies on Thread Locals



                                               sixfeetup.com/deploy
What to do?


    nowhere to go but
   open source
   s i xf e e tu p . c om
Reevaluate


   nowhere to go but
  open source
  s i xf e e tu p . c om
Solr Integration as a Catalog Index



•   No Monkey Patching
•   Simpler Code




                                sixfeetup.com/deploy
Enter alm.solrindex
•   ZCatalog Index
•   Doesn't depend on Plone
•   Utilizes new foreign_connections Connection
    Method
•   Pass through Solr Queries
•   Direct access to the Solr Response



                                                  sixfeetup.com/deploy
nowhere to go but
open source
s i xf e e tu p . c om
nowhere to go but
open source
s i xf e e tu p . c om
Sorting


•   Still handled by the ZCatalog
•   Could change in the future




                                    sixfeetup.com/deploy
alm.solrindex Field Handlers


•   Handle Parsing Attributes for Indexing
•   Translate field-specific queries to Solr
•   Zope Utilities




                                             sixfeetup.com/deploy
Example Handler
 class TextFieldHandler(DefaultFieldHandler):
        <html>
   def parse_query(self, field, field_query):
        <body>
     name = field.name
        <h3>Code Sample</h3>
     request = {name: field_query}
        <p>Replace this text!</p>
     record = parseIndexRequest(request, name, ('query',))
     if not record.keys:
        </body>
        return None
        </html>
      query_str = ' '.join(record.keys)
      if not query_str:
         return None

      return {'q': u'+%s:%s' % (name, quote_query(query_str))}




                                                                 sixfeetup.com/deploy
Other alm.solrindex Features


•   GenericSetup Profile
•   Tests
•   Uses solrpy instead of the unsupported solr.py




                                                 sixfeetup.com/deploy
Tips
•   Can replace several ZCatalog indexes
•   Remove any indexes you have replaced
•   Use it for all Text Indexes
•   Still Utilize the ZCatalog Indexes for Everything
    Else




                                                   sixfeetup.com/deploy
Demo
  <html>
  <body>
  <h3>Code Sample</h3>
  <p>Replace this text!</p>
  </body>    Project Gutenberg   Data
  </html>




                                        sixfeetup.com/deploy
Questions?


   nowhere to go but
  open source
  s i xf e e tu p . c om
sixfeetup.com/deploy
                       sixfeetup.com/deploy

Contenu connexe

Tendances

Introduction to libre « fulltext » technology
Introduction to libre « fulltext » technologyIntroduction to libre « fulltext » technology
Introduction to libre « fulltext » technologyRobert Viseur
 
QueryPath, Mash-ups, and Web Services
QueryPath, Mash-ups, and Web ServicesQueryPath, Mash-ups, and Web Services
QueryPath, Mash-ups, and Web ServicesMatt Butcher
 
Text Manipulation with/without Parsec
Text Manipulation with/without ParsecText Manipulation with/without Parsec
Text Manipulation with/without Parsecujihisa
 
Sphinx && Perl Houston Perl Mongers - May 8th, 2014
Sphinx && Perl  Houston Perl Mongers - May 8th, 2014Sphinx && Perl  Houston Perl Mongers - May 8th, 2014
Sphinx && Perl Houston Perl Mongers - May 8th, 2014Brett Estrade
 
Apache Solr - Enterprise search platform
Apache Solr - Enterprise search platformApache Solr - Enterprise search platform
Apache Solr - Enterprise search platformTommaso Teofili
 

Tendances (6)

Introduction to libre « fulltext » technology
Introduction to libre « fulltext » technologyIntroduction to libre « fulltext » technology
Introduction to libre « fulltext » technology
 
QueryPath, Mash-ups, and Web Services
QueryPath, Mash-ups, and Web ServicesQueryPath, Mash-ups, and Web Services
QueryPath, Mash-ups, and Web Services
 
Text Manipulation with/without Parsec
Text Manipulation with/without ParsecText Manipulation with/without Parsec
Text Manipulation with/without Parsec
 
Sphinx && Perl Houston Perl Mongers - May 8th, 2014
Sphinx && Perl  Houston Perl Mongers - May 8th, 2014Sphinx && Perl  Houston Perl Mongers - May 8th, 2014
Sphinx && Perl Houston Perl Mongers - May 8th, 2014
 
Apache Solr - Enterprise search platform
Apache Solr - Enterprise search platformApache Solr - Enterprise search platform
Apache Solr - Enterprise search platform
 
JSON in Solr: from top to bottom
JSON in Solr: from top to bottomJSON in Solr: from top to bottom
JSON in Solr: from top to bottom
 

Similaire à Enterprise search in Plone using Solr

Scala Bay Meetup - The state of Scala code style and quality
Scala Bay Meetup - The state of Scala code style and qualityScala Bay Meetup - The state of Scala code style and quality
Scala Bay Meetup - The state of Scala code style and qualityJaime Jorge
 
Rapid API Development ArangoDB Foxx
Rapid API Development ArangoDB FoxxRapid API Development ArangoDB Foxx
Rapid API Development ArangoDB FoxxMichael Hackstein
 
Performance and Abstractions
Performance and AbstractionsPerformance and Abstractions
Performance and AbstractionsMetosin Oy
 
Solr Recipes Workshop
Solr Recipes WorkshopSolr Recipes Workshop
Solr Recipes WorkshopErik Hatcher
 
Solr/Elasticsearch for CF Developers (and others)
Solr/Elasticsearch for CF Developers (and others)Solr/Elasticsearch for CF Developers (and others)
Solr/Elasticsearch for CF Developers (and others)Mary Jo Sminkey
 
From Lucene to Solr 4 Trunk
From Lucene to Solr 4 TrunkFrom Lucene to Solr 4 Trunk
From Lucene to Solr 4 Trunktdthomassld
 
OWASP 2013 APPSEC USA ZAP Hackathon
OWASP 2013 APPSEC USA ZAP HackathonOWASP 2013 APPSEC USA ZAP Hackathon
OWASP 2013 APPSEC USA ZAP HackathonSimon Bennetts
 
Parallel SQL and Streaming Expressions in Apache Solr 6
Parallel SQL and Streaming Expressions in Apache Solr 6Parallel SQL and Streaming Expressions in Apache Solr 6
Parallel SQL and Streaming Expressions in Apache Solr 6Shalin Shekhar Mangar
 
Best practices for highly available and large scale SolrCloud
Best practices for highly available and large scale SolrCloudBest practices for highly available and large scale SolrCloud
Best practices for highly available and large scale SolrCloudAnshum Gupta
 
Solr: 4 big features
Solr: 4 big featuresSolr: 4 big features
Solr: 4 big featuresDavid Smiley
 
Building Intelligent Search Applications with Apache Solr and PHP5
Building Intelligent Search Applications with Apache Solr and PHP5Building Intelligent Search Applications with Apache Solr and PHP5
Building Intelligent Search Applications with Apache Solr and PHP5israelekpo
 
Introduction to Solr
Introduction to SolrIntroduction to Solr
Introduction to SolrErik Hatcher
 
Middleware in Golang: InVision's Rye
Middleware in Golang: InVision's RyeMiddleware in Golang: InVision's Rye
Middleware in Golang: InVision's RyeCale Hoopes
 

Similaire à Enterprise search in Plone using Solr (20)

Scala Bay Meetup - The state of Scala code style and quality
Scala Bay Meetup - The state of Scala code style and qualityScala Bay Meetup - The state of Scala code style and quality
Scala Bay Meetup - The state of Scala code style and quality
 
Solr Recipes
Solr RecipesSolr Recipes
Solr Recipes
 
Rapid API Development ArangoDB Foxx
Rapid API Development ArangoDB FoxxRapid API Development ArangoDB Foxx
Rapid API Development ArangoDB Foxx
 
Performance and Abstractions
Performance and AbstractionsPerformance and Abstractions
Performance and Abstractions
 
Solr 8 interview
Solr 8 interview Solr 8 interview
Solr 8 interview
 
Polyglot Grails
Polyglot GrailsPolyglot Grails
Polyglot Grails
 
SolrCloud on Hadoop
SolrCloud on HadoopSolrCloud on Hadoop
SolrCloud on Hadoop
 
Solr Recipes Workshop
Solr Recipes WorkshopSolr Recipes Workshop
Solr Recipes Workshop
 
Solr Masterclass Bangkok, June 2014
Solr Masterclass Bangkok, June 2014Solr Masterclass Bangkok, June 2014
Solr Masterclass Bangkok, June 2014
 
Solr/Elasticsearch for CF Developers (and others)
Solr/Elasticsearch for CF Developers (and others)Solr/Elasticsearch for CF Developers (and others)
Solr/Elasticsearch for CF Developers (and others)
 
From Lucene to Solr 4 Trunk
From Lucene to Solr 4 TrunkFrom Lucene to Solr 4 Trunk
From Lucene to Solr 4 Trunk
 
OWASP 2013 APPSEC USA ZAP Hackathon
OWASP 2013 APPSEC USA ZAP HackathonOWASP 2013 APPSEC USA ZAP Hackathon
OWASP 2013 APPSEC USA ZAP Hackathon
 
Parallel SQL and Streaming Expressions in Apache Solr 6
Parallel SQL and Streaming Expressions in Apache Solr 6Parallel SQL and Streaming Expressions in Apache Solr 6
Parallel SQL and Streaming Expressions in Apache Solr 6
 
Best practices for highly available and large scale SolrCloud
Best practices for highly available and large scale SolrCloudBest practices for highly available and large scale SolrCloud
Best practices for highly available and large scale SolrCloud
 
Solr
SolrSolr
Solr
 
Solr: 4 big features
Solr: 4 big featuresSolr: 4 big features
Solr: 4 big features
 
Solr
SolrSolr
Solr
 
Building Intelligent Search Applications with Apache Solr and PHP5
Building Intelligent Search Applications with Apache Solr and PHP5Building Intelligent Search Applications with Apache Solr and PHP5
Building Intelligent Search Applications with Apache Solr and PHP5
 
Introduction to Solr
Introduction to SolrIntroduction to Solr
Introduction to Solr
 
Middleware in Golang: InVision's Rye
Middleware in Golang: InVision's RyeMiddleware in Golang: InVision's Rye
Middleware in Golang: InVision's Rye
 

Plus de Calvin Hendryx-Parker

Plus de Calvin Hendryx-Parker (8)

Plone and Drupal -- CMS Coexistance in Higher Education
Plone and Drupal -- CMS Coexistance in Higher EducationPlone and Drupal -- CMS Coexistance in Higher Education
Plone and Drupal -- CMS Coexistance in Higher Education
 
Plone roadmap
Plone roadmapPlone roadmap
Plone roadmap
 
How to seal the deal
How to seal the dealHow to seal the deal
How to seal the deal
 
2010 py ohio supervisor talk
2010 py ohio supervisor talk2010 py ohio supervisor talk
2010 py ohio supervisor talk
 
Social Networking Tools Session Three
Social Networking Tools Session ThreeSocial Networking Tools Session Three
Social Networking Tools Session Three
 
Social Networking Tools Session One
Social Networking Tools   Session OneSocial Networking Tools   Session One
Social Networking Tools Session One
 
Social Networking Tools Session Two
Social Networking Tools   Session TwoSocial Networking Tools   Session Two
Social Networking Tools Session Two
 
Plone's Anatomy
Plone's AnatomyPlone's Anatomy
Plone's Anatomy
 

Dernier

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 

Dernier (20)

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 

Enterprise search in Plone using Solr

  • 1. Enterprise Search in Plone using Solr Calvin Hendryx-Parker Plone Symposium East 2010 nowhere to go but open source s i xf e e tu p . c om
  • 2. What is Solr? • Java Based • Full-Text Search • Web Services API • Standards Based Interfaces • Scalable • XML Configuration • Extensible sixfeetup.com/deploy
  • 3. Playing with Solr • Indexing • Query sixfeetup.com/deploy
  • 4. nowhere to go but open source s i xf e e tu p . c om
  • 5. nowhere to go but open source s i xf e e tu p . c om
  • 6. Solr Features • Data Schema • Faceted Search • Administrative Interface • Incremental Updates • Supports Sharding • Index Databases, Local Files and Web Pages • Supports Multiple Indexes sixfeetup.com/deploy
  • 7. Solr Features • Stopwords • Synonyms • Highlighted Context Snippets • Spelling Suggestions • More Like This Suggestions • Supports Rich Documents sixfeetup.com/deploy
  • 8. nowhere to go but open source s i xf e e tu p . c om
  • 9. nowhere to go but open source s i xf e e tu p . c om
  • 10. nowhere to go but open source s i xf e e tu p . c om
  • 11. Solr Performance • Wiktionary Dataset • 49.5 Millions lines of XML • 1.3 GB of data • 1.7 Million Pages Index 5.5 hours • ZODB Size after import 1.1GB sixfeetup.com/deploy
  • 12. Integration Options with Plone • collective.solr sixfeetup.com/deploy
  • 13. collective.solr Issues • Monkey Patching • Relies on collective.indexing • Duplicates all indexes • Sub-Optimal Integration with Zope Transactions • Relies on Thread Locals sixfeetup.com/deploy
  • 14. What to do? nowhere to go but open source s i xf e e tu p . c om
  • 15. Reevaluate nowhere to go but open source s i xf e e tu p . c om
  • 16. Solr Integration as a Catalog Index • No Monkey Patching • Simpler Code sixfeetup.com/deploy
  • 17. Enter alm.solrindex • ZCatalog Index • Doesn't depend on Plone • Utilizes new foreign_connections Connection Method • Pass through Solr Queries • Direct access to the Solr Response sixfeetup.com/deploy
  • 18. nowhere to go but open source s i xf e e tu p . c om
  • 19. nowhere to go but open source s i xf e e tu p . c om
  • 20. Sorting • Still handled by the ZCatalog • Could change in the future sixfeetup.com/deploy
  • 21. alm.solrindex Field Handlers • Handle Parsing Attributes for Indexing • Translate field-specific queries to Solr • Zope Utilities sixfeetup.com/deploy
  • 22. Example Handler class TextFieldHandler(DefaultFieldHandler): <html> def parse_query(self, field, field_query): <body> name = field.name <h3>Code Sample</h3> request = {name: field_query} <p>Replace this text!</p> record = parseIndexRequest(request, name, ('query',)) if not record.keys: </body> return None </html> query_str = ' '.join(record.keys) if not query_str: return None return {'q': u'+%s:%s' % (name, quote_query(query_str))} sixfeetup.com/deploy
  • 23. Other alm.solrindex Features • GenericSetup Profile • Tests • Uses solrpy instead of the unsupported solr.py sixfeetup.com/deploy
  • 24. Tips • Can replace several ZCatalog indexes • Remove any indexes you have replaced • Use it for all Text Indexes • Still Utilize the ZCatalog Indexes for Everything Else sixfeetup.com/deploy
  • 25. Demo <html> <body> <h3>Code Sample</h3> <p>Replace this text!</p> </body> Project Gutenberg Data </html> sixfeetup.com/deploy
  • 26. Questions? nowhere to go but open source s i xf e e tu p . c om
  • 27. sixfeetup.com/deploy sixfeetup.com/deploy

Notes de l'éditeur

  1. enterprise search server XML, JSON, HTTP (REST) Efficient Replication to other Solr Search Servers Full Plugin Architecture
  2. XML over HTTP HTTP GET returns XML results
  3. very similar to the ZCatalog Numeric Types, Dynamic Fields, Unique Keys rich set of debugging tools
  4. very similar to the ZCatalog Numeric Types, Dynamic Fields, Unique Keys rich set of debugging tools
  5. 17GB before packing still using zope in the middle for this did the same import with ZCTextIndex and ZCatalog and it crashed and burned at 900k items
  6. designed to work with this package, which is a collection of more monkey patches except SearchableText which it removes from the catalog anytime you add an index to the catalog, have to add it to solr also global or thread local variables usually make it much harder to understand horrible code readability could lead to unexpected results, maybe your solr connection isn&apos;t there anymore
  7. This is open source software so we can learn from past experiences of others. Six Feet Up embarked on a large project where flexible search features were a great match for Solr. We shouldn&apos;t throw away everything in collective.solr.
  8. less indirection allow us to re-factor our connection to Solr
  9. only one needed per catalog uses the solr schema to determine what columns to index maintains a persistent connection to external db from a ZODB object won&apos;t be dropped by object deactivations like _v_ methods won&apos;t break when you pass control between treads like thread locals Pass solr query paramaters directly via the solr_param dictionary. Requires that some value be passed for &quot;q&quot;. Can be used to access features like weighting of terms in a query. Pass in a solr_callback function in your query and SolrIndex will call it passing the parsed Solr response object.
  10. Not handled by SolrIndex at this time. Just use the sort_on parameter like you normally would.
  11. write your own and register them via ZCML
  12. Avoids indexing the same attribute multiple times. ZCatalog falls short on full text indexing when it comes to performance and features Native ZCatalog indexes are faster than any network bound service. ZCatalog Indexes share transaction aware ZODB caches.
  13. 32K Books richer metadata than the wiktionary data