SlideShare a Scribd company logo
1 of 34
Apache
Open Source Full Text Search Server
• What is Solr?
• Solr Architecture
• Install & Configure
• Search, Index, Update & Delete
What is Solr ?
• Solr is full text search server with REST-like API
• Document index with JSON, XML, CSV or binary over HTTP
• Query document with HTTP GET
• Receive JSON, XML, CSV or binary result
Solr History
• 2004 - Solr was created by Yonik Seeley
• 2006 - Solr was joined in Apache
• 2006 - Solr version 1.1.0. was released
• 2010 - Solr and Lucene merged
• 2012 - Solr version 4.0 was released
• 2015 - Solr version 5.0 was released
• 2016 - Solr version 6.0 was released
Solr Features
• Fuzzy & Proximity Search
• Filter Query
• Faceting
• Highlighting
• Stats
• Spellcheck
• Grouping
• Admin Panel
Who uses Solr ?
Solr Architecture
Solr
Terminology
• Core
• Document
• Field
• FieldType
• Analyzer
• Filter
• Tokenizer
Common
Field
Attribute
• name
• type
• indexed
• stored
• multivalued
• required
• compressed
Install
&
configure
• brew install solr
• schema.xml
• solrconfig.xml
• solr start -p port
schema • uniquekey
• fieldtype
• analyzer
• filter
• tokenizer
• field
• dynamic Field
• copyField
solrconfig
• Data directory
• Query Cache parameters
• Request Handlers
• Update Handler (update log, autocommit )
• Lucene version
Custom Field Type
<fieldType name="text_general" class="solr.TextField”positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory" expand="true" ignoreCase="true"
synonyms="synonyms.txt"/>
<filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
</analyzer>
</fieldType>
Logging
default log folder : solr/logs/*
log4j.properties : solr/resources/*
Search
Document
• q
• fq
• start
• row
• sort
• fl
• wt
Query
Syntax
Keyword Matching
name:foo bar
name:”foo bar”
name:foo -name:bar
Wildcard Matching
title:foo*
title:foo*bar
Range Search ( field:[0 TO 1] )
Boosts ( title:foo^1.5 OR body:foo )
Fuzzy
&
Proximity
Search
• Fuzzy Search
• title”iphone”~0.5
• Proximity Search
• Title:”foo bar”~2
• foo abc def bar
• bar abc foo
Filter
Query return result without influence document score
faster than query
Faceting • facet.query
• facet.field
• facet.mincount -> f.<field.name>.facet.mincount
• facet.limit -> f.<field.name>.facet.limit
• facet.offset -> f.<field.name>.facet.offset
• facet.sort count, facet.sort index
• tagging & excluding Filter
Faceting
• Facet.range
• Facet.range.start
• Facet.range.finish
• facet.range.gap
Faceting
Highlighting hl=true
fl
simple.pre
simple.post
"highlighting": {
"37477": {
"name": ["Apple <em>IPhone</em> 6S"]
}
}
Stats
stats=true&stats.field=field.name
• min
• max
• count
• sum
• sumOfSquares
Spelling
spellcheck.q=Keyword&spellcheck=on
"spellcheck": {
"suggestions":
["father",{
"numFound": 3,
"startOffset": 0,
"endOffset": 6,
"origFreq": 20,
"suggestion": [
{"word": "feather","freq": 3},
{"word": "farmer","freq": 4},
{"word": "fisher","freq": 3}
]
}
],
"correctlySpelled": false}
Grouping
group=true&group.field=year
"grouped":{
"year":{
"matches":10683,
"groups":[{
"groupValue":1995,
"doclist":{"numFound":361,"start":0,"docs":[
{
"movie_id":"movie_32",
"id":"32",
"name":"12 Monkeys (Twelve Monkeys)",
"year":1995,
"genre":["Sci-Fi",
"Thriller"],
"_version_":1545364353246560258}]
}},
{
"groupValue":1994,
"doclist":{"numFound":307,"start":0,"docs":[
{
"movie_id":"movie_889",
"id":"889",
"name":"1-900 (06)",
"year":1994,
"genre":["Drama",
"Romance"],
"_version_":1545364353356660743}]
}}}
Index
Data • post command -c coreName -p port
• Rest API
• SolrJ, Spring Data Solr or Other libraries
• DataImportHandler
REST API Sample (XML)
curl -X POST "http://localhost:8080/solr/films/update?commit=true"
-H "Content-Type: text/xml"
-d '
<add>
<doc>
<field name="id">100000</field>
<field name="name">Toy2 Story</field>
</doc>
</add>'
REST API Sample (JSON)
curl -X POST 'http://localhost:8983/solr/new_core/update?commit=true'
-H 'Content-Type: application/json'
-d'
[
{
"id": "1",
"name": "movie name 1"
},
{
"id": "1",
"name": "movie name 2"
}
]'
DataImportHandler (Mysql)
<dataConfig>
<dataSource type=”JdbcDataSource”
driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/db"
user="username" password="password" />
<document>
<entity name="film"
query="select id,name from film"
deltaQuery="select id from film where last_modified > '${dataimporter.last_index_time}'">
<field column="id" name="id" />
<field column="name" name="name" />
</entity>
</document>
</dataConfig>
Update Data
curl -X POST "http://localhost:8983/solr/new_core/update?commit=true"
-H "Content-Type: text/xml"
-d ‘[{"id":"1","movie_id":{"set":”new_movie_id"}}]'
Delete Data
http://localhost:8983/solr/new_core/update
?commit=true
&stream.body=<delete><query>*:*</query></delete>
Admin Panel
&
Demo

More Related Content

What's hot

Solr Application Development Tutorial
Solr Application Development TutorialSolr Application Development Tutorial
Solr Application Development Tutorial
Erik Hatcher
 
MySQL Indexing - Best practices for MySQL 5.6
MySQL Indexing - Best practices for MySQL 5.6MySQL Indexing - Best practices for MySQL 5.6
MySQL Indexing - Best practices for MySQL 5.6
MYXPLAIN
 
[221] 딥러닝을 이용한 지역 컨텍스트 검색 김진호
[221] 딥러닝을 이용한 지역 컨텍스트 검색 김진호[221] 딥러닝을 이용한 지역 컨텍스트 검색 김진호
[221] 딥러닝을 이용한 지역 컨텍스트 검색 김진호
NAVER D2
 

What's hot (20)

Solr Application Development Tutorial
Solr Application Development TutorialSolr Application Development Tutorial
Solr Application Development Tutorial
 
Oracle Data Redaction
Oracle Data RedactionOracle Data Redaction
Oracle Data Redaction
 
Elastic Search (엘라스틱서치) 입문
Elastic Search (엘라스틱서치) 입문Elastic Search (엘라스틱서치) 입문
Elastic Search (엘라스틱서치) 입문
 
데이터를 얻으려는 노오오력
데이터를 얻으려는 노오오력데이터를 얻으려는 노오오력
데이터를 얻으려는 노오오력
 
E-Commerce search with Elasticsearch
E-Commerce search with ElasticsearchE-Commerce search with Elasticsearch
E-Commerce search with Elasticsearch
 
Elasticsearch - under the hood
Elasticsearch - under the hoodElasticsearch - under the hood
Elasticsearch - under the hood
 
Big Data MDX with Mondrian and Apache Kylin
Big Data MDX with Mondrian and Apache KylinBig Data MDX with Mondrian and Apache Kylin
Big Data MDX with Mondrian and Apache Kylin
 
Unified MLOps: Feature Stores & Model Deployment
Unified MLOps: Feature Stores & Model DeploymentUnified MLOps: Feature Stores & Model Deployment
Unified MLOps: Feature Stores & Model Deployment
 
Solr vs. Elasticsearch - Case by Case
Solr vs. Elasticsearch - Case by CaseSolr vs. Elasticsearch - Case by Case
Solr vs. Elasticsearch - Case by Case
 
Enterprise Data Classification and Provenance
Enterprise Data Classification and ProvenanceEnterprise Data Classification and Provenance
Enterprise Data Classification and Provenance
 
How the Lucene More Like This Works
How the Lucene More Like This WorksHow the Lucene More Like This Works
How the Lucene More Like This Works
 
MySQL Indexing - Best practices for MySQL 5.6
MySQL Indexing - Best practices for MySQL 5.6MySQL Indexing - Best practices for MySQL 5.6
MySQL Indexing - Best practices for MySQL 5.6
 
Not Just ORM: Powerful Hibernate ORM Features and Capabilities
Not Just ORM: Powerful Hibernate ORM Features and CapabilitiesNot Just ORM: Powerful Hibernate ORM Features and Capabilities
Not Just ORM: Powerful Hibernate ORM Features and Capabilities
 
PostgreSQL
PostgreSQLPostgreSQL
PostgreSQL
 
[211] 네이버 검색과 데이터마이닝
[211] 네이버 검색과 데이터마이닝[211] 네이버 검색과 데이터마이닝
[211] 네이버 검색과 데이터마이닝
 
검색엔진이 데이터를 다루는 법 김종민
검색엔진이 데이터를 다루는 법 김종민검색엔진이 데이터를 다루는 법 김종민
검색엔진이 데이터를 다루는 법 김종민
 
[221] 딥러닝을 이용한 지역 컨텍스트 검색 김진호
[221] 딥러닝을 이용한 지역 컨텍스트 검색 김진호[221] 딥러닝을 이용한 지역 컨텍스트 검색 김진호
[221] 딥러닝을 이용한 지역 컨텍스트 검색 김진호
 
An Introduction to Elastic Search.
An Introduction to Elastic Search.An Introduction to Elastic Search.
An Introduction to Elastic Search.
 
Capacitacion Apex 5 Oracle - Daniel Bermudez
Capacitacion Apex 5 Oracle - Daniel BermudezCapacitacion Apex 5 Oracle - Daniel Bermudez
Capacitacion Apex 5 Oracle - Daniel Bermudez
 
Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013
Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013
Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013
 

Viewers also liked

cung cấp dịch vụ giúp việc theo giờ chất lượng cao ở hồ chí minh
cung cấp dịch vụ giúp việc theo giờ chất lượng cao ở hồ chí minhcung cấp dịch vụ giúp việc theo giờ chất lượng cao ở hồ chí minh
cung cấp dịch vụ giúp việc theo giờ chất lượng cao ở hồ chí minh
andrew260
 

Viewers also liked (12)

Building Microservices with Spring Cloud and Netflix OSS
Building Microservices with Spring Cloud and Netflix OSSBuilding Microservices with Spring Cloud and Netflix OSS
Building Microservices with Spring Cloud and Netflix OSS
 
Google search vs Solr search for Enterprise search
Google search vs Solr search for Enterprise searchGoogle search vs Solr search for Enterprise search
Google search vs Solr search for Enterprise search
 
ICDIM 2016 Optical detrapping in persistent phosphors
ICDIM 2016 Optical detrapping in persistent phosphorsICDIM 2016 Optical detrapping in persistent phosphors
ICDIM 2016 Optical detrapping in persistent phosphors
 
12 zile o initiere secreta
12 zile o initiere secreta12 zile o initiere secreta
12 zile o initiere secreta
 
Global warming (Stop destroying the future)
Global warming (Stop destroying the future)Global warming (Stop destroying the future)
Global warming (Stop destroying the future)
 
My portfolio Eng
My portfolio EngMy portfolio Eng
My portfolio Eng
 
Irch opd
Irch opdIrch opd
Irch opd
 
cung cấp dịch vụ giúp việc theo giờ chất lượng cao ở hồ chí minh
cung cấp dịch vụ giúp việc theo giờ chất lượng cao ở hồ chí minhcung cấp dịch vụ giúp việc theo giờ chất lượng cao ở hồ chí minh
cung cấp dịch vụ giúp việc theo giờ chất lượng cao ở hồ chí minh
 
TechBoost 2015 - Ghent University - Phosphors for lighting
TechBoost 2015 - Ghent University - Phosphors for lightingTechBoost 2015 - Ghent University - Phosphors for lighting
TechBoost 2015 - Ghent University - Phosphors for lighting
 
Blog
BlogBlog
Blog
 
Paediatric medicine opdworkflow
Paediatric medicine opdworkflowPaediatric medicine opdworkflow
Paediatric medicine opdworkflow
 
brochure_inglés_sinpademobile
brochure_inglés_sinpademobilebrochure_inglés_sinpademobile
brochure_inglés_sinpademobile
 

Similar to Apache Solr

Apache Solr crash course
Apache Solr crash courseApache Solr crash course
Apache Solr crash course
Tommaso Teofili
 
20130310 solr tuorial
20130310 solr tuorial20130310 solr tuorial
20130310 solr tuorial
Chris Huang
 
Introduction to Solr
Introduction to SolrIntroduction to Solr
Introduction to Solr
Erik Hatcher
 
Introduction to Apache Lucene/Solr
Introduction to Apache Lucene/SolrIntroduction to Apache Lucene/Solr
Introduction to Apache Lucene/Solr
Rahul Jain
 
Apachesolr presentation
Apachesolr presentationApachesolr presentation
Apachesolr presentation
freeformkurt
 
Solr Recipes Workshop
Solr Recipes WorkshopSolr Recipes Workshop
Solr Recipes Workshop
Erik Hatcher
 

Similar to Apache Solr (20)

Search in the Biblical Domain - BibleTech: 2011
Search in the Biblical Domain - BibleTech: 2011Search in the Biblical Domain - BibleTech: 2011
Search in the Biblical Domain - BibleTech: 2011
 
Apache Solr crash course
Apache Solr crash courseApache Solr crash course
Apache Solr crash course
 
20130310 solr tuorial
20130310 solr tuorial20130310 solr tuorial
20130310 solr tuorial
 
Apache solr
Apache solrApache solr
Apache solr
 
Introduction to Solr
Introduction to SolrIntroduction to Solr
Introduction to Solr
 
Introduction to Solr
Introduction to SolrIntroduction to Solr
Introduction to Solr
 
Introduction to Apache Lucene/Solr
Introduction to Apache Lucene/SolrIntroduction to Apache Lucene/Solr
Introduction to Apache Lucene/Solr
 
Apache Solr - Enterprise search platform
Apache Solr - Enterprise search platformApache Solr - Enterprise search platform
Apache Solr - Enterprise search platform
 
What's new in solr june 2014
What's new in solr june 2014What's new in solr june 2014
What's new in solr june 2014
 
Apachesolr presentation
Apachesolr presentationApachesolr presentation
Apachesolr presentation
 
SOLR
SOLRSOLR
SOLR
 
Introduction to Solr
Introduction to SolrIntroduction to Solr
Introduction to Solr
 
Solr Recipes Workshop
Solr Recipes WorkshopSolr Recipes Workshop
Solr Recipes Workshop
 
Solr Powered Lucene
Solr Powered LuceneSolr Powered Lucene
Solr Powered Lucene
 
Solr introduction
Solr introductionSolr introduction
Solr introduction
 
Apache Solr for TYPO3 Components & Review 2016
Apache Solr for TYPO3 Components & Review 2016Apache Solr for TYPO3 Components & Review 2016
Apache Solr for TYPO3 Components & Review 2016
 
Solr search engine with multiple table relation
Solr search engine with multiple table relationSolr search engine with multiple table relation
Solr search engine with multiple table relation
 
Make Your Data Searchable With Solr in 25 Minutes
Make Your Data Searchable With Solr in 25 MinutesMake Your Data Searchable With Solr in 25 Minutes
Make Your Data Searchable With Solr in 25 Minutes
 
Solr
SolrSolr
Solr
 
Drupal7 and Apache Solr
Drupal7 and Apache SolrDrupal7 and Apache Solr
Drupal7 and Apache Solr
 

Recently uploaded

%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Recently uploaded (20)

Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 

Apache Solr

Editor's Notes

  1. Solr 4.0 ( Solr Cloud) Solr 5.0 ( Standalone Application ) Solr 6.0 ( Parallel queries across solr cloud collections and new jdbc driver for sql interfaces )
  2. <requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler"> <lst name="defaults"> <str name="config">db-data-config.xml</str> </lst> </requestHandler>
  3. http://localhost:8080/solr/new_core/select?facet.field={!ex=yearTag}year&facet=on&fq={!tag=yearTag}year:1995&indent=on&q=*:*&rows=0&wt=json http://localhost:8080/solr/new_core/select?facet.field=year&facet=on&fq=year:1995&indent=on&q=*:*&rows=0&wt=json
  4. <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy"> <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
  5. Ngroups, format, limit