Code Monkey home page Code Monkey logo

elasticsearch-qrcache's Introduction

Elasticsearch QRCache Plugin

Overview

QRCache Plugin provides a feature of Query Result Cache for Elasticsearch. This cache is different from Shard Query Cache. Shard Query Cache stores a count(hits.total) of a query, not a response(hits). On the other hand, our Query Result Cache stores the response to a cache.

Version

Version Elasticsearch
master 1.6.X
1.6.0 1.6.0
1.5.0 1.5.0

Issues/Questions

Please file an issue. (Japanese forum is here.)

Installation

Install QRCache Plugin

$ $ES_HOME/bin/plugin --install org.codelibs/elasticsearch-extension/1.6.0
$ $ES_HOME/bin/plugin --install org.codelibs/elasticsearch-qrcache/1.6.0

References

Enable Query Result Cache for Index

Query Result Cache is enabled if index.cache.query_result.enable is set to true. (For 1.3, close the index before updating a setting)

curl -XPUT 'localhost:9200/my_index/_settings?index.cache.query_result.enable=true'

Check Stats

curl -XGET 'localhost:9200/_qrc/stats?pretty'

Clear Cache

curl -XGET 'localhost:9200/my_index/_qrc/clear?pretty'

Settings

You can change parameters by elasticsearch.yml.

indices.cache.query_result.clean_interval: 10s
indices.cache.query_result.size: 1%
indices.cache.query_result.expire: 1m

clean_interval is an interval time for purging invalid caches, size is a total cache size and expire is an expire time for each cache.

elasticsearch-qrcache's People

Contributors

deka0106 avatar marevol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elasticsearch-qrcache's Issues

Compatibility with ES 2.x

Hi, could you update your extension to use for ES 2.x?
I would find it useful, since ES 2.x is faster for many things, but still missing a query cache mechanism as yours.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.