SlideShare uma empresa Scribd logo
1 de 3
To start solr
=============
C:Program Filessolr-5.4.0bin> solr start -f
C:Program Filessolr-5.4.0bin> solr start -f -p 8983
Note: start the service as a foreground process using -f, otherwise restart will
not work with background process
--------------------------------------------------------------------------------
------------------------------------------------------
To stop solr
============
C:Program Filessolr-5.4.0bin> solr stop -f -p 8983
C:Program Filessolr-5.4.0bin> solr stop -f -all
--------------------------------------------------------------------------------
------------------------------------------------------
To restart solr
===============
C:Program Filessolr-5.4.0bin> solr restart -f -p 8983
--------------------------------------------------------------------------------
------------------------------------------------------
To validate solr
================
http://localhost:8983/solr/
********************************************************************************
******************************************************
Configuration
********************************************************************************
******************************************************
Creating a Core
===============
C:Program Filessolr-5.4.0bin> solr create -c csvcore -d basic_configs -p
8983
C:Program Filessolr-5.4.0bin> solr create -c jsoncore -d basic_configs -p
8983
C:Program Filessolr-5.4.0bin> solr create -c xmlcore -d basic_configs -p
8983
Deleting a Core
===============
C:Program Filessolr-5.4.0bin> solr delete -c csvcore -p 8983
C:Program Filessolr-5.4.0bin> solr delete -c jsoncore -p 8983
C:Program Filessolr-5.4.0bin> solr delete -c xmlcore -p 8983
Explanation
-----------
-c <name> - Name of the core or collection to create (required).
-d <confdir> - The configuration directory, useful in the SolrCloud mode.
-n <configName> - The configuration name. This defaults to the same name as the
core or collection.
-p <port> - Port of a local Solr instance to send the create command to; by
default the script tries to detect the port by looking for running Solr
instances.
-s <shards> - Number of shards to split a collection into, default is 1.
-rf <replicas> - Number of copies of each document in the collection. The
default is 1.
--------------------------------------------------------------------------------
------------------------------------------------------
Modify the schema.xml file
==========================
For CSV data - C:Program Filessolr-5.4.0serversolrcsvcoreconfschema.xml
------------
<uniqueKey>id</uniqueKey>
<!-- Fields added for books.csv load-->
<field name="cat" type="text_general" indexed="true"
stored="true"/>
<field name="name" type="text_general" indexed="true"
stored="true"/>
<field name="price" type="tdouble" indexed="true"
stored="true"/>
<field name="inStock" type="boolean" indexed="true"
stored="true"/>
<field name="author" type="text_general" indexed="true"
stored="true"/>
For JSON data - C:Program Filessolr-5.4.0serversolrjsoncoreconfschema.xml
-------------
<uniqueKey>id</uniqueKey>
<!-- Added for Multi value example -->
<field name="name" type="text_general" indexed="true"
stored="true"/>
<field name="cat" type="text_general" indexed="true"
stored="true" multiValued="true"/>
<field name="price" type="tdouble" indexed="true"
stored="true"/>
<field name="inStock" type="boolean" indexed="true"
stored="true"/>
<field name="author" type="text_general" indexed="true"
stored="true"/>
For XML data
------------
Since the default data format is xml, schema definition is not necessary
Explanation
-----------
name: Name of the field required
type: Field type required
indexed: Should this field be added to the inverted index? optional
stored: Should the original value of this field be stored? optional
multiValued: Can this field have multiple values? optional
Restart solr to reflect the changes
-----------------------------------
C:Program Filessolr-5.4.0bin> solr restart -f -p 8983
--------------------------------------------------------------------------------
------------------------------------------------------
Indexing the Data
=================
C:Program Filessolr-5.4.0exampleexampledocs> java -Dtype=text/csv
-Durl=http://localhost:8983/solr/csvcore/update -jar post.jar books.csv
C:Program Filessolr-5.4.0exampleexampledocs> java -Dtype=text/json
-Durl=http://localhost:8983/solr/jsoncore/update -jar post.jar books.json
C:Program Filessolr-5.4.0exampleexampledocs> java -Dtype=text/xml
-Durl=http://localhost:8983/solr/xmlcore/update -jar post.jar *.xml
Explanation
-----------
-Dtype -> the type of the data file.
JSON file: text/json, application/json
XML files: text/xml, application/xml
CSV file: text/csv, application/csv
-Durl -> URL for the core.
********************************************************************************
******************************************************
Access the Indexed documents
********************************************************************************
******************************************************
C:Program Filessolr-5.4.0bin> solr -e techproducts -f -p 8983
Querying Data
=============
http://localhost:8983/solr/#/techproducts/query?indent=on&q=video&fl=name,id
http://localhost:8983/solr/#/techproducts/query?
indent=on&q=video&fl=name,id,score
http://localhost:8983/solr/#/techproducts/query?indent=on&q=video&fl=*,score
http://localhost:8983/solr/#/techproducts/query?indent=on&q=video&sort=price
desc&fl=name,id,price
http://localhost:8983/solr/#/techproducts/query?indent=on&q=video&wt=json
--------------------------------------------------------------------------------
------------------------------------------------------
Sorting
=======
http://localhost:8983/solr/#/techproducts/query?indent=on&q=video&sort=price
desc
http://localhost:8983/solr/#/techproducts/query?indent=on&q=video&sort=price asc
http://localhost:8983/solr/#/techproducts/query?indent=on&q=video&sort=inStock
asc, price desc
http://localhost:8983/solr/#/techproducts/query?indent=on&q=video&sort=score
desc
http://localhost:8983/solr/#/techproducts/query?indent=on&q=video&sort=inStock
asc, score desc
http://localhost:8983/solr/#/techproducts/query?
indent=on&q=video&sort=div(popularity,add(price,1)) desc
--------------------------------------------------------------------------------
------------------------------------------------------
Highlighting
============
http://localhost:8983/solr/#/techproducts/query?
indent=on&q=video+card&fl=name,id&hl=true&hl.fl=name,features
--------------------------------------------------------------------------------
------------------------------------------------------
Faceted Search
==============
http://localhost:8983/solr/#/techproducts/query?
indent=on&q=*:*&fl=name&facet=true&facet.field=cat
http://localhost:8983/solr/#/techproducts/query?
indent=on&q=*:*&fl=name&facet=true&facet.field=cat&facet.field=inStock
http://localhost:8983/solr/#/techproducts/query?
indent=on&q=ipod&fl=name&facet=true&facet.query=price:
[0+TO+100]&facet.query=price:[100+TO+*]
http://localhost:8983/solr/#/techproducts/query?
indent=on&q=*:*&fl=name,manufacturedate_dt&facet=true&facet.date=manufacturedate
_dt&facet.date.start=2004-01-01T00:00:00Z&facet.date.end=2010-01-
01T00:00:00Z&facet.date.gap=%2b1YEAR

Mais conteúdo relacionado

Mais procurados

pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLMark Wong
 
Top 10 Mistakes When Migrating From Oracle to PostgreSQL
Top 10 Mistakes When Migrating From Oracle to PostgreSQLTop 10 Mistakes When Migrating From Oracle to PostgreSQL
Top 10 Mistakes When Migrating From Oracle to PostgreSQLJim Mlodgenski
 
PostgreSQL Portland Performance Practice Project - Database Test 2 Tuning
PostgreSQL Portland Performance Practice Project - Database Test 2 TuningPostgreSQL Portland Performance Practice Project - Database Test 2 Tuning
PostgreSQL Portland Performance Practice Project - Database Test 2 TuningMark Wong
 
Tibero sql execution plan guide en
Tibero sql execution plan guide enTibero sql execution plan guide en
Tibero sql execution plan guide enssusered8afe
 
Linea de comandos bioface zem800
Linea de comandos bioface zem800Linea de comandos bioface zem800
Linea de comandos bioface zem800thomaswarnerherrera
 
Oracle 12c far sync standby instance
Oracle 12c far sync standby instanceOracle 12c far sync standby instance
Oracle 12c far sync standby instanceMonowar Mukul
 
PostgreSQL Procedural Languages: Tips, Tricks and Gotchas
PostgreSQL Procedural Languages: Tips, Tricks and GotchasPostgreSQL Procedural Languages: Tips, Tricks and Gotchas
PostgreSQL Procedural Languages: Tips, Tricks and GotchasJim Mlodgenski
 
SCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
SCALE 15x Minimizing PostgreSQL Major Version Upgrade DowntimeSCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
SCALE 15x Minimizing PostgreSQL Major Version Upgrade DowntimeJeff Frost
 
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스PgDay.Seoul
 
Oracle Managed Files
Oracle Managed FilesOracle Managed Files
Oracle Managed FilesAnar Godjaev
 
Oracle postgre sql-mirgration-top-10-mistakes
Oracle postgre sql-mirgration-top-10-mistakesOracle postgre sql-mirgration-top-10-mistakes
Oracle postgre sql-mirgration-top-10-mistakesJim Mlodgenski
 
Optimizer Cost Model MySQL 5.7
Optimizer Cost Model MySQL 5.7Optimizer Cost Model MySQL 5.7
Optimizer Cost Model MySQL 5.7I Goo Lee
 
How to create a pluggable database by cloning an existing local pdb
How to create a pluggable database by cloning an existing local pdbHow to create a pluggable database by cloning an existing local pdb
How to create a pluggable database by cloning an existing local pdbMarco Vigelini
 
11 Things About 11gr2
11 Things About 11gr211 Things About 11gr2
11 Things About 11gr2afa reg
 
Scripts related to temp tablespace
Scripts related to temp tablespaceScripts related to temp tablespace
Scripts related to temp tablespaceSoumya Das
 
XPDS14 - osstest, Xen's Automatic Testing Facility - Ian Jackson, Citrix
XPDS14 - osstest, Xen's Automatic Testing Facility - Ian Jackson, CitrixXPDS14 - osstest, Xen's Automatic Testing Facility - Ian Jackson, Citrix
XPDS14 - osstest, Xen's Automatic Testing Facility - Ian Jackson, CitrixThe Linux Foundation
 
PostgreSQL Portland Performance Practice Project - Database Test 2 Howto
PostgreSQL Portland Performance Practice Project - Database Test 2 HowtoPostgreSQL Portland Performance Practice Project - Database Test 2 Howto
PostgreSQL Portland Performance Practice Project - Database Test 2 HowtoMark Wong
 

Mais procurados (20)

pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQL
 
Top 10 Mistakes When Migrating From Oracle to PostgreSQL
Top 10 Mistakes When Migrating From Oracle to PostgreSQLTop 10 Mistakes When Migrating From Oracle to PostgreSQL
Top 10 Mistakes When Migrating From Oracle to PostgreSQL
 
PostgreSQL Portland Performance Practice Project - Database Test 2 Tuning
PostgreSQL Portland Performance Practice Project - Database Test 2 TuningPostgreSQL Portland Performance Practice Project - Database Test 2 Tuning
PostgreSQL Portland Performance Practice Project - Database Test 2 Tuning
 
Command
CommandCommand
Command
 
Tibero sql execution plan guide en
Tibero sql execution plan guide enTibero sql execution plan guide en
Tibero sql execution plan guide en
 
Linea de comandos bioface zem800
Linea de comandos bioface zem800Linea de comandos bioface zem800
Linea de comandos bioface zem800
 
Hadoop Performance comparison
Hadoop Performance comparisonHadoop Performance comparison
Hadoop Performance comparison
 
Oracle 12c far sync standby instance
Oracle 12c far sync standby instanceOracle 12c far sync standby instance
Oracle 12c far sync standby instance
 
Free toolsinstall
Free toolsinstallFree toolsinstall
Free toolsinstall
 
PostgreSQL Procedural Languages: Tips, Tricks and Gotchas
PostgreSQL Procedural Languages: Tips, Tricks and GotchasPostgreSQL Procedural Languages: Tips, Tricks and Gotchas
PostgreSQL Procedural Languages: Tips, Tricks and Gotchas
 
SCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
SCALE 15x Minimizing PostgreSQL Major Version Upgrade DowntimeSCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
SCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
 
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
 
Oracle Managed Files
Oracle Managed FilesOracle Managed Files
Oracle Managed Files
 
Oracle postgre sql-mirgration-top-10-mistakes
Oracle postgre sql-mirgration-top-10-mistakesOracle postgre sql-mirgration-top-10-mistakes
Oracle postgre sql-mirgration-top-10-mistakes
 
Optimizer Cost Model MySQL 5.7
Optimizer Cost Model MySQL 5.7Optimizer Cost Model MySQL 5.7
Optimizer Cost Model MySQL 5.7
 
How to create a pluggable database by cloning an existing local pdb
How to create a pluggable database by cloning an existing local pdbHow to create a pluggable database by cloning an existing local pdb
How to create a pluggable database by cloning an existing local pdb
 
11 Things About 11gr2
11 Things About 11gr211 Things About 11gr2
11 Things About 11gr2
 
Scripts related to temp tablespace
Scripts related to temp tablespaceScripts related to temp tablespace
Scripts related to temp tablespace
 
XPDS14 - osstest, Xen's Automatic Testing Facility - Ian Jackson, Citrix
XPDS14 - osstest, Xen's Automatic Testing Facility - Ian Jackson, CitrixXPDS14 - osstest, Xen's Automatic Testing Facility - Ian Jackson, Citrix
XPDS14 - osstest, Xen's Automatic Testing Facility - Ian Jackson, Citrix
 
PostgreSQL Portland Performance Practice Project - Database Test 2 Howto
PostgreSQL Portland Performance Practice Project - Database Test 2 HowtoPostgreSQL Portland Performance Practice Project - Database Test 2 Howto
PostgreSQL Portland Performance Practice Project - Database Test 2 Howto
 

Destaque

Untitled Infographic
Untitled InfographicUntitled Infographic
Untitled Infographickatiedingess
 
Nuevo ecosistema digital de la ATTG
Nuevo ecosistema digital de la ATTGNuevo ecosistema digital de la ATTG
Nuevo ecosistema digital de la ATTGATTG Gipuzkoa
 
The Top Attractions in Denver
The Top Attractions in DenverThe Top Attractions in Denver
The Top Attractions in Denver49ThingstoDo
 
Grace Century - About Us
Grace Century - About UsGrace Century - About Us
Grace Century - About UsScott Wolf
 
قطاع الشمال ( بني مزار مغاغة - العدوة )
قطاع الشمال ( بني مزار  مغاغة - العدوة )قطاع الشمال ( بني مزار  مغاغة - العدوة )
قطاع الشمال ( بني مزار مغاغة - العدوة )Nour Elbader
 
bảng giá thiết kế video quảng cáo độc đáo
bảng giá thiết kế video quảng cáo độc đáobảng giá thiết kế video quảng cáo độc đáo
bảng giá thiết kế video quảng cáo độc đáomercedez164
 
Perintah-perintah MS-DOS
Perintah-perintah MS-DOSPerintah-perintah MS-DOS
Perintah-perintah MS-DOSsfhsjd
 

Destaque (10)

Big data
Big dataBig data
Big data
 
Untitled Infographic
Untitled InfographicUntitled Infographic
Untitled Infographic
 
2558 project
2558 project 2558 project
2558 project
 
Nuevo ecosistema digital de la ATTG
Nuevo ecosistema digital de la ATTGNuevo ecosistema digital de la ATTG
Nuevo ecosistema digital de la ATTG
 
Climantica
ClimanticaClimantica
Climantica
 
The Top Attractions in Denver
The Top Attractions in DenverThe Top Attractions in Denver
The Top Attractions in Denver
 
Grace Century - About Us
Grace Century - About UsGrace Century - About Us
Grace Century - About Us
 
قطاع الشمال ( بني مزار مغاغة - العدوة )
قطاع الشمال ( بني مزار  مغاغة - العدوة )قطاع الشمال ( بني مزار  مغاغة - العدوة )
قطاع الشمال ( بني مزار مغاغة - العدوة )
 
bảng giá thiết kế video quảng cáo độc đáo
bảng giá thiết kế video quảng cáo độc đáobảng giá thiết kế video quảng cáo độc đáo
bảng giá thiết kế video quảng cáo độc đáo
 
Perintah-perintah MS-DOS
Perintah-perintah MS-DOSPerintah-perintah MS-DOS
Perintah-perintah MS-DOS
 

Semelhante a Quick reference for solr

Redo logfile addition in oracle rac 12c
Redo logfile addition in oracle rac 12cRedo logfile addition in oracle rac 12c
Redo logfile addition in oracle rac 12cDebasish Nayak
 
Dataguard physical stand by setup
Dataguard physical stand by setupDataguard physical stand by setup
Dataguard physical stand by setupsmajeed1
 
EvolveExecutionPlans.pdf
EvolveExecutionPlans.pdfEvolveExecutionPlans.pdf
EvolveExecutionPlans.pdfPraveenPolu1
 
Basic Knowledge on MySql Replication
Basic Knowledge on MySql ReplicationBasic Knowledge on MySql Replication
Basic Knowledge on MySql ReplicationTasawr Interactive
 
12c: Testing audit features for Data Pump (Export & Import) and RMAN jobs
12c: Testing audit features for Data Pump (Export & Import) and RMAN jobs12c: Testing audit features for Data Pump (Export & Import) and RMAN jobs
12c: Testing audit features for Data Pump (Export & Import) and RMAN jobsMonowar Mukul
 
glance replicator
glance replicatorglance replicator
glance replicatoririx_jp
 
Moving 12c database from NON-ASM to ASM
Moving 12c database from NON-ASM to ASMMoving 12c database from NON-ASM to ASM
Moving 12c database from NON-ASM to ASMMonowar Mukul
 
br_test_lossof-datafile_10g.doc
br_test_lossof-datafile_10g.docbr_test_lossof-datafile_10g.doc
br_test_lossof-datafile_10g.docLucky Ally
 

Semelhante a Quick reference for solr (20)

ZFINDALLZPROGAM
ZFINDALLZPROGAMZFINDALLZPROGAM
ZFINDALLZPROGAM
 
Redo logfile addition in oracle rac 12c
Redo logfile addition in oracle rac 12cRedo logfile addition in oracle rac 12c
Redo logfile addition in oracle rac 12c
 
Hadoop on aws amazon
Hadoop on aws amazonHadoop on aws amazon
Hadoop on aws amazon
 
Hadoop on aws amazon
Hadoop on aws amazonHadoop on aws amazon
Hadoop on aws amazon
 
Dataguard physical stand by setup
Dataguard physical stand by setupDataguard physical stand by setup
Dataguard physical stand by setup
 
Ass OS
Ass OSAss OS
Ass OS
 
Ass hđh
Ass hđhAss hđh
Ass hđh
 
Quick reference for curl
Quick reference for curlQuick reference for curl
Quick reference for curl
 
Quick reference for spark sql
Quick reference for spark sqlQuick reference for spark sql
Quick reference for spark sql
 
EvolveExecutionPlans.pdf
EvolveExecutionPlans.pdfEvolveExecutionPlans.pdf
EvolveExecutionPlans.pdf
 
Basic Knowledge on MySql Replication
Basic Knowledge on MySql ReplicationBasic Knowledge on MySql Replication
Basic Knowledge on MySql Replication
 
12c: Testing audit features for Data Pump (Export & Import) and RMAN jobs
12c: Testing audit features for Data Pump (Export & Import) and RMAN jobs12c: Testing audit features for Data Pump (Export & Import) and RMAN jobs
12c: Testing audit features for Data Pump (Export & Import) and RMAN jobs
 
Rmoug ashmaster
Rmoug ashmasterRmoug ashmaster
Rmoug ashmaster
 
glance replicator
glance replicatorglance replicator
glance replicator
 
HADOOP Training
HADOOP TrainingHADOOP Training
HADOOP Training
 
Hadoop course content
Hadoop course contentHadoop course content
Hadoop course content
 
Moving 12c database from NON-ASM to ASM
Moving 12c database from NON-ASM to ASMMoving 12c database from NON-ASM to ASM
Moving 12c database from NON-ASM to ASM
 
br_test_lossof-datafile_10g.doc
br_test_lossof-datafile_10g.docbr_test_lossof-datafile_10g.doc
br_test_lossof-datafile_10g.doc
 
Less04_Database_Instance.ppt
Less04_Database_Instance.pptLess04_Database_Instance.ppt
Less04_Database_Instance.ppt
 
Awr doag
Awr doagAwr doag
Awr doag
 

Último

BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 

Último (20)

BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 

Quick reference for solr

  • 1. To start solr ============= C:Program Filessolr-5.4.0bin> solr start -f C:Program Filessolr-5.4.0bin> solr start -f -p 8983 Note: start the service as a foreground process using -f, otherwise restart will not work with background process -------------------------------------------------------------------------------- ------------------------------------------------------ To stop solr ============ C:Program Filessolr-5.4.0bin> solr stop -f -p 8983 C:Program Filessolr-5.4.0bin> solr stop -f -all -------------------------------------------------------------------------------- ------------------------------------------------------ To restart solr =============== C:Program Filessolr-5.4.0bin> solr restart -f -p 8983 -------------------------------------------------------------------------------- ------------------------------------------------------ To validate solr ================ http://localhost:8983/solr/ ******************************************************************************** ****************************************************** Configuration ******************************************************************************** ****************************************************** Creating a Core =============== C:Program Filessolr-5.4.0bin> solr create -c csvcore -d basic_configs -p 8983 C:Program Filessolr-5.4.0bin> solr create -c jsoncore -d basic_configs -p 8983 C:Program Filessolr-5.4.0bin> solr create -c xmlcore -d basic_configs -p 8983 Deleting a Core =============== C:Program Filessolr-5.4.0bin> solr delete -c csvcore -p 8983 C:Program Filessolr-5.4.0bin> solr delete -c jsoncore -p 8983 C:Program Filessolr-5.4.0bin> solr delete -c xmlcore -p 8983 Explanation ----------- -c <name> - Name of the core or collection to create (required). -d <confdir> - The configuration directory, useful in the SolrCloud mode. -n <configName> - The configuration name. This defaults to the same name as the core or collection. -p <port> - Port of a local Solr instance to send the create command to; by default the script tries to detect the port by looking for running Solr instances. -s <shards> - Number of shards to split a collection into, default is 1. -rf <replicas> - Number of copies of each document in the collection. The default is 1. -------------------------------------------------------------------------------- ------------------------------------------------------ Modify the schema.xml file ========================== For CSV data - C:Program Filessolr-5.4.0serversolrcsvcoreconfschema.xml ------------ <uniqueKey>id</uniqueKey> <!-- Fields added for books.csv load--> <field name="cat" type="text_general" indexed="true"
  • 2. stored="true"/> <field name="name" type="text_general" indexed="true" stored="true"/> <field name="price" type="tdouble" indexed="true" stored="true"/> <field name="inStock" type="boolean" indexed="true" stored="true"/> <field name="author" type="text_general" indexed="true" stored="true"/> For JSON data - C:Program Filessolr-5.4.0serversolrjsoncoreconfschema.xml ------------- <uniqueKey>id</uniqueKey> <!-- Added for Multi value example --> <field name="name" type="text_general" indexed="true" stored="true"/> <field name="cat" type="text_general" indexed="true" stored="true" multiValued="true"/> <field name="price" type="tdouble" indexed="true" stored="true"/> <field name="inStock" type="boolean" indexed="true" stored="true"/> <field name="author" type="text_general" indexed="true" stored="true"/> For XML data ------------ Since the default data format is xml, schema definition is not necessary Explanation ----------- name: Name of the field required type: Field type required indexed: Should this field be added to the inverted index? optional stored: Should the original value of this field be stored? optional multiValued: Can this field have multiple values? optional Restart solr to reflect the changes ----------------------------------- C:Program Filessolr-5.4.0bin> solr restart -f -p 8983 -------------------------------------------------------------------------------- ------------------------------------------------------ Indexing the Data ================= C:Program Filessolr-5.4.0exampleexampledocs> java -Dtype=text/csv -Durl=http://localhost:8983/solr/csvcore/update -jar post.jar books.csv C:Program Filessolr-5.4.0exampleexampledocs> java -Dtype=text/json -Durl=http://localhost:8983/solr/jsoncore/update -jar post.jar books.json C:Program Filessolr-5.4.0exampleexampledocs> java -Dtype=text/xml -Durl=http://localhost:8983/solr/xmlcore/update -jar post.jar *.xml Explanation ----------- -Dtype -> the type of the data file. JSON file: text/json, application/json XML files: text/xml, application/xml CSV file: text/csv, application/csv -Durl -> URL for the core. ******************************************************************************** ****************************************************** Access the Indexed documents ********************************************************************************
  • 3. ****************************************************** C:Program Filessolr-5.4.0bin> solr -e techproducts -f -p 8983 Querying Data ============= http://localhost:8983/solr/#/techproducts/query?indent=on&q=video&fl=name,id http://localhost:8983/solr/#/techproducts/query? indent=on&q=video&fl=name,id,score http://localhost:8983/solr/#/techproducts/query?indent=on&q=video&fl=*,score http://localhost:8983/solr/#/techproducts/query?indent=on&q=video&sort=price desc&fl=name,id,price http://localhost:8983/solr/#/techproducts/query?indent=on&q=video&wt=json -------------------------------------------------------------------------------- ------------------------------------------------------ Sorting ======= http://localhost:8983/solr/#/techproducts/query?indent=on&q=video&sort=price desc http://localhost:8983/solr/#/techproducts/query?indent=on&q=video&sort=price asc http://localhost:8983/solr/#/techproducts/query?indent=on&q=video&sort=inStock asc, price desc http://localhost:8983/solr/#/techproducts/query?indent=on&q=video&sort=score desc http://localhost:8983/solr/#/techproducts/query?indent=on&q=video&sort=inStock asc, score desc http://localhost:8983/solr/#/techproducts/query? indent=on&q=video&sort=div(popularity,add(price,1)) desc -------------------------------------------------------------------------------- ------------------------------------------------------ Highlighting ============ http://localhost:8983/solr/#/techproducts/query? indent=on&q=video+card&fl=name,id&hl=true&hl.fl=name,features -------------------------------------------------------------------------------- ------------------------------------------------------ Faceted Search ============== http://localhost:8983/solr/#/techproducts/query? indent=on&q=*:*&fl=name&facet=true&facet.field=cat http://localhost:8983/solr/#/techproducts/query? indent=on&q=*:*&fl=name&facet=true&facet.field=cat&facet.field=inStock http://localhost:8983/solr/#/techproducts/query? indent=on&q=ipod&fl=name&facet=true&facet.query=price: [0+TO+100]&facet.query=price:[100+TO+*] http://localhost:8983/solr/#/techproducts/query? indent=on&q=*:*&fl=name,manufacturedate_dt&facet=true&facet.date=manufacturedate _dt&facet.date.start=2004-01-01T00:00:00Z&facet.date.end=2010-01- 01T00:00:00Z&facet.date.gap=%2b1YEAR