Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ShenweiWang/LuceneInAction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

5 Commits

Repository files navigation

Welcome to Lucene in Action!
This source code distribution is a companion to the
Lucene in Action book available from Manning Publications.
To purchase an electronic or printed copy of the book,
visit http://www.manning.com/hatcher2
The authors host a companion website at http://www.lucenebook.com
R E Q U I R E M E N T S
-----------------------
 * JDK 1.4+
 * Ant 1.6+ (to run the automated examples)
 * JUnit 3.8.1+
 - junit.jar should be in ANT_HOME/lib
I N S T A L L A T I O N
-----------------------
You've already unpacked the distribution, since you're reading this 
file. You may now run most of the code using Ant. We recommend
that you open the code in your favorite editor or IDE to follow how 
the examples work.
R U N N I N G
-------------
We recommend you run the examples using the provided Ant build file.
However, you may run the examples without Ant with some
unsupported and manual configuration. The JAR files in the
lib directory need to be in your build and execution classpath to
run manually. Several programs require external information such as 
command-line arguments and JVM system properties - all of which the 
Ant build file takes care of. Reference the build file and source
for these configuration details.
R U N N I N G W I T H A N T
----------------------------------
The code is primarily JUnit test cases, with some Java main()
programs also. All the JUnit test cases and several of the main() 
programs are easily run using the Ant build.xml file provided.
To run all the JUnit tests, run the "test" target:
 % ant test
The first time the build is executed, the source code is compiled
and a few Lucene indexes are built. As long as nothing changes,
this is a one-time setup, and successive builds will bypass this 
effort.
Several of the included Java main() programs may be launched 
individually. From output of "ant -p", these targets are,
including descriptions:
 AnalyzerDemo Demonstrates analysis of text
 BooksLikeThis Demonstrates a term vector use
 CellPhone Demonstrates using WordNet for T9 input
 ChineseDemo Examples of Chinese analysis
 Explainer Demonstrates Lucene's Explanation feature
 ExtensionFileHandler Demonstrates the document handling framework
 Indexer Indexes a directory of .txt files
 NutchExample Demonstrates Nutch's analyzer
 SearchServer Remote and multi-index searching
 Searcher Searches an index built by Indexer
 SortingExample Demonstrates several ways to sort results
 SynonymAnalyzerViewer Examples of synonym injection
To run any of these examples, simply run "ant" followed by the
desired target name. For example, run the CellPhone application 
using:
	% ant CellPhone
The Ant targets provide information of what is about to execute.
This information is followed by a prompt requiring you to press
return to continue. Additionally, several examples require user
input, generally with working default values.
T I P S
-------
 * To run Ant with less decoration, use the -e switch.
 * To run a single test case:
 ant test -Dtest=<name of test without "Test" suffix>
 example: ant test -Dtest=QueryParser
 * To bypass the "Press return to continue..." prompts, add
 the -Dnopause=true command-line switch.
 * Run "ant clean" to force a rebuild of the code and test
 indexes.
 * Follow along with the examples using the source code and the
 book itself. The code was written for the book and makes much
 more sense in context with elaborate explanations.
K N O W N I S S U E S
-----------------------
 * Performance tests may fail if your system is heavily loaded at
 the time or has insufficient RAM or processor/disk speed
 
 * SearchServer does not exit, so the Ant launcher forcefully
 times-out its execution. However, the example of running 
 SearchClient succeeds successfully before this time-out.
C O N T A C T I N F O R M A T I O N
--------------------------------------
Manning provides an Author Online forum accessible from:
	http://www.manning.com/hatcher2
The authors host a companion website at:
	http://www.lucenebook.com
For general Lucene information and support, please visit
Lucene's website for pointers to FAQ's, articles, the user e-mail 
list, and the informative and ever evolving wiki. The main Lucene
website is: http://jakarta.apache.org/lucene

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /