Elasticsearch Blueprints
eBook - ePub

Elasticsearch Blueprints

Vineeth Mohan

Share book
  1. 192 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Elasticsearch Blueprints

Vineeth Mohan

Book details
Book preview
Table of contents
Citations

About This Book

If you are a data enthusiast and would like to explore and specialize on search technologies based on Elasticsearch, this is the right book for you. A compelling case-to-case mapping of features and implementation of Elasticsearch to solve many real-world use cases makes this book the right choice to start and specialize on Elasticsearch.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Elasticsearch Blueprints an online PDF/ePUB?
Yes, you can access Elasticsearch Blueprints by Vineeth Mohan in PDF and/or ePUB format, as well as other popular books in Computer Science & Web Development. We have over one million books available in our catalogue for you to explore.

Information

Year
2015
ISBN
9781783984923
Edition
1

Elasticsearch Blueprints


Table of Contents

Elasticsearch Blueprints
Credits
About the Author
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Google-like Web Search
Deploying Elasticsearch
Communicating with the Elasticsearch server
Shards and replicas
Index-type mapping
Setting the analyzer
Types of character filters
Types of tokenizers
Types of token filters
Creating your own analyzer
Readymade analyzers
Using phrase query to search
Using the highlighting feature
Pagination
The head UI explained
Summary
2. Building Your Own E-Commerce Solution
Data modeling in Elasticsearch
Choosing between a query and a filter
Searching your documents
A match query
Multifield match query
Aggregating your results
Terms aggregation
Filter your results based on a date range
Implementing a prize range filter
Implementing a category filter
Implementation of filters in Elasticsearch
Searching with multiple conditions
Sorting results
Using the scroll API for consistent pagination
Autocomplete in Elasticsearch
How does FST help in faster autocompletes?
Hotel suggester using autocomplete
Summary
3. Relevancy and Scoring
How scoring works
How to debug scoring
The Ebola outbreak
Boost match in the title field column over description
Most recently published medical journals
The most recent Ebola report on healthy patients
Boosting certain symptoms over others
Random ordering of medical journals for different interns
Medical journals from the closest place to the Ebola outbreak
Medical journals from unhealthy places near the Ebola outbreak
Healthy people from unhealthy locations have Ebola symptoms
Relevancy based on the order in which the symptoms appeared
Summary
4. Managing Relational Content
The product-with-tags search problem
Nested types to the rescue
Limitations on a query on nested fields
Using a parent-child approach
The has_parent filter/the has_parent query
The has_child query/the has_child filter
The top_children query
Schema design to store questions and answers
Searching questions based on a criteria of answers
Searching answers based on a criteria of questions
The score of questions based on the score of each answer
Filtering questions with more than four answers
Displaying the best questions and their accepted answers
Summary
5. Analytics Using Elasticsearch
A flight ticket analytics scenario
Index creation and mapping
A case study on analytics requirements
Male and female distribution of passengers
Time-based patterns or trends in booking tickets
Hottest arrival and departure points
The correlation of ticket type with time
Distribution of the travel duration
The most preferred or hottest hour for booking tickets
The most preferred or hottest weekday for travel
The pattern between a passenger's purpose of visit, ticket type, and their sex
Summary
6. Improving the Search Experience
News search
A case-insensitive search
Effective e-mail or URL link search inside text
Prioritizing a title match over content match
Terms aggregation giving weird results
Setting the field as not_analyzed
Using a lowercased analyzer
Improving the search experience using stemming
A synonym-aware search
The holy box of search
The field search
The number/date range search
The phrase search
The wildcard search
The regexp search
Boolean operations
Words with similar sounds
Substring matching
Summary
7. Spicing Up a Search Using Geo
Restaurant search
Data modeling for restaurants
The nearest hotel problem
The maximum distance covered
Inside the city limits
Distance values between the current point and each restaurant
Restaurants out of city limits
Restaurant categorization based on distance
Aggregating restaurants based on their nearness
Summary
8. Handling Time-based Data
Overriding default mapping and settings in Elasticsearch
Index template creation
Deleting a template
The GET template
Multiple matching of templates
Overriding default settings for all indices
Overriding mapping of all types under an index
Overriding default field settings
Searching for time-based data
Archiving time-based data
Shard filtering
Running the optimized API on indices where writing is done
Closing older indices
Snapshot creation and restoration of indices
Repository creation
Snapshot creation
Snapshot creation on specific indices
Restoring a snapshot
Restoring multiple indices
The curator
Shard allocation using curator
Opening and closing of indices
Optimization
Summary
Index

Elasticsearch Blueprints

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: July 2015
Production reference: 1200715
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78398-492-3
www.packtpub.com

Credits

Author
Vineeth Mohan
Reviewers
Kartik Bhatnagar
Tomislav Poljak
Acquisition Editor
Harsha Bharwani
Content Development Editor
Ajinkya Paranjape
Technical Editor
Mrunmayee Patil
Copy Editor
Neha Vyas
Project Coordinator
Harshal Ved
Proofreader
Safis Editing
Indexer
Mariammal Chettiyar
Production Coordinator
Nilesh R. Mohite
Cover Work
Nilesh R. Mohite

About the Author

Vineeth Mohan is an architect and developer. He currently works as the CTO at Factweavers Technologies and is also an Elasticsearch-certified trainer.
He loves to spend time studying emerging technologies and application...

Table of contents