Giter VIP home page Giter VIP logo

clue's Introduction

CLue - Command Line tool for Apache Lucene

Overview:

When working with Lucene, it is often useful to inspect an index.

Luke is awesome, but often times it is not feasible to inspect an index on a remote machine using a GUI. That's where Clue comes in. You can ssh into your production box and inspect your index using your favorite shell.

Another important feature for Clue is the ability to interact with other Unix commands via piping, e.g. grep, more etc.

License:

Clue is under the Apache Public License v2.0.

Bugs:

Please file bugs and feature requests here.

Downloads:

latest version: 0.0.2

What's new in this release?

  • lucene 4.3 upgrade.
  • readonly support - you can toggle on/off readonly mode so you can view an index opened (for write) by another process.
  • better docvalue support - major speed on up viewing docvalues, and all types of docvalus are now supported: numeric, binary, sorted and sortedset.
  • bundle sample data and tool for producing a sample index exhibiting all features of the tool.

source: release-0.0.2.zip

clue-all executable jar with all dependencies: clue-all-0.0.2.jar

clue jar with only clue class files, used as a library: clue-0.0.2.jar

Build:

mvn package

This will create 2 artifacts in the target directory:

  1. clue-xxx.jar

    jar file containing all clue classes.

  2. clue-all-xxx.jar

    executable jar file containing all clue classes as well as all runtime dependencies, e.g. java -jar clue-all-xxx.jar works

Run:

Interactive Mode:

./bin/clue.sh my-idx

Non-interactive Mode:

./bin/clue.sh my-idx command args

Command list:

./bin/clue.sh my-idx help


delete - deletes a list of documents from searching via a query, input: query
directory - prints directory information
docval - gets doc value for a given doc, <field> <docid>, if <docid> not specified, all docs are shown
exit - exits program
help - displays help
info - displays information about the index, <segment number> to get information on the segment
merge - force merges segments into given N segments, input: number of max segments
postings - iterating postings given a term, e.g. <fieldname:fieldvalue>
readonly - puts clue in readonly mode
search - executes a query against the index, input: <query string>
terms - gets terms from the index, <field:term>, term can be a prefix

Build a sample index to play with:

Clue bundles with some test data (15000 car data) for you to build a sample index to play with, do:

./bin/build_sample_index.sh my-idx

Examples:

  1. Getting all the terms in the field 'color_indexed':

    ./bin/clue.sh my-idx terms color_indexed

  2. Getting all the terms in the field 'color_indexed' starting with the term staring with 'r':

    ./bin/clue.sh my-idx terms color_indexed:r

    ./bin/clue.sh my-idx terms color_indexed | grep r

  3. Do a search:

    ./bin/clue.sh my-idx search myquery

  4. Get the index info:

    ./bin/clue.sh my-idx info

  5. Iterate a posting for the term color_indexed:red

    ./bin/clue.sh my-idx postings color_indexed:red

  6. List docvalues for the column-stride-field color:

    ./bin/clue.sh my-idx docval color

  7. Get docvalue for the column-stride-field category for document 4:

    ./bin/clue.sh my-idx docval category 5

  8. Get docvalue for the column-stride-field year of type numeric for document 3:

    ./bin/clue.sh my-idx docval year 3

  9. Get docvalue for the column-stride-field json of type binary for document 3:

    ./bin/clue.sh my-idx docval json 3

  10. Get docvalue for the column-stride-field tags of type sorted-set for document 3:

    ./bin/clue.sh my-idx docval tags 3

clue's People

Contributors

javasoze avatar

Watchers

hao yan avatar James Cloos avatar

Forkers

ironmanz

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.