bringing solr to drupal a general and library specific use case peter kiraly

Upload: massamr

Post on 09-Apr-2018

229 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    1/46

    Bringing Solr to DrupalA General, and a Library-Specific Use Case

    1

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    2/46

    Two ways of using Solr in Drupal

    2

    General solution: Apache Solr Search Integration and related

    modules: Stats, Autocomplete, Multisite, Ajax, Biblio,

    -commerce integration), Views,Multilingual, Geospatial and many othersFits for the overall needs, uses predefined fields

    Library specific solution: eXtensible Catalog modules

    Fits for library needs, uses dynamic fields

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    3/46

    Two ways of using Solr in Drupal I.

    3

    General solution: Apache Solr Search Integration and related

    modules: Stats, Autocomplete, Multisite, Ajax, Biblio,

    -commerce integration), Views,Multilingual, Geospatial and many othersFits for the overall needs, uses predefined fields

    Library specific solution: eXtensible Catalog modules

    Fits for library needs, uses dynamic fields

    This part of the presentation is based on the works and previous presentations of

    Robert Douglass.

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    4/46

    Drupal architecture

    4

    Relational database

    for storageSolr index for search

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    5/46

    Purposes

    5

    Creating a general insfrastructure which is usable in every

    Drupal installation

    Core module, and additional module for covering specific Solr

    functionalities (statistics, autocomplete etc.)

    Replace the original (and still default) MySQL-based search

    feature

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    6/46

    6

    sort

    Facet 1

    Facet 2

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    7/46

    7

    categories

    API version

    module search

    sort

    List of modules page

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    8/46

    Advanced search: issues

    8

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    9/46

    Whitehouse.gov on Drupal & Solr

    9

    sort

    facets

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    10/46

    Boosting by Drupal specific properties

    10

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    11/46

    Boosting and ignoring by document type

    11

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    12/46

    Boosting by fields / HTML tags

    12

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    13/46

    More like this implementation

    13

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    14/46

    Solr in Views integration

    14

    Views is a very popular module, helps creating interactive DB queries and

    result pages. Now it can handle Apache Solr as data source.

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    15/46

    Part of the Views admin page

    15

    You can specify fields,

    sorting, filters, layout,

    arguments,

    behaviours and more

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    16/46

    Using Tika: file search

    16

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    17/46

    Indexing/searching multiple sites

    17

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    18/46

    Search in comments

    18

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    19/46

    CCK date searching

    19

    Content Construction Kit: popular module to create document and

    field types. CCK date is a special field type handling dates.

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    20/46

    statistics

    20

    impressive numbers

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    21/46

    Statistics of facet usage

    21

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    22/46

    autocomplete

    22

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    23/46

    Future plans

    23

    Crawling with Nutch

    Geospatial search

    eDismax (Solr 1.5)

    Drupal 7

    API changes

    Improving documentation

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    24/46

    People behind these modules

    24

    Robert Douglas (DE) http://drupal.org/user/5449

    Alejandro Garza (MX) http://drupal.org/user/153120

    Peter Wolanin (US) http://drupal.org/user/49851

    James McKinney (CA) http://drupal.org/user/472460

    Scott Reynolds (US) http://drupal.org/user/60009

    Mike O'Connor (US) http://drupal.org/user/104525

    Markus Kalkbrenner (DE) http://drupal.org/user/124705

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    25/46

    Links

    25

    apachesolr http://drupal.org/project/apachesolr (this is the best starting point)

    content recommendation patch http://drupal.org/node/372767

    views integration http://drupal.org/project/apachesolr_views,http://acquia.com/node/911667

    file search http://drupal.org/project/apachesolr_attachments,http://acquia.com/node/1129446

    date facet for CCK field http://drupal.org/node/558160

    statistics http://drupal.org/project/apachesolr_stats

    multisite http://drupal.org/project/apachesolr_multisitesearch

    autocomplete http://drupal.org/project/apachesolr_autocomplete

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    26/46

    Two ways of using Solr in Drupal II.

    26

    General solution: Apache Solr Search Integration and related

    modules: Stats, Autocomplete, Multisite, Ajax, Biblio,

    -commerce integration), Views,Multilingual, Geospatial and many others

    Fits for the overall needs, uses predefined fields

    Library specific solution: eXtensible Catalog modules

    Fits for library needs, uses dynamic fields

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    27/46

    About eXtensible Catalog

    27

    an FRBR-based metadata platform

    started in 2007

    driven by new theories of library science, cultural anthropology andthe practice of web 2.0, library 2.0

    Universities of Rochester, Notre Dame, Cornell, North Carolina andCARLI consortium

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    28/46

    Architecture

    28

    Drupal CMS

    Integrated Library System Repository

    XC Metadata

    Services Toolkit

    XC OAI ToolkitXC NCIP Toolkit

    MARC Normalization

    DC Normalization

    Aggregation

    Transformation

    XC Drupal

    Toolkit

    circulation data

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    29/46

    Purposes of XC Drupal Toolkit

    29

    integrate library data into a popular content management system

    customizable functionalities

    customizable interface(s)

    internalization, localization

    5000+ custom modules, 20+ library specific modules

    wide range on mashup options all features are available through user interfaces

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    30/46

    Search results

    30

    highlighted terms

    availability information

    bibliographical data

    cover images

    facets

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    31/46

    Customized interface (Kyushu University)

    31

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    32/46

    Similar documents

    32

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    33/46

    XML attribute handling

    33

    History

    subject=History and subject_OCLC=Historysubject_OCLC=Historysubject=Historynone

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    34/46

    Mapping schema fields to Solr types

    34

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    35/46

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    36/46

    Custom PHP code for displaying title

    36

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zwhttp://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    37/46

    Getting large amount into Drupal: harvesting

    37

    Harvest is running

    List of scheduled harvests

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zwhttp://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    38/46

    Data flow between components

    38

    OAI-PMH

    providerDrupal

    MySQL Solr

    batch delete/insert documents

    creating nodes

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zwhttp://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    39/46

    39

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zwhttp://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    40/46

    Creating highlighter

    40

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zwhttp://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    41/46

    Setting up field and date facet properties

    41

    Date facet properties

    Field facet properties

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zwhttp://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    42/46

    42

    List of facets, andtheirs type

    General properties

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zwhttp://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    43/46

    Reordering facets

    43

    Just drag and drop

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zwhttp://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    44/46

    Using facet term list in search form

    44

    dropdown

    fullfilled with

    language

    facet termsdropdown definition

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zwhttp://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    45/46

    Adding widgets to UI: navigation bar

    45

    definition of navigation bar

    navigation bar in action

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zwhttp://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw
  • 8/8/2019 Bringing Solr to Drupal a General and Library Specific Use Case Peter Kiraly

    46/46

    Links Project page http://eXtensibleCatalog.org

    XC Drupal Toolkit http://drupal.org/project/xc

    Metadata Services Toolkit http://code.google.com/p/xcmetadataservicestoolkit

    OAI Toolkit http://code.google.com/p/xcoaitoolkit

    NCIP Toolkit http://code.google.com/p/xcnciptoolkit

    Developers:

    Mlen-Too Wesley (GH) http://drupal.org/user/318924

    (H) http://drupal.org/user/352587, http://twitter.com/kiru

    http://mail.google.com/mail/?ui=1&view=att&th=11e8ab72613d00d3&attid=0.1&disp=attd&zw