Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Solr Cookbook - Third Edition
Solr Cookbook - Third Edition

Solr Cookbook - Third Edition: Solve real-time problems related to Apache Solr 4.x and 5.0 effectively with the help of over 100 easy-to-follow recipes , Third Edition

eBook
€28.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Solr Cookbook - Third Edition

Chapter 2. Indexing Your Data

In this chapter, we will cover the following topics:

  • Indexing PDF files
  • Counting the number of fields
  • Using parsing update processors to parse data
  • Using scripting update processors to modify documents
  • Indexing data from a database using Data Import Handler
  • Incremental imports with DIH
  • Transforming data when using DIH
  • Indexing multiple geographical points
  • Updating document fields
  • Detecting the document language during indexation
  • Optimizing the primary key indexation
  • Handling multiple currencies

Introduction

Indexing data is one of the most crucial things in Lucene and Solr deployment. When your data is not indexed properly, your search results will be poor. When the search results are poor, it's almost certain the users will not be satisfied with the application that uses Solr. This is why we need our data to be prepared and indexed as timely and correctly as possible.

On the other hand, preparing data is not an easy task. Nowadays, we have more and more data floating around. We need to index multiple formats of data from multiple sources. Do we need to parse the data manually and prepare the data in XML format? The answer is no; we can let Solr do this for us. This chapter will concentrate on the indexing process and data preparation, starting with how to index data that is a binary PDF file to how to use Data Import Handler to fetch data from database and index it with Apache Solr and describing how we can detect the document language during indexation. We will also learn...

Indexing PDF files

The library on the corner, we used to go to, wants to expand its collection and become available for the wider public through the World Wide Web. It asked its book suppliers to provide sample chapters of all the books in PDF format so that they can share it with online users. With all the samples provided by the supplier comes a problem—how to extract data for the search box from more than 900,000 PDF files. Solr can do it with the use of Apache Tika (http://tika.apache.org/). This recipe will show you how to handle such a task.

How to do it...

To index PDF files, we will need to set up Solr to use extracting request handlers. To do this, we will take the following steps:

  1. First, let's edit our Solr instance, solrconfig.xml, and add the following configuration:
    <requestHandler name="/update/extract" class="solr.extraction.ExtractingRequestHandler">
     <lst name="defaults">
      <str name="fmap.content">text&lt...

Counting the number of fields

Imagine a situation where we have a simple document to be indexed to Solr with titles and tags. What we will want to do is separate the premium documents that have more tag values because they are better in terms of our business. Of course, we can count the number of tags ourselves, but why not let Solr do this? This recipe will show you how to do this with Solr.

How to do it...

Let's look at the steps we need to take to count the number of field values.

  1. We start with the index structure. What we need to do is put the following section in the schema.xml file:
    <field name="id" type="string" indexed="true" stored="true" required="true" />
    <field name="title" type="text_general" indexed="true" stored="true"/>
    <field name="tags" type="string" indexed="true" stored="true" multiValued="true"/>
    <field name...

Using parsing update processors to parse data

Let's assume that we are running a bookstore, we want to sort our books by the publication date, and run faceting on the number of likes each book gets. However, we get all our data in XML, and we don't have data in the proper format, and so on. The good thing is that we can tell Solr to parse our data property so that we don't have to change what we already have. This recipe will show you how to do this.

Getting ready

Before continuing with this recipe, I suggest reading the Counting the number of fields recipe of this chapter to get used to updating the request processor configuration.

How to do it...

Let's look at the steps we need to take to make data parsing work.

  1. First, we need to prepare our index structure, so we add the following section to the schema.xml file:
    <field name="id" type="string" indexed="true" stored="true" required="true" />
    <field name="title...

Using scripting update processors to modify documents

Sometimes, we need to modify documents during indexing, and we don't want to do this on the indexing application side. For example, we have documents describing the Internet sites. What we want to be able to do is filter the sites on the basis of the protocol used, for example, http or https. We don't have this information; we only have the whole URL address. Let's see how we can achieve this with Solr.

Getting ready

Before continuing with the following recipe, I suggest reading the Counting the number of fields recipe of this chapter to get used to updating request processor configuration.

How to do it...

The following steps will take you through the process of achieving our goal:

  1. First, we start with the index structure, putting the following section in the schema.xml file:
    <field name="id" type="string" indexed="true" stored="true" required="true" />
    <field name=...

Indexing data from a database using Data Import Handler

One of our clients has a problem. His database of users grows to such a size that even a simple SQL select takes too much time, and he seeks how to improve the search times. Of course, he has heard about Solr, but he doesn't want to generate XML or any other data format and push it to Solr; he would like the data to be fetched. What can we do about it? Well, there is one thing—we can use one of the contribute modules of Solr, which is the Data Import Handler. This task will show you how to configure the basic setup of the Data Import Handler and how to use it.

How to do it...

Let's assume that we have a database table. To select users from our table, we use the following SQL query:

SELECT user_id, user_name FROM users

The response might look like this:

| user_id | user_name     |
| 1       | John Kowalski |
| 2       | Amanda Looks  |

We also have a second table called users_description, where we store the descriptions of...

Introduction


Indexing data is one of the most crucial things in Lucene and Solr deployment. When your data is not indexed properly, your search results will be poor. When the search results are poor, it's almost certain the users will not be satisfied with the application that uses Solr. This is why we need our data to be prepared and indexed as timely and correctly as possible.

On the other hand, preparing data is not an easy task. Nowadays, we have more and more data floating around. We need to index multiple formats of data from multiple sources. Do we need to parse the data manually and prepare the data in XML format? The answer is no; we can let Solr do this for us. This chapter will concentrate on the indexing process and data preparation, starting with how to index data that is a binary PDF file to how to use Data Import Handler to fetch data from database and index it with Apache Solr and describing how we can detect the document language during indexation. We will also learn how...

Indexing PDF files


The library on the corner, we used to go to, wants to expand its collection and become available for the wider public through the World Wide Web. It asked its book suppliers to provide sample chapters of all the books in PDF format so that they can share it with online users. With all the samples provided by the supplier comes a problem—how to extract data for the search box from more than 900,000 PDF files. Solr can do it with the use of Apache Tika (http://tika.apache.org/). This recipe will show you how to handle such a task.

How to do it...

To index PDF files, we will need to set up Solr to use extracting request handlers. To do this, we will take the following steps:

  1. First, let's edit our Solr instance, solrconfig.xml, and add the following configuration:

    <requestHandler name="/update/extract" class="solr.extraction.ExtractingRequestHandler">
     <lst name="defaults">
      <str name="fmap.content">text</str>
      <str name="lowernames">true</str...

Counting the number of fields


Imagine a situation where we have a simple document to be indexed to Solr with titles and tags. What we will want to do is separate the premium documents that have more tag values because they are better in terms of our business. Of course, we can count the number of tags ourselves, but why not let Solr do this? This recipe will show you how to do this with Solr.

How to do it...

Let's look at the steps we need to take to count the number of field values.

  1. We start with the index structure. What we need to do is put the following section in the schema.xml file:

    <field name="id" type="string" indexed="true" stored="true" required="true" />
    <field name="title" type="text_general" indexed="true" stored="true"/>
    <field name="tags" type="string" indexed="true" stored="true" multiValued="true"/>
    <field name="tags_count" type="int" indexed="true" stored="true"/>
  2. The next thing is our test data, which looks as follows:

    <add>
     <doc>
      &lt...

Using parsing update processors to parse data


Let's assume that we are running a bookstore, we want to sort our books by the publication date, and run faceting on the number of likes each book gets. However, we get all our data in XML, and we don't have data in the proper format, and so on. The good thing is that we can tell Solr to parse our data property so that we don't have to change what we already have. This recipe will show you how to do this.

Getting ready

Before continuing with this recipe, I suggest reading the Counting the number of fields recipe of this chapter to get used to updating the request processor configuration.

How to do it...

Let's look at the steps we need to take to make data parsing work.

  1. First, we need to prepare our index structure, so we add the following section to the schema.xml file:

    <field name="id" type="string" indexed="true" stored="true" required="true" />
    <field name="title" type="text_general" indexed="true" stored="true" />
    <field name="published...

Using scripting update processors to modify documents


Sometimes, we need to modify documents during indexing, and we don't want to do this on the indexing application side. For example, we have documents describing the Internet sites. What we want to be able to do is filter the sites on the basis of the protocol used, for example, http or https. We don't have this information; we only have the whole URL address. Let's see how we can achieve this with Solr.

Getting ready

Before continuing with the following recipe, I suggest reading the Counting the number of fields recipe of this chapter to get used to updating request processor configuration.

How to do it...

The following steps will take you through the process of achieving our goal:

  1. First, we start with the index structure, putting the following section in the schema.xml file:

    <field name="id" type="string" indexed="true" stored="true" required="true" />
    <field name="url" type="text_general" indexed="true" stored="true"/>
    <field...

Indexing data from a database using Data Import Handler


One of our clients has a problem. His database of users grows to such a size that even a simple SQL select takes too much time, and he seeks how to improve the search times. Of course, he has heard about Solr, but he doesn't want to generate XML or any other data format and push it to Solr; he would like the data to be fetched. What can we do about it? Well, there is one thing—we can use one of the contribute modules of Solr, which is the Data Import Handler. This task will show you how to configure the basic setup of the Data Import Handler and how to use it.

How to do it...

Let's assume that we have a database table. To select users from our table, we use the following SQL query:

SELECT user_id, user_name FROM users

The response might look like this:

| user_id | user_name     |
| 1       | John Kowalski |
| 2       | Amanda Looks  |

We also have a second table called users_description, where we store the descriptions of users. The SQL query...

Incremental imports with DIH


In most use cases, indexing the data from scratch during every indexation doesn't make sense. Why index your 1,00,000 documents when only 1,000 were modified or added? This is where the Solr Data Import Handler delta queries come in handy. Using them, we can index our data incrementally. This recipe will show you how to set up the Data Import Handler to use delta queries and index data in an incremental way.

Getting ready

Refer to the Indexing data from a database using Data Import Handler recipe in this chapter to get to know the basics of the Data Import Handler configuration. I assume that Solr is set up according to the description given in the mentioned recipe.

How to do it...

We will reuse parts of the configuration shown in the Indexing data from a database using Data Import Handler recipe in this chapter, and we will modify it. Execute the following steps:

  1. The first thing you should do is add an additional column to the tables you use, a column that will specify...

Left arrow icon Right arrow icon

Description

This book is for intermediate Solr Developers who are willing to learn and implement Pro-level practices, techniques, and solutions. This edition will specifically appeal to developers who wish to quickly get to grips with the changes and new features of Apache Solr 5.

What you will learn

  • Acquire the skills needed to index your data in different formats, forms, and sources
  • Overcome common problems while analyzing your data
  • Use the faceting mechanism to get aggregated information about your data
  • Improve your Solr instance and Solr cluster performance
  • Get to know how to configure and use SolrCloud
  • Make use of the highlighting and document grouping functionalities
  • Diagnose and resolve problems with Solr instances and clusters
  • Implement different autocomplete functionalities
Estimated delivery fee Deliver to Ireland

Premium delivery 7 - 10 business days

€23.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jan 23, 2015
Length: 356 pages
Edition : 3rd
Language : English
ISBN-13 : 9781783553150
Vendor :
Apache
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Ireland

Premium delivery 7 - 10 business days

€23.95
(Includes tracking information)

Product Details

Publication date : Jan 23, 2015
Length: 356 pages
Edition : 3rd
Language : English
ISBN-13 : 9781783553150
Vendor :
Apache
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 113.97
Solr Cookbook - Third Edition
€41.99
Apache Solr Search Patterns
€41.99
Apache Solr for Indexing Data
€29.99
Total 113.97 Stars icon

Table of Contents

11 Chapters
1. Apache Solr Configuration Chevron down icon Chevron up icon
2. Indexing Your Data Chevron down icon Chevron up icon
3. Analyzing Your Text Data Chevron down icon Chevron up icon
4. Querying Solr Chevron down icon Chevron up icon
5. Faceting Chevron down icon Chevron up icon
6. Improving Solr Performance Chevron down icon Chevron up icon
7. In the Cloud Chevron down icon Chevron up icon
8. Using Additional Functionalities Chevron down icon Chevron up icon
9. Dealing with Problems Chevron down icon Chevron up icon
10. Real-life Situations Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.8
(6 Ratings)
5 star 16.7%
4 star 50%
3 star 33.3%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Markus Klose Mar 11, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This question is answered by Rafal Kuc in the current version of his Apache Solr cookbook.In "Solr Cookbook Third Edition" he describes typical problems, use cases and their solutions.The book is written for developers who already have background knowledge on Apache Solr.The structure of the book and its chapters provides a fast and efficient way of reading. You can either read the book from the beginning to the end or select a specific chapter without encountering any trouble. There are only a few dependencies between a few chapters. If there are any, the author explicitly points them out.The book is divided into ten chapters and covers important topics such as "Solr configuration", "performance optimization" or "SolrCloud".Each of these chapters describe several issues and how to deal with them. The structure of such an issue is uniform throughout the book and makes it easy getting along. The initial description of the problem or the scenario is followed by the step by step solution with Apache Solr. The author does not stop here, but continues with a detailed and sophisticated description of the background.In the description of the problem the author uses simple sample data and describes the solution based on it. This allows quite a simple recreation of the problem and also an understanding of the solution.The problems and solutions collected in this book range from simple configurations to more complex scenarios that are encountered again and again when building web applications with Apache Solr. The recently released version of Solr 5.0 is taken into account within the third edition of this book.Many of the described use cases are found in one form or another already answered in forums or mailing lists. But for me, and I consider myself an experienced Apache Solr user, there was a lot to discover. I saw some new and interesting approaches in this book, which I will try in my next projects.The book is a fine collection of everyday problems and saves you the hassle of searching for a solution in the world wide web.Conclusion: This book is not an introduction to the Apache Solr and therefore it is not suitable for beginners. However it is a great reference book, which offers practical solutions to everyday problems with Apache Solr.I recommend this book to everyone who deals with Apache Solr to read this book as a supplement to the relevant documentation of Apache Solr.
Amazon Verified review Amazon
Recendo Jun 18, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Eine stark lösungs-orientierte und angenehme Systematik zieht sich durch das ganze Buch: (1) Aufgabe - (2) Umgesetzte Lösung als Code-Fragment - (3) Erklärung der Lösung. Wer im Inhalt(s-Verzeichnis) das findet, was er sucht, wird gut bedient.Die Lösungen beziehen sich auf die 4er- Solr Versionen. Die derzeit aktuelle Version Solr 5 ist, nach Aussage des Autors, immerhin als Beta-Version für Kompatibilitäts-Tests berücksichtigt worden, auf zusätzliche Version-5 Features geht er jedoch nicht ein.Der Inhalt des Buchs wendet sich hauptsächlich an Admins oder Dev-Ops, weniger an Data-Scientists. Bspw. wird das Thema Solr-Cloud gut abgedeckt, das Thema Daten-Clustering hingegen wird nicht berührt.Rein inhaltlich bewertend, möchte ich dem Buch 'vier bis fünf' Sterne geben.Jedoch! Der vollständige Copy-Schutz des Buchs behindert ein leichtes und fehlerfreies Arbeiten mit der elektronischen Version dieses Buchs. Ständig war ich versucht, die (teilweise über zwei Seiten gehenden) Code-Fragmente zu kopieren, und direkt in die eigene Solr-Konfiguration zu übertragen. Geht nicht. Punkt. Und da auch der separate Download des Codes (von der Verlags-Site), nicht "1 zu 1" der Buch-Vorlage entspricht, wird ein schnelles und fehlerbefreites Arbeiten erfolgreich behindert.Hätte ja Verständnis, wenn allein der begleitende Buch-Text geschützt wäre. Das kann aber kaum für Code-Fragmente in einem IT-Arbeits-Buch gelten ... dass einem, als ein bezahlender Leser, derartige Erschwernisse in den Weg gelegt werden, ist schlicht grotesk. So er sich nicht zu nicht-legalen Methoden der DRM-Entfernung oder Umwegen verführen lassen möchte -> wird der Leser faktisch gezwungen, eine Technik des 19. Jahrhunderts ( das manuelle Abschreiben ) - in einer Arbeitsumgebung des 21 Jahrhunderts ( Copy & Paste ) - zu verwenden. IMHO, das macht nicht-glücklich, überhaupt nicht!Eigentlich sollte man durch die Vergabe nur eines einzelnen Bewertung-Sterns ein deutlicheres Zeichen gegen diese (meines Erachtens) käufer-missachtende Form der Durchsetzung des Kopierschutzes setzen. Allerdings, es war meine Entscheidung, die Kindle-Version zu kaufen. Und damit zugleich auch modernere Erwartungen und Maßstäbe, als an ein Produkt des 16. Jahrhunderts, zu stellen. Deswegen, der Fairness und Achtung gegenüber Werk und Autor wegen, und auch der Hoffnung halber, dass andere Rezendenten ebenfalls deutliche Worte gegenüber derart problematischen Formen der Durchsetzung des DRM einbringen werden, ziehe ich der gekauften Kindle-Version, lediglich 0,5 Sterne ab.
Amazon Verified review Amazon
NOTiFY Apr 06, 2016
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Bought it prior to going on the Sematext Core Solr – 2 Day Workshop in London (April 2016) which the author Rafal Kuc is the trainer.I like the "Cookbook" format as it allows you to go directly to the problem/issue you're attempting to solve/implement. The book got me started with Solr and had my database imported, indexed and was searching it within a few hours. Found it very to useful to have (skim) read it prior to course.I recommend the book and the attending the Sematext Core Solr workshop.
Amazon Verified review Amazon
Dale Brooks Aug 02, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
very pleased with the additional details and practical experience points that I found in this book, above and beyond the standard Apache documentation
Amazon Verified review Amazon
DJ Apr 26, 2015
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
I am a big fan of the "cookbook" format, and have several "cookbooks" on other technologies, that I refer to often. The format is a little different then the other cookbooks I am used to, instead of a the "problem", "solution", "discussion", and "see also" format; this has a longer "scenario" which isn't as clear and concise as an ORA cookbook, a "getting ready" which often sends you out to read other material, then a "how to do it", "How it works", and then a "see also". The problems/scenarios are not as clear as other cookbooks.As with most cookbooks this is not really a book you would read cover to cover but flip through as you encounter issues. But since I planned to review the book, I started from the beginning, and was turned off initially. The problems seemed to be more one off niche types of problems, I almost stopped reading. However, as I flipped deeper into the book and found better content that was more relevant to what I need using Solr. In some places the content seemed to be kind of forced into a cookbook format, such as a "recipe" called "Understanding and using the Lucene query language"So while there was some good content in the book, don't let the beginning of the book deter you, it did not match the expectations I would have for a "cookbook". Make sure you read the table of contents before purchasing, and if you can look at some of the recipes in the later portion of the book. There are definitely some good examples that could save you some time, and some examples to get you familiar with patterns in using Solr.Disclosure: I was provided a free version of the book for review.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the digital copy I get with my Print order? Chevron down icon Chevron up icon

When you buy any Print edition of our Books, you can redeem (for free) the eBook edition of the Print Book you’ve purchased. This gives you instant access to your book when you make an order via PDF, EPUB or our online Reader experience.

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela