Your SlideShare is downloading. ×
0
EthicShare.org (Mostly Solr)
EthicShare.org (Mostly Solr)
EthicShare.org (Mostly Solr)
EthicShare.org (Mostly Solr)
EthicShare.org (Mostly Solr)
EthicShare.org (Mostly Solr)
EthicShare.org (Mostly Solr)
EthicShare.org (Mostly Solr)
EthicShare.org (Mostly Solr)
EthicShare.org (Mostly Solr)
EthicShare.org (Mostly Solr)
EthicShare.org (Mostly Solr)
EthicShare.org (Mostly Solr)
EthicShare.org (Mostly Solr)
EthicShare.org (Mostly Solr)
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

EthicShare.org (Mostly Solr)

2,470

Published on

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,470
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
29
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Twin Cities Drupal Users Group - October 22, 2008 EthicShare: Solr + Drupal Under the Hood Tour
  • 2. EthicShare? <ul><li>Who: University of Minnesota&apos;s Center for Bioethics, the University of Minnesota Libraries, and the University of Minnesota Department of Computer Science and Engineering </li></ul><ul><ul><li>EthicShare’s pilot implementation builds on a recent planning phase that was a collaboration with the University of Virginia, Georgetown University, Indiana University-Bloomington, and Indiana University-Purdue University, Indianapolis. </li></ul></ul><ul><li>What: A sustainable aggregation of bioethics research and a platform for scholarship </li></ul><ul><li>When: Pilot Phase runs from January 2008 - June 2009 </li></ul><ul><li>How: Funded by the Andrew W. Mellon Foundation </li></ul>
  • 3. The Platform <ul><li>Drupal </li></ul><ul><ul><li>Community Development Framework </li></ul></ul><ul><li>Solr </li></ul><ul><ul><li>Faceted Search Appliance </li></ul></ul>
  • 4. The Process
  • 5. &nbsp;
  • 6. <ul><li>Origin: Created by CNET and released January 2006 </li></ul><ul><ul><li>Became an Apache Software Foundation project shortly thereafter </li></ul></ul><ul><li>Builds on the Lucene Search Engine Library </li></ul><ul><ul><li>Comes with Lucene’s search syntax and features </li></ul></ul><ul><li>Provides simple HTTP/XML API </li></ul><ul><li>Strongly typed field definitions </li></ul><ul><li>Noteworthy Implementations Netflix, CNET Reviews, GameSpot, Digg </li></ul><ul><ul><ul><li>More: http: //wiki .apache. org/solr/PublicServers </li></ul></ul></ul>
  • 7. Behind the Scenes - Indexing <ul><li>HTTP/XML API </li></ul><ul><li> http://localhost:8983/solr/update </li></ul><ul><li>http://localhost:8983/solr/select </li></ul><ul><li>Indexing = POSTing XML Records to /update </li></ul><ul><li>Commands: &lt;add&gt; &lt;delete&gt;&lt;commit/&gt;&lt;optimize/&gt; </li></ul><ul><ul><li>&lt;add&gt; </li></ul></ul><ul><ul><li>&lt;doc&gt; </li></ul></ul><ul><ul><li>&lt;field name=”nid&amp;quot;&gt;101&lt;/field&gt; </li></ul></ul><ul><ul><li>&lt;field name=”vid&amp;quot;&gt;2&lt;/field&gt; </li></ul></ul><ul><ul><li> &lt;field name=&amp;quot;title&amp;quot;&gt;Solr Search is Simply Great&lt;/field&gt; </li></ul></ul><ul><ul><li>&lt;field name=”body&amp;quot;&gt;Solr and Drupal are like PB And J&lt;/field&gt; </li></ul></ul><ul><ul><li>&lt;field name=&amp;quot;changed&amp;quot;&gt;1224707462&lt;/field&gt; </li></ul></ul><ul><ul><li> &lt;field name=”tid&amp;quot;&gt;4&lt;/field&gt; </li></ul></ul><ul><ul><li>&lt;field name=”name&amp;quot;&gt;libsys&lt;/field&gt; </li></ul></ul><ul><ul><li>&lt;field name=”uid&amp;quot;&gt;10297&lt;/field&gt; </li></ul></ul><ul><ul><li>&lt;/doc&gt; </li></ul></ul><ul><ul><li>&lt;/add&gt; </li></ul></ul>
  • 8. Behind the Scenes - Searching <ul><li>Get Contents of …/select URL: cURL, file_get_contents($url)… </li></ul><ul><li>ApacheSolr makes use of a Solr PHP Client Abstraction Layer </li></ul><ul><ul><li>http: //wiki .apache.org/solr/SolPHP </li></ul></ul>
  • 9. Setup - Solr Directory Layout <ul><ul><li>Tomcat Files: </li></ul></ul><ul><ul><li>… /tomcat/webapps/solr_ethicshare.war (cp solr.war from example dir) </li></ul></ul><ul><ul><li>… /tomcat/conf/Catalina/localhost/ solr_ethicshare.xml </li></ul></ul>solr_ethicshare.xml - Tell Tomcat About Solr &lt;Context docBase=&amp;quot;solr_ethicshare.war&amp;quot; debug=&amp;quot;0&amp;quot; crossContext=&amp;quot;true&amp;quot; &gt; &lt;Environment name=&amp;quot;solr/home&amp;quot; type=&amp;quot;java.lang.String&amp;quot; value=&amp;quot;/usr/local/solr_home/ethicshare&amp;quot; override=&amp;quot;true&amp;quot; /&gt; &lt;/Context&gt;
  • 10. Solr Schema - Fields and Types <ul><li>Starter schema: </li></ul><ul><ul><li>../drupaldir/sites/all/modules/apachesolr/schema.xml </li></ul></ul><ul><li>&lt;types&gt; ex: </li></ul><ul><ul><li>string=solr.StrField </li></ul></ul><ul><ul><li>boolean=solr.BoolField </li></ul></ul><ul><li>&lt;fields&gt; </li></ul><ul><ul><li>&lt;field name=&amp;quot;title&amp;quot; type=&amp;quot;string&amp;quot; indexed=&amp;quot;true&amp;quot; stored=&amp;quot;true&amp;quot;/&gt; </li></ul></ul>
  • 11. Solr Schema - &lt;type&gt; Analyzers <ul><li>Tokenize on whitespace, then remove any common words (StopFilterFactory) </li></ul><ul><li>Remove any duplicates (RemoveDuplicatesTokenFilterFactory) </li></ul>
  • 12. Solr Schema - Dynamic Fields <ul><li>&lt;dynamicField name=&amp;quot;smfield*&amp;quot; type=&amp;quot;string&amp;quot; indexed=&amp;quot;true&amp;quot; stored=&amp;quot;true&amp;quot; multiValued=&amp;quot;true&amp;quot;/&gt; </li></ul><ul><li>&lt;dynamicField name=&amp;quot;tmfield*&amp;quot; type=&amp;quot;text&amp;quot; indexed=&amp;quot;true&amp;quot; stored=&amp;quot;true&amp;quot; multiValued=&amp;quot;true&amp;quot;/&gt; </li></ul>
  • 13. Solr Schema - Some Example Options <ul><li>uniqueKey </li></ul><ul><ul><li>&lt;!-- Field to use to determine and enforce document uniqueness. </li></ul></ul><ul><ul><li>Unless this field is marked with required=&amp;quot;false&amp;quot;, it will be a required field </li></ul></ul><ul><ul><li>--&gt; </li></ul></ul><ul><ul><ul><li>&lt;uniqueKey&gt;nid&lt;/uniqueKey&gt; </li></ul></ul></ul><ul><li>defaultSearchField </li></ul><ul><ul><li>&lt;!-- field for the QueryParser to use when an explicit fieldname is absent --&gt; </li></ul></ul><ul><ul><ul><li>&lt;defaultSearchField&gt;text&lt;/defaultSearchField&gt; </li></ul></ul></ul><ul><li>solrQueryParser </li></ul><ul><ul><li>&lt;!-- SolrQueryParser configuration: defaultOperator=&amp;quot;AND|OR&amp;quot; -- </li></ul></ul><ul><ul><ul><li>&lt;solrQueryParser defaultOperator=&amp;quot;AND&amp;quot;/&gt; </li></ul></ul></ul>
  • 14. ApacheSolr Search Integration Module <ul><li>Core Search Integrated </li></ul><ul><li>Blocks for facet configuration </li></ul><ul><li>Schedules Indexing (via core search) </li></ul><ul><li>Theme Hooks for overriding look and feel </li></ul><ul><li>CCK Integration </li></ul><ul><ul><li>hook_apachesolr_cck_field_mappings() </li></ul></ul><ul><ul><ul><li>Which Fields to Index </li></ul></ul></ul><ul><ul><ul><li>How to Index them </li></ul></ul></ul><ul><ul><ul><li>Callback to pre-process fields </li></ul></ul></ul><ul><ul><ul><li>Whether or Not to Provide a Facet Block </li></ul></ul></ul><ul><li>Help! We need testers for alpha3! </li></ul><ul><ul><li>http: //drupal . org/project/apachesolr </li></ul></ul>
  • 15. Links <ul><li>Installing Solr + Tomcat </li></ul><ul><ul><li>http: //mikejoconnor . net/content/solr-ubercartorg </li></ul></ul><ul><li>Google Book Search API </li></ul><ul><ul><li>http://code. google .com/apis/books/ </li></ul></ul><ul><li>unAPI </li></ul><ul><ul><li>http: //unapi .info/ </li></ul></ul><ul><li>ApacheSolr Search Integration </li></ul><ul><ul><li>http: //drupal .org/project/apachesolr </li></ul></ul><ul><li>IBM Developer Works - Solr </li></ul><ul><ul><li>http://www. ibm .com/developerworks/java/library/j-solr1/ </li></ul></ul><ul><li>SolPHP </li></ul><ul><ul><li>http: //wiki .apache. org/solr/SolPHP </li></ul></ul>

×