SlideShare a Scribd company logo
1 of 17
Introduction to Apache Solr 4.4
@somkiat
Features
• Full Text Search
• Optimize for high volume web traffic
• Support XML, JSON
• Near Real time indexing
• Admin interface
• Support JMX
• XML configuration
• Extensible with plugin
Download
• Download Apache Solr 4.4 from
http://lucene.apache.org/solr/
Install on Apache Tomcat
• Using /example/webapps/solr.war
Create app1.xml
• In %CATALINA_HOME%confCatalinalocalhost
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase=“c:solr-4.4.0
examplewebappssolr.war" debug="0"
crossContext="true" >
<Environment name="solr/home" type="java.lang.String"
value="c:app11" override="true" />
</Context>
Structure of c:app1
• Copy all files and folder from
Start Tomcat
** Need SLF4J **
• http://www.slf4j.org
• Copy all jar files from … to %CATALINA_HOME/libs
Restart Tomcat
Goto http://localhost:8080/app1
Edit schema.xml
Solr Admin
Solr Client
• http://wiki.apache.org/solr/IntegratingSolr
• Java
– http://wiki.apache.org/solr/Solrj
Demo
$git clone https://github.com/up1/solr_4_demo.git
Indexing Data
String url = "http://localhost:8080/app1/collection1";
SolrServer server = new HttpSolrServer(url);
SolrInputDocument doc1 = new SolrInputDocument();
doc1.addField("id", "1", 1.0f);
doc1.addField("name", "doc 1", 1.0f);
doc1.addField("price", 10);
SolrInputDocument doc2 = new SolrInputDocument();
doc2.addField("id", "2", 1.0f);
doc2.addField("name", "doc 2", 1.0f);
doc2.addField("price", 100);
Collection<SolrInputDocument> docs = new ArrayList<SolrInputDocument>();
docs.add(doc1);
docs.add(doc2);
server.add(docs);
server.commit();
Indexing Data with Bean
String url = "http://localhost:8080/app1/collection1";
SolrServer server = new HttpSolrServer(url);
Product product1 = new Product("1", "product 1", 100f);
Product product2 = new Product("2", "product 2", 200f);
List<Product> products = new ArrayList<Product>();
products.add(product1);
products.add(product2);
server.addBeans(products);
server.commit();
Delete Data
String url = "http://localhost:8080/app1/collection1";
SolrServer server = new HttpSolrServer(url);
server.deleteByQuery("*:*");
server.commit();
Query Data
String url = "http://localhost:8080/app1/collection1";
SolrServer server = new HttpSolrServer(url);
SolrQuery query = new SolrQuery();
query.setQuery("*:*");
query.addSort("price", SolrQuery.ORDER.asc);
QueryResponse rsp = server.query(query);
SolrDocumentList docs = rsp.getResults();
for (SolrDocument solrDocument : docs) {
System.out.print("ID:" + solrDocument.getFieldValue("id"));
System.out.print(", Name:" + solrDocument.getFieldValue("name"));
System.out.println(", Price:" + solrDocument.getFieldValue("price"));
}

More Related Content

What's hot

OWIN and Katana Project - Not Only IIS - NoIIS
OWIN and Katana Project - Not Only IIS - NoIISOWIN and Katana Project - Not Only IIS - NoIIS
OWIN and Katana Project - Not Only IIS - NoIISBilal Haidar
 
ASP.NET Core 1.0
ASP.NET Core 1.0ASP.NET Core 1.0
ASP.NET Core 1.0Ido Flatow
 
Developing SOAP Web Services using Java
Developing SOAP Web Services using JavaDeveloping SOAP Web Services using Java
Developing SOAP Web Services using Javakrishnaviswambharan
 
Cocoapods and Most common used library in Swift
Cocoapods and Most common used library in SwiftCocoapods and Most common used library in Swift
Cocoapods and Most common used library in SwiftWan Muzaffar Wan Hashim
 
Basic architecture
Basic architectureBasic architecture
Basic architecturerasikow
 
Request-Response Cycle of Ruby on Rails App
Request-Response Cycle of Ruby on Rails AppRequest-Response Cycle of Ruby on Rails App
Request-Response Cycle of Ruby on Rails AppNathalie Steinmetz
 
Web services with laravel
Web services with laravelWeb services with laravel
Web services with laravelConfiz
 
IIS interview questions and answers
IIS interview questions and answersIIS interview questions and answers
IIS interview questions and answersInterviewwiz
 
Integration Of Mulesoft and Apache Active MQ
Integration Of Mulesoft and Apache Active MQIntegration Of Mulesoft and Apache Active MQ
Integration Of Mulesoft and Apache Active MQGaurav Talwadker
 
Web Server - Internet Applications
Web Server - Internet ApplicationsWeb Server - Internet Applications
Web Server - Internet Applicationssandra sukarieh
 
C# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENTC# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENTDr. Awase Khirni Syed
 
Implementing portlets using Web Scripts
Implementing portlets using Web ScriptsImplementing portlets using Web Scripts
Implementing portlets using Web ScriptsPiergiorgio Lucidi
 
Alfresco Summit 2014 - Crafter CMS - Case European Bank
Alfresco Summit 2014 - Crafter CMS - Case European BankAlfresco Summit 2014 - Crafter CMS - Case European Bank
Alfresco Summit 2014 - Crafter CMS - Case European BankPiergiorgio Lucidi
 
Web Application Development using MVC Framework Kohana
Web Application Development using MVC Framework KohanaWeb Application Development using MVC Framework Kohana
Web Application Development using MVC Framework KohanaArafat Rahman
 
Hire laravel-php-developers- Hire Laravel Programmers
Hire laravel-php-developers- Hire Laravel ProgrammersHire laravel-php-developers- Hire Laravel Programmers
Hire laravel-php-developers- Hire Laravel ProgrammersSummation IT
 
Introduction to laravel framework
Introduction to laravel frameworkIntroduction to laravel framework
Introduction to laravel frameworkAhmad Fatoni
 
What's New in Apache Solr 4.10
What's New in Apache Solr 4.10What's New in Apache Solr 4.10
What's New in Apache Solr 4.10Anshum Gupta
 
ColdFusion Fw1 (FrameWork1) introduction
ColdFusion Fw1 (FrameWork1) introductionColdFusion Fw1 (FrameWork1) introduction
ColdFusion Fw1 (FrameWork1) introductionSaravanaMuthu Jayaraj
 

What's hot (20)

OWIN and Katana Project - Not Only IIS - NoIIS
OWIN and Katana Project - Not Only IIS - NoIISOWIN and Katana Project - Not Only IIS - NoIIS
OWIN and Katana Project - Not Only IIS - NoIIS
 
ASP.NET Core 1.0
ASP.NET Core 1.0ASP.NET Core 1.0
ASP.NET Core 1.0
 
Developing SOAP Web Services using Java
Developing SOAP Web Services using JavaDeveloping SOAP Web Services using Java
Developing SOAP Web Services using Java
 
Cocoapods and Most common used library in Swift
Cocoapods and Most common used library in SwiftCocoapods and Most common used library in Swift
Cocoapods and Most common used library in Swift
 
Basic architecture
Basic architectureBasic architecture
Basic architecture
 
Request-Response Cycle of Ruby on Rails App
Request-Response Cycle of Ruby on Rails AppRequest-Response Cycle of Ruby on Rails App
Request-Response Cycle of Ruby on Rails App
 
Web services with laravel
Web services with laravelWeb services with laravel
Web services with laravel
 
IIS interview questions and answers
IIS interview questions and answersIIS interview questions and answers
IIS interview questions and answers
 
Integration Of Mulesoft and Apache Active MQ
Integration Of Mulesoft and Apache Active MQIntegration Of Mulesoft and Apache Active MQ
Integration Of Mulesoft and Apache Active MQ
 
Web Server - Internet Applications
Web Server - Internet ApplicationsWeb Server - Internet Applications
Web Server - Internet Applications
 
C# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENTC# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENT
 
Implementing portlets using Web Scripts
Implementing portlets using Web ScriptsImplementing portlets using Web Scripts
Implementing portlets using Web Scripts
 
Wordpress multisite
Wordpress multisiteWordpress multisite
Wordpress multisite
 
Alfresco Summit 2014 - Crafter CMS - Case European Bank
Alfresco Summit 2014 - Crafter CMS - Case European BankAlfresco Summit 2014 - Crafter CMS - Case European Bank
Alfresco Summit 2014 - Crafter CMS - Case European Bank
 
ASP.NET: Present and future
ASP.NET: Present and futureASP.NET: Present and future
ASP.NET: Present and future
 
Web Application Development using MVC Framework Kohana
Web Application Development using MVC Framework KohanaWeb Application Development using MVC Framework Kohana
Web Application Development using MVC Framework Kohana
 
Hire laravel-php-developers- Hire Laravel Programmers
Hire laravel-php-developers- Hire Laravel ProgrammersHire laravel-php-developers- Hire Laravel Programmers
Hire laravel-php-developers- Hire Laravel Programmers
 
Introduction to laravel framework
Introduction to laravel frameworkIntroduction to laravel framework
Introduction to laravel framework
 
What's New in Apache Solr 4.10
What's New in Apache Solr 4.10What's New in Apache Solr 4.10
What's New in Apache Solr 4.10
 
ColdFusion Fw1 (FrameWork1) introduction
ColdFusion Fw1 (FrameWork1) introductionColdFusion Fw1 (FrameWork1) introduction
ColdFusion Fw1 (FrameWork1) introduction
 

Viewers also liked

PROA 03/07 Обеспечение сохранности документов в базах данных
PROA 03/07 Обеспечение сохранности документов в базах данныхPROA 03/07 Обеспечение сохранности документов в базах данных
PROA 03/07 Обеспечение сохранности документов в базах данныхNatasha Khramtsovsky
 
Анализ международного законодательства и правого опыта использования открытых...
Анализ международного законодательства и правого опыта использования открытых...Анализ международного законодательства и правого опыта использования открытых...
Анализ международного законодательства и правого опыта использования открытых...Natasha Khramtsovsky
 
[SPRINTER] Elasticsearch starter-guide for Developer
[SPRINTER] Elasticsearch starter-guide for Developer[SPRINTER] Elasticsearch starter-guide for Developer
[SPRINTER] Elasticsearch starter-guide for DeveloperSomkiat Puisungnoen
 
Что происходило в отрасли в 2014 году: Достижения и планы на будущее
Что происходило в отрасли в 2014 году: Достижения и планы на будущееЧто происходило в отрасли в 2014 году: Достижения и планы на будущее
Что происходило в отрасли в 2014 году: Достижения и планы на будущееNatasha Khramtsovsky
 
Практика разрешения судебных споров, связанных с персональными данными
Практика разрешения судебных споров, связанных с персональными даннымиПрактика разрешения судебных споров, связанных с персональными данными
Практика разрешения судебных споров, связанных с персональными даннымиNatasha Khramtsovsky
 
Flipbook Steve Jasa Dd07081
Flipbook Steve Jasa Dd07081Flipbook Steve Jasa Dd07081
Flipbook Steve Jasa Dd07081jaspang
 
Достоинства и недостатки использования единого сервиса идентификации и аутент...
Достоинства и недостатки использования единого сервиса идентификации и аутент...Достоинства и недостатки использования единого сервиса идентификации и аутент...
Достоинства и недостатки использования единого сервиса идентификации и аутент...Natasha Khramtsovsky
 
PROEXPOSURE Training courses
PROEXPOSURE Training coursesPROEXPOSURE Training courses
PROEXPOSURE Training coursesPROEXPOSURE CIC
 
Нормативная база электронного документооборота госорганов – какой она должна ...
Нормативная база электронного документооборота госорганов – какой она должна ...Нормативная база электронного документооборота госорганов – какой она должна ...
Нормативная база электронного документооборота госорганов – какой она должна ...Natasha Khramtsovsky
 
UCSF Talk -- How to Think, How to Be
UCSF Talk -- How to Think, How to BeUCSF Talk -- How to Think, How to Be
UCSF Talk -- How to Think, How to BeMarcus Banks
 
Современные идеи и опыт в области государственного управления: Межведомственн...
Современные идеи и опыт в области государственного управления: Межведомственн...Современные идеи и опыт в области государственного управления: Межведомственн...
Современные идеи и опыт в области государственного управления: Межведомственн...Natasha Khramtsovsky
 

Viewers also liked (20)

Uitburgeren via het leerhuis
Uitburgeren via het leerhuisUitburgeren via het leerhuis
Uitburgeren via het leerhuis
 
Burgerinitiatieven versterken - Emilie Van Daele
Burgerinitiatieven versterken - Emilie Van DaeleBurgerinitiatieven versterken - Emilie Van Daele
Burgerinitiatieven versterken - Emilie Van Daele
 
PROA 03/07 Обеспечение сохранности документов в базах данных
PROA 03/07 Обеспечение сохранности документов в базах данныхPROA 03/07 Обеспечение сохранности документов в базах данных
PROA 03/07 Обеспечение сохранности документов в базах данных
 
Анализ международного законодательства и правого опыта использования открытых...
Анализ международного законодательства и правого опыта использования открытых...Анализ международного законодательства и правого опыта использования открытых...
Анализ международного законодательства и правого опыта использования открытых...
 
VFG ontdooid
VFG ontdooidVFG ontdooid
VFG ontdooid
 
[SPRINTER] Elasticsearch starter-guide for Developer
[SPRINTER] Elasticsearch starter-guide for Developer[SPRINTER] Elasticsearch starter-guide for Developer
[SPRINTER] Elasticsearch starter-guide for Developer
 
Что происходило в отрасли в 2014 году: Достижения и планы на будущее
Что происходило в отрасли в 2014 году: Достижения и планы на будущееЧто происходило в отрасли в 2014 году: Достижения и планы на будущее
Что происходило в отрасли в 2014 году: Достижения и планы на будущее
 
Trias
TriasTrias
Trias
 
Практика разрешения судебных споров, связанных с персональными данными
Практика разрешения судебных споров, связанных с персональными даннымиПрактика разрешения судебных споров, связанных с персональными данными
Практика разрешения судебных споров, связанных с персональными данными
 
Proexposure injera
Proexposure  injeraProexposure  injera
Proexposure injera
 
Tooldag 'Financiële planning'
Tooldag 'Financiële planning'Tooldag 'Financiële planning'
Tooldag 'Financiële planning'
 
Flipbook Steve Jasa Dd07081
Flipbook Steve Jasa Dd07081Flipbook Steve Jasa Dd07081
Flipbook Steve Jasa Dd07081
 
Overheidsbeleid en innoverend werken - Gie Van den Eeckhaut
Overheidsbeleid en innoverend werken - Gie Van den EeckhautOverheidsbeleid en innoverend werken - Gie Van den Eeckhaut
Overheidsbeleid en innoverend werken - Gie Van den Eeckhaut
 
Ontwikkelingen van en in de socialprofitsector
Ontwikkelingen van en in de socialprofitsectorOntwikkelingen van en in de socialprofitsector
Ontwikkelingen van en in de socialprofitsector
 
Достоинства и недостатки использования единого сервиса идентификации и аутент...
Достоинства и недостатки использования единого сервиса идентификации и аутент...Достоинства и недостатки использования единого сервиса идентификации и аутент...
Достоинства и недостатки использования единого сервиса идентификации и аутент...
 
PROEXPOSURE Training courses
PROEXPOSURE Training coursesPROEXPOSURE Training courses
PROEXPOSURE Training courses
 
Нормативная база электронного документооборота госорганов – какой она должна ...
Нормативная база электронного документооборота госорганов – какой она должна ...Нормативная база электронного документооборота госорганов – какой она должна ...
Нормативная база электронного документооборота госорганов – какой она должна ...
 
UCSF Talk -- How to Think, How to Be
UCSF Talk -- How to Think, How to BeUCSF Talk -- How to Think, How to Be
UCSF Talk -- How to Think, How to Be
 
Современные идеи и опыт в области государственного управления: Межведомственн...
Современные идеи и опыт в области государственного управления: Межведомственн...Современные идеи и опыт в области государственного управления: Межведомственн...
Современные идеи и опыт в области государственного управления: Межведомственн...
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 

Similar to Introduction Apache solr 4.4

Introduction to Apache Solr5
Introduction to Apache Solr5Introduction to Apache Solr5
Introduction to Apache Solr5Phoebe Shih
 
Solr Recipes Workshop
Solr Recipes WorkshopSolr Recipes Workshop
Solr Recipes WorkshopErik Hatcher
 
Apache Solr + ajax solr
Apache Solr + ajax solrApache Solr + ajax solr
Apache Solr + ajax solrNet7
 
Past, Present, and Future of Apache Storm
Past, Present, and Future of Apache StormPast, Present, and Future of Apache Storm
Past, Present, and Future of Apache StormP. Taylor Goetz
 
Solr Powered Lucene
Solr Powered LuceneSolr Powered Lucene
Solr Powered LuceneErik Hatcher
 
Solr Application Development Tutorial
Solr Application Development TutorialSolr Application Development Tutorial
Solr Application Development TutorialErik Hatcher
 
Java-Web-Applications.pdf
Java-Web-Applications.pdfJava-Web-Applications.pdf
Java-Web-Applications.pdfssuserf2dc4c1
 
Intro To Alfresco Part 1
Intro To Alfresco Part 1Intro To Alfresco Part 1
Intro To Alfresco Part 1Jeff Potts
 
Developer’s intro to the alfresco platform
Developer’s intro to the alfresco platformDeveloper’s intro to the alfresco platform
Developer’s intro to the alfresco platformAlfresco Software
 
Bee con2016 presentation_20160125004_installing
Bee con2016 presentation_20160125004_installingBee con2016 presentation_20160125004_installing
Bee con2016 presentation_20160125004_installingAngel Borroy López
 
What Every New Developer Should Know About Alfresco (Jeff Potts)
What Every New Developer Should Know About Alfresco (Jeff Potts)What Every New Developer Should Know About Alfresco (Jeff Potts)
What Every New Developer Should Know About Alfresco (Jeff Potts)Oksana Kurysheva
 

Similar to Introduction Apache solr 4.4 (20)

Drupal7 and Apache Solr
Drupal7 and Apache SolrDrupal7 and Apache Solr
Drupal7 and Apache Solr
 
Lect06 tomcat1
Lect06 tomcat1Lect06 tomcat1
Lect06 tomcat1
 
Tomcat server
 Tomcat server Tomcat server
Tomcat server
 
Solr5
Solr5Solr5
Solr5
 
Introduction to Apache Solr5
Introduction to Apache Solr5Introduction to Apache Solr5
Introduction to Apache Solr5
 
Solr Recipes
Solr RecipesSolr Recipes
Solr Recipes
 
Solr Recipes Workshop
Solr Recipes WorkshopSolr Recipes Workshop
Solr Recipes Workshop
 
Apache solr liferay
Apache solr liferayApache solr liferay
Apache solr liferay
 
Apache Solr + ajax solr
Apache Solr + ajax solrApache Solr + ajax solr
Apache Solr + ajax solr
 
Past, Present, and Future of Apache Storm
Past, Present, and Future of Apache StormPast, Present, and Future of Apache Storm
Past, Present, and Future of Apache Storm
 
Solr Powered Lucene
Solr Powered LuceneSolr Powered Lucene
Solr Powered Lucene
 
Solr Application Development Tutorial
Solr Application Development TutorialSolr Application Development Tutorial
Solr Application Development Tutorial
 
Apache Solr
Apache SolrApache Solr
Apache Solr
 
Java-Web-Applications.pdf
Java-Web-Applications.pdfJava-Web-Applications.pdf
Java-Web-Applications.pdf
 
Solr a.b-ab
Solr a.b-abSolr a.b-ab
Solr a.b-ab
 
Intro apache
Intro apacheIntro apache
Intro apache
 
Intro To Alfresco Part 1
Intro To Alfresco Part 1Intro To Alfresco Part 1
Intro To Alfresco Part 1
 
Developer’s intro to the alfresco platform
Developer’s intro to the alfresco platformDeveloper’s intro to the alfresco platform
Developer’s intro to the alfresco platform
 
Bee con2016 presentation_20160125004_installing
Bee con2016 presentation_20160125004_installingBee con2016 presentation_20160125004_installing
Bee con2016 presentation_20160125004_installing
 
What Every New Developer Should Know About Alfresco (Jeff Potts)
What Every New Developer Should Know About Alfresco (Jeff Potts)What Every New Developer Should Know About Alfresco (Jeff Potts)
What Every New Developer Should Know About Alfresco (Jeff Potts)
 

More from Somkiat Puisungnoen (20)

Next of Java 2022
Next of Java 2022Next of Java 2022
Next of Java 2022
 
Sck spring-reactive
Sck spring-reactiveSck spring-reactive
Sck spring-reactive
 
Part 2 :: Spring Boot testing
Part 2 :: Spring Boot testingPart 2 :: Spring Boot testing
Part 2 :: Spring Boot testing
 
vTalk#1 Microservices with Spring Boot
vTalk#1 Microservices with Spring BootvTalk#1 Microservices with Spring Boot
vTalk#1 Microservices with Spring Boot
 
Lesson learned from React native and Flutter
Lesson learned from React native and FlutterLesson learned from React native and Flutter
Lesson learned from React native and Flutter
 
devops
devops devops
devops
 
Angular :: basic tuning performance
Angular :: basic tuning performanceAngular :: basic tuning performance
Angular :: basic tuning performance
 
Shared code between projects
Shared code between projectsShared code between projects
Shared code between projects
 
Distributed Tracing
Distributed Tracing Distributed Tracing
Distributed Tracing
 
Manage data of service
Manage data of serviceManage data of service
Manage data of service
 
RobotFramework Meetup at Thailand #2
RobotFramework Meetup at Thailand #2RobotFramework Meetup at Thailand #2
RobotFramework Meetup at Thailand #2
 
Visual testing
Visual testingVisual testing
Visual testing
 
Cloud Native App
Cloud Native AppCloud Native App
Cloud Native App
 
Wordpress for Newbie
Wordpress for NewbieWordpress for Newbie
Wordpress for Newbie
 
Sck Agile in Real World
Sck Agile in Real WorldSck Agile in Real World
Sck Agile in Real World
 
Clean you code
Clean you codeClean you code
Clean you code
 
SCK Firestore at CNX
SCK Firestore at CNXSCK Firestore at CNX
SCK Firestore at CNX
 
Unhappiness Developer
Unhappiness DeveloperUnhappiness Developer
Unhappiness Developer
 
The Beauty of BAD code
The Beauty of  BAD codeThe Beauty of  BAD code
The Beauty of BAD code
 
React in the right way
React in the right wayReact in the right way
React in the right way
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Recently uploaded (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Introduction Apache solr 4.4

  • 1. Introduction to Apache Solr 4.4 @somkiat
  • 2. Features • Full Text Search • Optimize for high volume web traffic • Support XML, JSON • Near Real time indexing • Admin interface • Support JMX • XML configuration • Extensible with plugin
  • 3. Download • Download Apache Solr 4.4 from http://lucene.apache.org/solr/
  • 4. Install on Apache Tomcat • Using /example/webapps/solr.war
  • 5. Create app1.xml • In %CATALINA_HOME%confCatalinalocalhost <?xml version="1.0" encoding="UTF-8"?> <Context docBase=“c:solr-4.4.0 examplewebappssolr.war" debug="0" crossContext="true" > <Environment name="solr/home" type="java.lang.String" value="c:app11" override="true" /> </Context>
  • 6. Structure of c:app1 • Copy all files and folder from
  • 8. ** Need SLF4J ** • http://www.slf4j.org • Copy all jar files from … to %CATALINA_HOME/libs
  • 12. Solr Client • http://wiki.apache.org/solr/IntegratingSolr • Java – http://wiki.apache.org/solr/Solrj
  • 14. Indexing Data String url = "http://localhost:8080/app1/collection1"; SolrServer server = new HttpSolrServer(url); SolrInputDocument doc1 = new SolrInputDocument(); doc1.addField("id", "1", 1.0f); doc1.addField("name", "doc 1", 1.0f); doc1.addField("price", 10); SolrInputDocument doc2 = new SolrInputDocument(); doc2.addField("id", "2", 1.0f); doc2.addField("name", "doc 2", 1.0f); doc2.addField("price", 100); Collection<SolrInputDocument> docs = new ArrayList<SolrInputDocument>(); docs.add(doc1); docs.add(doc2); server.add(docs); server.commit();
  • 15. Indexing Data with Bean String url = "http://localhost:8080/app1/collection1"; SolrServer server = new HttpSolrServer(url); Product product1 = new Product("1", "product 1", 100f); Product product2 = new Product("2", "product 2", 200f); List<Product> products = new ArrayList<Product>(); products.add(product1); products.add(product2); server.addBeans(products); server.commit();
  • 16. Delete Data String url = "http://localhost:8080/app1/collection1"; SolrServer server = new HttpSolrServer(url); server.deleteByQuery("*:*"); server.commit();
  • 17. Query Data String url = "http://localhost:8080/app1/collection1"; SolrServer server = new HttpSolrServer(url); SolrQuery query = new SolrQuery(); query.setQuery("*:*"); query.addSort("price", SolrQuery.ORDER.asc); QueryResponse rsp = server.query(query); SolrDocumentList docs = rsp.getResults(); for (SolrDocument solrDocument : docs) { System.out.print("ID:" + solrDocument.getFieldValue("id")); System.out.print(", Name:" + solrDocument.getFieldValue("name")); System.out.println(", Price:" + solrDocument.getFieldValue("price")); }