Solr
Upcoming SlideShare
Loading in...5
×
 

Solr

on

  • 975 views

Introduction to fulltext search with Apache Solr.

Introduction to fulltext search with Apache Solr.

Statistics

Views

Total Views
975
Views on SlideShare
975
Embed Views
0

Actions

Likes
1
Downloads
38
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

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

Solr Solr Presentation Transcript

  • What is Solr? • • • • • • Fulltext Search Index Based on Lucene Fast Indexing Fast Retrieval Wide Range of Features Extendibility
  • Features • • • • • Distributed search Function queries Highlighting Faceted search Autocomplete
  • Architecture Your App SolrJ GET Servlets Solr Lucene
  • Solr Queries • http://localhost:8983/solr/select/?in dent=on&q=video&fl=name,id • http://localhost:8983/solr/select/?in dent=on&q=video&sort=price%20de sc&fl=name,id,price
  • Query Syntax • • • • • • • name:(Ivo) name:(+Ivo +Lasek) name:(+Ivo -Lasek) AND age:[* TO 30] name:(“Ivo Lasek”) description:("more traffic between solr" ~2) title:foo* timestamp:[* TO NOW]
  • Solr Documents – Index Structure <fields> <field name="id" type="string" indexed="true" stored="true" required="true" /> <field name="name" type="textgen" indexed="true" stored="true"/> ... </fields>
  • 547 <fieldType name="text_general_rev" class="solr.TextField" positionIncrementGap="100"> 548 <analyzer type="index"> 549 <tokenizer class="solr.StandardTokenizerFactory"/> 550 <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /> 551 <filter class="solr.LowerCaseFilterFactory"/> 552 <filter class="solr.ReversedWildcardFilterFactory" withOriginal="true" 553 maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/> 554 </analyzer> 555 <analyzer type="query"> 556 <tokenizer class="solr.StandardTokenizerFactory"/> 557 <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/> 558 <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /> 559 <filter class="solr.LowerCaseFilterFactory"/> 560 </analyzer> 561 </fieldType>
  • Multiple Cores • One core vs. multiple cores – Instantiating cores (config files, solr.xml) • Data loading – Insert/Update – Commit – Optimize • Switching cores
  • Dynamic fields <dynamicField name="*_i" type="integer" indexed="true" stored="true"/>
  • Plugins Request Processing SolrRequestHandlerą SearchComponent QParserPlugin ValueSourceParser Highlighting SolrFragmenter SolrFormatter UpdateRequestProcessorFactory QueryResponseWriter Similarity CacheRegenerator Fields Analyzer Tokenizer and TokenFilter FieldType Internals SolrCache SolrEventListener UpdateHandler
  • Dismax Search • qf – Query fields qf="fieldOne^2.3 fieldTwo fieldThree^0.4” • mm – Minimum should match 3<90% • bf – boost Functions recip(rord(myfield),1,2,3)^1.5 http://wiki.apache.org/solr/DisMax
  • Faceted Search • • &q=*:*&facet=true&facet.field=cat &q=ipod&facet=true&facet.query=price:[0 TO 100]&facet.query=price:[100 TO *]
  • Autosuggestor http://wiki.apache.org/solr/Suggester#SearchHa ndler_configuration
  • www.sortivo.cz info@sortivo.cz @sortivo