Apache Solr for Indexing Data

Book description

Enhance your Solr indexing experience with advanced techniques and the built-in functionalities available in Apache Solr

About This Book

  • Learn about distributed indexing and real-time optimization to change index data on fly
  • Index data from various sources and web crawlers using built-in analyzers and tokenizers
  • This step-by-step guide is packed with real-life examples on indexing data

Who This Book Is For

This book is for developers who want to increase their experience of indexing in Solr by learning about the various index handlers, analyzers, and methods available in Solr. Beginner level Solr development skills are expected.

What You Will Learn

  • Get to know the basic features of Solr indexing and the analyzers/tokenizers available
  • Index XML/JSON data in Solr using the HTTP Post tool and CURL command
  • Work with Data Import Handler to index data from a database
  • Use Apache Tika with Solr to index word documents, PDFs, and much more
  • Utilize Apache Nutch and Solr integration to index crawled data from web pages
  • Update indexes in real-time data feeds
  • Discover techniques to index multi-language and distributed data in Solr
  • Combine the various indexing techniques into a real-life working example of an online shopping web application

In Detail

Apache Solr is a widely used, open source enterprise search server that delivers powerful indexing and searching features. These features help fetch relevant information from various sources and documentation. Solr also combines with other open source tools such as Apache Tika and Apache Nutch to provide more powerful features.

This fast-paced guide starts by helping you set up Solr and get acquainted with its basic building blocks, to give you a better understanding of Solr indexing. You'll quickly move on to indexing text and boosting the indexing time. Next, you'll focus on basic indexing techniques, various index handlers designed to modify documents, and indexing a structured data source through Data Import Handler.

Moving on, you will learn techniques to perform real-time indexing and atomic updates, as well as more advanced indexing techniques such as de-duplication. Later on, we'll help you set up a cluster of Solr servers that combine fault tolerance and high availability. You will also gain insights into working scenarios of different aspects of Solr and how to use Solr with e-commerce data.

By the end of the book, you will be competent and confident working with indexing and will have a good knowledge base to efficiently program elements.

Style and approach

This fast-paced guide is packed with examples that are written in an easy-to-follow style, and are accompanied by detailed explanation. Working examples are included to help you get better results for your applications.

Table of contents

  1. Apache Solr for Indexing Data
    1. Table of Contents
    2. Apache Solr for Indexing Data
    3. Credits
    4. About the Authors
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Getting Started
      1. Overview and installation of Solr
        1. Installing Solr in OS X (Mac)
      2. Running Solr
        1. Installing Solr in Windows
        2. Installing Solr on Linux
      3. The Solr architecture and directory structure
        1. Solr directory structure
      4. Cores in Solr (Multicore Solr)
      5. Summary
    9. 2. Understanding Analyzers, Tokenizers, and Filters
      1. Introducing analyzers
        1. Analysis phases
      2. Tokenizers
        1. Standard tokenizer
        2. Keyword tokenizer
        3. Lowercase tokenizer
        4. N-gram tokenizer
      3. Filters
        1. Lowercase filter
        2. Synonym filter
        3. Porter stem filter
      4. Running your analyzer
      5. Summary
    10. 3. Indexing Data
      1. Indexing data in Solr
        1. Introducing field types
        2. Defining fields
        3. Defining an unique key
        4. Copy fields and dynamic fields
      2. Building our musicCatalogue example
        1. Using the Solr Admin UI
      3. Facet searching
      4. Summary
    11. 4. Indexing Data – The Basic Technique and Using Index Handlers
      1. Inserting data into Solr
        1. Configuring UpdateRequestHandler
      2. Indexing documents using XML
        1. Adding and updating documents
        2. Deleting a document
      3. Indexing documents using JSON
        1. Adding a single document
        2. Adding multiple JSON documents
        3. Sequential JSON update commands
      4. Indexing updates using CSV
      5. Summary
    12. 5. Indexing Data with the Help of Structured Datasources – Using DIH
      1. Indexing data from MySQL
        1. Configuring datasource
        2. DIH commands
      2. Indexing data using XPath
      3. Summary
    13. 6. Indexing Data Using Apache Tika
      1. Introducing Apache Tika
      2. Configuring Apache Tika in Solr
      3. Indexing PDF and Word documents
      4. Summary
    14. 7. Apache Nutch
      1. Introducing Apache Nutch
      2. Installing Apache Nutch
      3. Configuring Solr with Nutch
      4. Summary
    15. 8. Commits, Real-Time Index Optimizations, and Atomic Updates
      1. Understanding soft commit, optimize, and hard commit
      2. Using atomic updates in Solr
      3. Using RealTime Get
      4. Summary
    16. 9. Advanced Topics – Multilanguage, Deduplication, and Others
      1. Multilanguage indexing
      2. Removing duplicate documents (deduplication)
      3. Content streaming
      4. UIMA integration with Solr
      5. Summary
    17. 10. Distributed Indexing
      1. Setting up SolrCloud
        1. The collections API
        2. Updating configuration files
      2. Distributed indexing and searching
      3. Summary
    18. 11. Case Study of Using Solr in E-Commerce
      1. Creating an AutoSuggest feature
      2. Facet navigation
      3. Search filtering and sorting
      4. Relevancy boosting
      5. Summary
    19. Index

Product information

  • Title: Apache Solr for Indexing Data
  • Author(s): Sachin Handiekar, Anshul Johri
  • Release date: December 2015
  • Publisher(s): Packt Publishing
  • ISBN: 9781783553235