SlideShare a Scribd company logo
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

PPTX
Big Data Marketing - 5th Click Conference
PPTX
333413629 ada-3
PDF
Cualidades del personal del futuro
PDF
Spring Puzzlers by Evgeny Borisov, Baruch Sadogursky
PDF
Next Generation Customer
PPTX
Four hands
PPT
безсмертна пам’ять
PPS
Disturbios de aprendizagem
Big Data Marketing - 5th Click Conference
333413629 ada-3
Cualidades del personal del futuro
Spring Puzzlers by Evgeny Borisov, Baruch Sadogursky
Next Generation Customer
Four hands
безсмертна пам’ять
Disturbios de aprendizagem

Viewers also liked (8)

PDF
Financial Portfolio Management with Java on Steroids - JAX Finance 2016
PPTX
WBR Webinar - US Patriot Tactical
PPT
PDF
Menús de raciones 2016 Restaurante Manolín de Valladolid
PPT
Enzymen regulatie
PDF
MinRole and SharePoint 2016
DOCX
Screen play
PPTX
The e-commerce merchandisers role in a personalized world
Financial Portfolio Management with Java on Steroids - JAX Finance 2016
WBR Webinar - US Patriot Tactical
Menús de raciones 2016 Restaurante Manolín de Valladolid
Enzymen regulatie
MinRole and SharePoint 2016
Screen play
The e-commerce merchandisers role in a personalized world
Ad

Similar to Solr Schema in Multi Tenant Platform (20)

PDF
Schemaless Solr and the Solr Schema REST API
PDF
PPTX
Rapid Solr Schema Development (Phone directory)
PPTX
Rebuilding Solr 6 examples - layer by layer (LuceneSolrRevolution 2016)
ODP
Solr facets and custom indices
PPTX
Assamese search engine using SOLR by Moinuddin Ahmed ( moin )
PPTX
Apache solr
PDF
Search Engine-Building with Lucene and Solr
PPTX
Solr/Elasticsearch for CF Developers (and others)
PPTX
Search Engine Building with Lucene and Solr (So Code Camp San Diego 2014)
PDF
Sunspot - The Ruby Way into Solr
PPTX
Solr02 fields
PPTX
Make Your Data Searchable With Solr in 25 Minutes
PPTX
20130310 solr tuorial
PPTX
Implementing full text search with Apache Solr
DOCX
Apache solr tech doc
PPTX
What's new in solr june 2014
PDF
Retrieving Information From Solr
PDF
Apache Solr Search Mastery
PPTX
Solr Introduction
Schemaless Solr and the Solr Schema REST API
Rapid Solr Schema Development (Phone directory)
Rebuilding Solr 6 examples - layer by layer (LuceneSolrRevolution 2016)
Solr facets and custom indices
Assamese search engine using SOLR by Moinuddin Ahmed ( moin )
Apache solr
Search Engine-Building with Lucene and Solr
Solr/Elasticsearch for CF Developers (and others)
Search Engine Building with Lucene and Solr (So Code Camp San Diego 2014)
Sunspot - The Ruby Way into Solr
Solr02 fields
Make Your Data Searchable With Solr in 25 Minutes
20130310 solr tuorial
Implementing full text search with Apache Solr
Apache solr tech doc
What's new in solr june 2014
Retrieving Information From Solr
Apache Solr Search Mastery
Solr Introduction
Ad

More from BloomReach (17)

PPTX
Learning from Complex Online Behavior with Andy Edmonds - Big Brains
PDF
Solr Payloads for Ranking Data
PPTX
Internet Retailer Mobile Webinar
PPTX
Making Mobile Exceed Expectations
PPTX
Marketing Trends: Search, Social, Shopping & Mobile
PPTX
The Secret to Great Search Campaigns
PPTX
Maximize ROI by Unlocking the Full Value of Undiscovered Content
PPTX
Creating Great Landing Pages
KEY
Big Data Marketing
PPTX
Guess Case Study
PPTX
Neiman Marcus Case Study
PPTX
Anatomy of a Big Data Application (BDA)
PPTX
BloomReach Customer Success Stories
PPTX
How to grab eCommerce by the Long Tail
PDF
Ampush Case Study
PDF
Wayfair Case Study
PPTX
Getting found a zillion times
Learning from Complex Online Behavior with Andy Edmonds - Big Brains
Solr Payloads for Ranking Data
Internet Retailer Mobile Webinar
Making Mobile Exceed Expectations
Marketing Trends: Search, Social, Shopping & Mobile
The Secret to Great Search Campaigns
Maximize ROI by Unlocking the Full Value of Undiscovered Content
Creating Great Landing Pages
Big Data Marketing
Guess Case Study
Neiman Marcus Case Study
Anatomy of a Big Data Application (BDA)
BloomReach Customer Success Stories
How to grab eCommerce by the Long Tail
Ampush Case Study
Wayfair Case Study
Getting found a zillion times

Recently uploaded (20)

PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Chapter 5: Probability Theory and Statistics
PDF
Encapsulation theory and applications.pdf
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Hindi spoken digit analysis for native and non-native speakers
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Hybrid model detection and classification of lung cancer
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
1 - Historical Antecedents, Social Consideration.pdf
PPTX
A Presentation on Touch Screen Technology
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Web App vs Mobile App What Should You Build First.pdf
Encapsulation_ Review paper, used for researhc scholars
Chapter 5: Probability Theory and Statistics
Encapsulation theory and applications.pdf
SOPHOS-XG Firewall Administrator PPT.pptx
Hindi spoken digit analysis for native and non-native speakers
Programs and apps: productivity, graphics, security and other tools
Hybrid model detection and classification of lung cancer
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
1 - Historical Antecedents, Social Consideration.pdf
A Presentation on Touch Screen Technology
Assigned Numbers - 2025 - Bluetooth® Document
A comparative analysis of optical character recognition models for extracting...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
A comparative study of natural language inference in Swahili using monolingua...
Group 1 Presentation -Planning and Decision Making .pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...

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

  • #3: Example of a field
  • #5: Facet – String - Stored
  • #6: Color_group, size_type