Your SlideShare is downloading. ×
Solr
Solr
Solr
Solr
Solr
Solr
Solr
Solr
Solr
Solr
Solr
Solr
Solr
Solr
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

Solr

1,207

Published on

Introduction to fulltext search with Apache Solr.

Introduction to fulltext search with Apache Solr.

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

No Downloads
Views
Total Views
1,207
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
49
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. What is Solr? • • • • • • Fulltext Search Index Based on Lucene Fast Indexing Fast Retrieval Wide Range of Features Extendibility
  • 2. Features • • • • • Distributed search Function queries Highlighting Faceted search Autocomplete
  • 3. Architecture Your App SolrJ GET Servlets Solr Lucene
  • 4. 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
  • 5. 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]
  • 6. 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>
  • 7. 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>
  • 8. Multiple Cores • One core vs. multiple cores – Instantiating cores (config files, solr.xml) • Data loading – Insert/Update – Commit – Optimize • Switching cores
  • 9. Dynamic fields <dynamicField name="*_i" type="integer" indexed="true" stored="true"/>
  • 10. Plugins Request Processing SolrRequestHandlerą SearchComponent QParserPlugin ValueSourceParser Highlighting SolrFragmenter SolrFormatter UpdateRequestProcessorFactory QueryResponseWriter Similarity CacheRegenerator Fields Analyzer Tokenizer and TokenFilter FieldType Internals SolrCache SolrEventListener UpdateHandler
  • 11. 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
  • 12. Faceted Search • • &q=*:*&facet=true&facet.field=cat &q=ipod&facet=true&facet.query=price:[0 TO 100]&facet.query=price:[100 TO *]
  • 13. Autosuggestor http://wiki.apache.org/solr/Suggester#SearchHa ndler_configuration
  • 14. www.sortivo.cz info@sortivo.cz @sortivo

×