SlideShare a Scribd company logo
1 of 9
Solr Schema Learnings
Mohit Jain, Staff Engineer
BloomReach
1
Solr Schema
• Schema.xml – Solr 4.6.1
 Fields – stored, indexed, single/multi etc.
<field name="text" type="text_general" indexed="true"
stored="false" multiValued="true"/>
 FieldTypes
• Primitive, e.g. int, string
• Analyzed, e.g. text, ngrams
2
Solr Schema
• Text Search
 Dump everything to text
 Store structured fields if needed
• E-commerce
 Multiple applications per field
 Facets, n-gram search, natural text
3
Schema in e-commerce world
• Brand
 One Base field – Facet
 Multiple Copy Fields – text, n-gram,
hierarchical paths etc.
4
Field Name Stored Indexed Type
Brand True True Facet (=String)
Brand_text False True text
Brand_ngra
m
False True ngram
• Facet = String = Stored
• Store a copy of every field for debugging
Multi Tenant
• More customers = more fields
• Common fields + merchant Fields
 Field names
• brand, color, title
• debshops_*, e.g. color_group
 Operational overhead for indexer and
deployment
5
Common Schema
• One schema.xml to rule them all
• Optimization cost v/s simplicity in early
stages
• Indexer, ranking etc.
• Solrcore.properties – Solrconfig.xml
6
Customers
• Common schema is not scalable
 f_* = MultiValued + String
• Customer requests for Filters
 f_oven_type
• Different Use cases and 100+ fields
 Range queries = String vs Number, e.g.
Range
 Sort = single-valued vs multi-valued, e.g.
Ratings
 Stored ??7
Dynamic Fields
• Ranking cannot depend on dynamic fields
• Indexer and Search-Consumers –
common lib
8
DYN_S_S DYN_S_M DYN_N_S DYN_N_M
Sort, facet facet Sort, range Range
dept oven_type ratings item_length
• Dynamic Fields – DYN_<S/N>_<S/M>
• Datatype – String (S), Number(N)
• Single Valued(S), Multi-Valued (M)
Questions
9

More Related Content

Viewers also liked

2016.04.26 Energy economincs institute introduction, proposal for research on...
2016.04.26 Energy economincs institute introduction, proposal for research on...2016.04.26 Energy economincs institute introduction, proposal for research on...
2016.04.26 Energy economincs institute introduction, proposal for research on...The Business Council of Mongolia
 
Livret mini nov 2015
Livret  mini  nov 2015Livret  mini  nov 2015
Livret mini nov 2015Schaub Guy
 
22.06.2010 The Ovoot Coking Coal Project: A Mongolian-Australian Partnership,...
22.06.2010 The Ovoot Coking Coal Project: A Mongolian-Australian Partnership,...22.06.2010 The Ovoot Coking Coal Project: A Mongolian-Australian Partnership,...
22.06.2010 The Ovoot Coking Coal Project: A Mongolian-Australian Partnership,...The Business Council of Mongolia
 
20.06.2013 Russian coking coal developments –An Update, John P L Bacharach
20.06.2013 Russian coking coal developments –An Update, John P L Bacharach20.06.2013 Russian coking coal developments –An Update, John P L Bacharach
20.06.2013 Russian coking coal developments –An Update, John P L BacharachThe Business Council of Mongolia
 
31.08.2012 Financing infrastructure in Mongolia, Development Bank of Mongolia
31.08.2012 Financing infrastructure in Mongolia, Development Bank of Mongolia31.08.2012 Financing infrastructure in Mongolia, Development Bank of Mongolia
31.08.2012 Financing infrastructure in Mongolia, Development Bank of MongoliaThe Business Council of Mongolia
 
22.06.2010 What investors in Mongolia need to know, Jim Dwyer
22.06.2010 What investors in Mongolia need to know, Jim Dwyer22.06.2010 What investors in Mongolia need to know, Jim Dwyer
22.06.2010 What investors in Mongolia need to know, Jim DwyerThe Business Council of Mongolia
 

Viewers also liked (15)

CV_HAITHAM
CV_HAITHAMCV_HAITHAM
CV_HAITHAM
 
03.10.2014, NEWSWIRE, Issue 345
03.10.2014, NEWSWIRE, Issue 34503.10.2014, NEWSWIRE, Issue 345
03.10.2014, NEWSWIRE, Issue 345
 
04.06.2010, NEWSWIRE, Issue 121
04.06.2010, NEWSWIRE, Issue 12104.06.2010, NEWSWIRE, Issue 121
04.06.2010, NEWSWIRE, Issue 121
 
22.05.2009, NEWSWIRE, Issue 70
22.05.2009, NEWSWIRE, Issue 7022.05.2009, NEWSWIRE, Issue 70
22.05.2009, NEWSWIRE, Issue 70
 
06.02.2009, NEWSWIRE, Issue 56
06.02.2009, NEWSWIRE, Issue 5606.02.2009, NEWSWIRE, Issue 56
06.02.2009, NEWSWIRE, Issue 56
 
2016.04.26 Energy economincs institute introduction, proposal for research on...
2016.04.26 Energy economincs institute introduction, proposal for research on...2016.04.26 Energy economincs institute introduction, proposal for research on...
2016.04.26 Energy economincs institute introduction, proposal for research on...
 
Intb3 mp
Intb3 mpIntb3 mp
Intb3 mp
 
SUSANTA SAHA C.V
SUSANTA SAHA C.VSUSANTA SAHA C.V
SUSANTA SAHA C.V
 
16.11.2015, What is think urban, Ariunaa Norovsambuu
16.11.2015, What is think urban, Ariunaa Norovsambuu16.11.2015, What is think urban, Ariunaa Norovsambuu
16.11.2015, What is think urban, Ariunaa Norovsambuu
 
Livret mini nov 2015
Livret  mini  nov 2015Livret  mini  nov 2015
Livret mini nov 2015
 
22.06.2010 The Ovoot Coking Coal Project: A Mongolian-Australian Partnership,...
22.06.2010 The Ovoot Coking Coal Project: A Mongolian-Australian Partnership,...22.06.2010 The Ovoot Coking Coal Project: A Mongolian-Australian Partnership,...
22.06.2010 The Ovoot Coking Coal Project: A Mongolian-Australian Partnership,...
 
20.06.2013 Russian coking coal developments –An Update, John P L Bacharach
20.06.2013 Russian coking coal developments –An Update, John P L Bacharach20.06.2013 Russian coking coal developments –An Update, John P L Bacharach
20.06.2013 Russian coking coal developments –An Update, John P L Bacharach
 
31.08.2012 Financing infrastructure in Mongolia, Development Bank of Mongolia
31.08.2012 Financing infrastructure in Mongolia, Development Bank of Mongolia31.08.2012 Financing infrastructure in Mongolia, Development Bank of Mongolia
31.08.2012 Financing infrastructure in Mongolia, Development Bank of Mongolia
 
22.06.2010 What investors in Mongolia need to know, Jim Dwyer
22.06.2010 What investors in Mongolia need to know, Jim Dwyer22.06.2010 What investors in Mongolia need to know, Jim Dwyer
22.06.2010 What investors in Mongolia need to know, Jim Dwyer
 
02.05.2014, NEWSWIRE, Issue 323
02.05.2014, NEWSWIRE, Issue 32302.05.2014, NEWSWIRE, Issue 323
02.05.2014, NEWSWIRE, Issue 323
 

Recently uploaded

IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 

Recently uploaded (20)

IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 

Solr Schema in Multi Tenant Platform

  • 1. Solr Schema Learnings Mohit Jain, Staff Engineer BloomReach 1
  • 2. Solr Schema • Schema.xml – Solr 4.6.1  Fields – stored, indexed, single/multi etc. <field name="text" type="text_general" indexed="true" stored="false" multiValued="true"/>  FieldTypes • Primitive, e.g. int, string • Analyzed, e.g. text, ngrams 2
  • 3. Solr Schema • Text Search  Dump everything to text  Store structured fields if needed • E-commerce  Multiple applications per field  Facets, n-gram search, natural text 3
  • 4. Schema in e-commerce world • Brand  One Base field – Facet  Multiple Copy Fields – text, n-gram, hierarchical paths etc. 4 Field Name Stored Indexed Type Brand True True Facet (=String) Brand_text False True text Brand_ngra m False True ngram • Facet = String = Stored • Store a copy of every field for debugging
  • 5. Multi Tenant • More customers = more fields • Common fields + merchant Fields  Field names • brand, color, title • debshops_*, e.g. color_group  Operational overhead for indexer and deployment 5
  • 6. Common Schema • One schema.xml to rule them all • Optimization cost v/s simplicity in early stages • Indexer, ranking etc. • Solrcore.properties – Solrconfig.xml 6
  • 7. Customers • Common schema is not scalable  f_* = MultiValued + String • Customer requests for Filters  f_oven_type • Different Use cases and 100+ fields  Range queries = String vs Number, e.g. Range  Sort = single-valued vs multi-valued, e.g. Ratings  Stored ??7
  • 8. Dynamic Fields • Ranking cannot depend on dynamic fields • Indexer and Search-Consumers – common lib 8 DYN_S_S DYN_S_M DYN_N_S DYN_N_M Sort, facet facet Sort, range Range dept oven_type ratings item_length • Dynamic Fields – DYN_<S/N>_<S/M> • Datatype – String (S), Number(N) • Single Valued(S), Multi-Valued (M)

Editor's Notes

  1. Example of a field
  2. Facet – String - Stored
  3. Color_group, size_type