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
Arrow up icon
GO TO TOP
Scaling Apache Solr

You're reading from   Scaling Apache Solr Optimize your searches using high-performance enterprise search repositories with Apache Solr

Arrow left icon
Product type Paperback
Published in Jul 2014
Publisher
ISBN-13 9781783981748
Length 298 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Hrishikesh Vijay Karambelkar Hrishikesh Vijay Karambelkar
Author Profile Icon Hrishikesh Vijay Karambelkar
Hrishikesh Vijay Karambelkar
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Understanding Apache Solr FREE CHAPTER 2. Getting Started with Apache Solr 3. Analyzing Data with Apache Solr 4. Designing Enterprise Search 5. Integrating Apache Solr 6. Distributed Search Using Apache Solr 7. Scaling Solr through Sharding, Fault Tolerance, and Integration 8. Scaling Solr through High Performance 9. Solr and Cloud Computing 10. Scaling Solr Capabilities with Big Data A. Sample Configuration for Apache Solr Index

Speeding Solr through Solr caching


Many times, the queries that are run on search are repetitive in nature. In such cases, the presence of a cache brings down the average response time for search results. Apache Solr provides a caching mechanism on top of the index data. This cache, unlike a normal cache, does not carry any expiry (persistent cache). It is associated with IndexWriter. The following are the three different types of cache supported by Solr:

  • LRUCache: This is Least Recently Used (based on synchronized LinkedHashMap) (default)

  • FastLRUCache: This is a newer form of cache and is expected to be faster than all the others

  • LFUCache: This is Least Frequently Used (based on ConcurrentHashMap)

The following are the common parameters for the cache in solrconfig.xml:

Parameter

Description

class

You can specify the type of cache you wish to attach, that is, LRUCache, FastLRUCache, or LFUCache.

size

This is the maximum size a cache can reach.

initialSize

This is the initial...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image