Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Like this? Share it with your network

Share

Enterprise search in plone using solr

on

  • 1,375 views

 

Statistics

Views

Total Views
1,375
Views on SlideShare
1,372
Embed Views
3

Actions

Likes
3
Downloads
19
Comments
0

1 Embed 3

http://coderwall.com 3

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Enterprise search in plone using solr Presentation Transcript

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