Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Working with Solr
Prashant More.
more.p.prashant@gmail.com
Mumbai.
1
Today’s Talk
About Solr
Background and overview.
Installing and bringing up Solr.
Configuring Solr.
Playing with queries.
...
What is Solr?
A web application for text search.
A full text search server based on Lucene.
A wrapper around apache Lucene...
What is Lucene?
● High performance, scalable, full-text search library.
● Focuses on Indexing + Searching Documents.
○ Doc...
Why Solr?
● Robust.
● Reliable.
● Fast.
● Supported. (window, linux, mac)
● Most important: Open Source.
5
Solr’s Data model
● Solr maintains collection of documents
● A document is collection of fields and values.
● A field can ...
7
Working of Solr
Indexing Data
8
9
Adding Documents
HTTP POST to http://localhost:8983/solr/update
<add>
<doc>
<field name=”id”>1</field>
<field name=”name...
Deleting by id is most efficient.
<delete>
<id>420</id>
</delete>
Deleting by query.
<delete>
<query>gender:male</query>
<...
http://localhost:8983/solr/select/?q=id%3A1
<doc>
<str name="description">Now you are talking</str>
<str name="id">2</str>...
●prashant
●name:prashant
●name:prashant NOT description:more
●id:[* TO *]
●id:[3 TO 45]
Solr query syntax
12
Data Import handler URL : -
http://localhost:8983/solr/admin/dataimport.jsp
Import Data to Solr
13
14
Thank you for your
interest !
15
Upcoming SlideShare
Loading in …5
×

Solr tech talk

85 views

Published on

A technical talk on Solr Server with few examples.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Solr tech talk

  1. 1. Working with Solr Prashant More. more.p.prashant@gmail.com Mumbai. 1
  2. 2. Today’s Talk About Solr Background and overview. Installing and bringing up Solr. Configuring Solr. Playing with queries. A live demo of Solr. 2
  3. 3. What is Solr? A web application for text search. A full text search server based on Lucene. A wrapper around apache Lucene. XML/HTML, JSON Interfaces. 3
  4. 4. What is Lucene? ● High performance, scalable, full-text search library. ● Focuses on Indexing + Searching Documents. ○ Document is just a list of name and value pairs. ● 100% Java, no dependencies, no configuration files. 4
  5. 5. Why Solr? ● Robust. ● Reliable. ● Fast. ● Supported. (window, linux, mac) ● Most important: Open Source. 5
  6. 6. Solr’s Data model ● Solr maintains collection of documents ● A document is collection of fields and values. ● A field can occur multiple time in a document. ● These documents can be deleted and new versions of documents can be added, hence it is immutable. 6
  7. 7. 7 Working of Solr
  8. 8. Indexing Data 8
  9. 9. 9 Adding Documents HTTP POST to http://localhost:8983/solr/update <add> <doc> <field name=”id”>1</field> <field name=”name”>kiran</field> <field name=”gender”>male</field> </doc> </add>
  10. 10. Deleting by id is most efficient. <delete> <id>420</id> </delete> Deleting by query. <delete> <query>gender:male</query> </delete> Deleting Documents 10
  11. 11. http://localhost:8983/solr/select/?q=id%3A1 <doc> <str name="description">Now you are talking</str> <str name="id">2</str> <str name="name">Vic 20</str> <float name="price">14.99</float> </doc> <doc> <str name="description">One for the rubber </str> <str name="id">3</str> <str name="name">wifi</str> <float name="price">49.99</float> </doc> Searching 11
  12. 12. ●prashant ●name:prashant ●name:prashant NOT description:more ●id:[* TO *] ●id:[3 TO 45] Solr query syntax 12
  13. 13. Data Import handler URL : - http://localhost:8983/solr/admin/dataimport.jsp Import Data to Solr 13
  14. 14. 14 Thank you for your interest !
  15. 15. 15

×