Your SlideShare is downloading. ×
0
What is Solr?
•
•
•
•
•
•

Fulltext Search Index
Based on Lucene
Fast Indexing
Fast Retrieval
Wide Range of Features
Exten...
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
d...
Query Syntax
•
•
•
•
•
•
•

name:(Ivo)
name:(+Ivo +Lasek)
name:(+Ivo -Lasek) AND age:[* TO 30]
name:(“Ivo Lasek”)
descript...
Solr Documents – Index Structure
<fields>
<field name="id" type="string"
indexed="true" stored="true"
required="true" />
<...
547 <fieldType name="text_general_rev" class="solr.TextField"
positionIncrementGap="100">
548
<analyzer type="index">
549
...
Multiple Cores
• One core vs. multiple cores
– Instantiating cores (config files, solr.xml)

• Data loading
– Insert/Updat...
Dynamic fields
<dynamicField
name="*_i"
type="integer"
indexed="true"
stored="true"/>
Plugins
Request Processing
SolrRequestHandlerą
SearchComponent
QParserPlugin
ValueSourceParser
Highlighting
SolrFragmenter...
Dismax Search
• qf – Query fields
qf="fieldOne^2.3 fieldTwo fieldThree^0.4”

• mm – Minimum should match
3<90%

• bf – boo...
Faceted Search
•
•

&q=*:*&facet=true&facet.field=cat
&q=ipod&facet=true&facet.query=price:[0 TO
100]&facet.query=price:[1...
Autosuggestor

http://wiki.apache.org/solr/Suggester#SearchHa
ndler_configuration
www.sortivo.cz
info@sortivo.cz
@sortivo
Solr
Upcoming SlideShare
Loading in...5
×

Solr

1,227

Published on

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,227
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
49
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Solr"

  1. 1. What is Solr? • • • • • • Fulltext Search Index Based on Lucene Fast Indexing Fast Retrieval Wide Range of Features Extendibility
  2. 2. Features • • • • • Distributed search Function queries Highlighting Faceted search Autocomplete
  3. 3. Architecture Your App SolrJ GET Servlets Solr Lucene
  4. 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. 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. 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. 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. 8. Multiple Cores • One core vs. multiple cores – Instantiating cores (config files, solr.xml) • Data loading – Insert/Update – Commit – Optimize • Switching cores
  9. 9. Dynamic fields <dynamicField name="*_i" type="integer" indexed="true" stored="true"/>
  10. 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. 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. 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. 13. Autosuggestor http://wiki.apache.org/solr/Suggester#SearchHa ndler_configuration
  14. 14. www.sortivo.cz info@sortivo.cz @sortivo
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×