Need advice about which tool to choose?Ask the StackShare community!

Lucene

170
229
+ 1
2
Redis

59.1K
44.4K
+ 1
3.9K
Add tool

Lucene vs Redis: What are the differences?

Key Differences between Lucene and Redis

Lucene and Redis are both popular technology solutions used in different scenarios. While Lucene is an open-source search library, Redis is an open-source in-memory data structure store. Their key differences can be summarized as follows:

  1. Data Storage and Retrieval: Lucene is primarily used for information retrieval from indexed text, allowing for efficient searching and ranking of documents. On the other hand, Redis is designed for general-purpose data storage and retrieval, supporting various data structures like strings, lists, sets, hashes, and more.

  2. Scalability and Performance: Lucene is built for handling large amounts of indexed text data and provides efficient search capabilities. It is well-suited for handling massive amounts of text-based data and searching within it. Redis, on the other hand, focuses on providing in-memory data storage and retrieval, offering exceptional performance for highly responsive applications with a lower volume of data.

  3. Data Persistence: Lucene does not provide built-in mechanisms for data persistence, as its primary focus is on searching and indexing. Data needs to be stored separately, such as in file systems or databases, and then used with Lucene for indexing and searching. Redis, on the other hand, provides data persistence options like snapshotting and replication, allowing data to be stored persistently and accessed even after system restarts or failures.

  4. Support for Transactions and Concurrency: Redis provides support for transactions, allowing atomic execution of multiple commands, and also supports concurrent access to data. It provides mechanisms like optimistic locking to handle concurrent modifications. Lucene, on the other hand, does not provide built-in support for transactions or concurrent modifications, as it is primarily focused on searching and indexing.

  5. Indexing and Querying Capabilities: Lucene offers powerful indexing and querying capabilities specifically designed for text-based data. It supports features like full-text search, ranking, field-level and fuzzy searching, and more. Redis, on the other hand, does not offer advanced indexing and querying capabilities out of the box. While it supports basic querying, it is not optimized for complex search scenarios.

  6. Data Structure Support: Lucene focuses on text-based data, offering various analyzers and filters for processing and indexing textual content. Redis, on the other hand, is a versatile data structure store, supporting a wide range of data types including strings, lists, sets, sorted sets, hashes, and more. It provides specific data manipulation operations for each data type for efficient storage and retrieval.

In summary, Lucene is well-suited for applications that require powerful full-text search capabilities and efficient indexing of text-based data. Redis, on the other hand, is a versatile in-memory data structure store that excels in providing fast response times and high performance for general-purpose data storage and retrieval.

Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Lucene
Pros of Redis
  • 1
    Fast
  • 1
    Small
  • 886
    Performance
  • 542
    Super fast
  • 513
    Ease of use
  • 444
    In-memory cache
  • 324
    Advanced key-value cache
  • 194
    Open source
  • 182
    Easy to deploy
  • 164
    Stable
  • 155
    Free
  • 121
    Fast
  • 42
    High-Performance
  • 40
    High Availability
  • 35
    Data Structures
  • 32
    Very Scalable
  • 24
    Replication
  • 22
    Great community
  • 22
    Pub/Sub
  • 19
    "NoSQL" key-value data store
  • 16
    Hashes
  • 13
    Sets
  • 11
    Sorted Sets
  • 10
    NoSQL
  • 10
    Lists
  • 9
    Async replication
  • 9
    BSD licensed
  • 8
    Bitmaps
  • 8
    Integrates super easy with Sidekiq for Rails background
  • 7
    Keys with a limited time-to-live
  • 7
    Open Source
  • 6
    Lua scripting
  • 6
    Strings
  • 5
    Awesomeness for Free
  • 5
    Hyperloglogs
  • 4
    Transactions
  • 4
    Outstanding performance
  • 4
    Runs server side LUA
  • 4
    LRU eviction of keys
  • 4
    Feature Rich
  • 4
    Written in ANSI C
  • 4
    Networked
  • 3
    Data structure server
  • 3
    Performance & ease of use
  • 2
    Dont save data if no subscribers are found
  • 2
    Automatic failover
  • 2
    Easy to use
  • 2
    Temporarily kept on disk
  • 2
    Scalable
  • 2
    Existing Laravel Integration
  • 2
    Channels concept
  • 2
    Object [key/value] size each 500 MB
  • 2
    Simple

Sign up to add or upvote prosMake informed product decisions

Cons of Lucene
Cons of Redis
    Be the first to leave a con
    • 15
      Cannot query objects directly
    • 3
      No secondary indexes for non-numeric data types
    • 1
      No WAL

    Sign up to add or upvote consMake informed product decisions

    What is Lucene?

    Lucene Core, our flagship sub-project, provides Java-based indexing and search technology, as well as spellchecking, hit highlighting and advanced analysis/tokenization capabilities.

    What is Redis?

    Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use Lucene?
    What companies use Redis?
    See which teams inside your own company are using Lucene or Redis.
    Sign up for StackShare EnterpriseLearn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Lucene?
    What tools integrate with Redis?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    Blog Posts

    Nov 20 2019 at 3:38AM

    OneSignal

    PostgreSQLRedisRuby+8
    9
    4616
    Jun 6 2019 at 5:11PM

    AppSignal

    RedisRubyKafka+9
    15
    1627
    What are some alternatives to Lucene and Redis?
    Solr
    Solr is the popular, blazing fast open source enterprise search platform from the Apache Lucene project. Its major features include powerful full-text search, hit highlighting, faceted search, near real-time indexing, dynamic clustering, database integration, rich document (e.g., Word, PDF) handling, and geospatial search. Solr is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated failover and recovery, centralized configuration and more. Solr powers the search and navigation features of many of the world's largest internet sites.
    Elasticsearch
    Elasticsearch is a distributed, RESTful search and analytics engine capable of storing data and searching it in near real time. Elasticsearch, Kibana, Beats and Logstash are the Elastic Stack (sometimes called the ELK Stack).
    Sphinx
    It lets you either batch index and search data stored in an SQL database, NoSQL storage, or just files quickly and easily — or index and search data on the fly, working with it pretty much as with a database server.
    Apache Solr
    It uses the tools you use to make application building a snap. It is built on the battle-tested Apache Zookeeper, it makes it easy to scale up and down.
    Hadoop
    The Apache Hadoop software library is a framework that allows for the distributed processing of large data sets across clusters of computers using simple programming models. It is designed to scale up from single servers to thousands of machines, each offering local computation and storage.
    See all alternatives