SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

Destacado

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
 

Destacado (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
 

Último

Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 

Último (20)

Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 

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)

Notas del editor

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