lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Problem Getting Started...
Date Tue, 27 Dec 2005 00:34:26 GMT

On Dec 26, 2005, at 6:31 PM, Federico Carbonetti wrote:
> I'm new in the ML and in the Lucene world in general... :)

ML?

> I then tried to follow the instructions found at
> http://lucene.apache.org/java/docs/demo.html
> so I opened a command prompt and typed: "java
> org.apache.lucene.demo.IndexFiles C:\Programmi\lucene-1.4.3\src" and I
> got the error "xception in thread "main" ... NoClassDefFound
> org/apache/lucene/demo/IndexFiles" which means that it didn't find the
> class definition.... But where is my mistake?
>
> Can anybody help me pleeeeeeeease?? :)

Federico,

I'm pasting below the relevant piece of the "Installing Lucene"  
appendix, I hope this helps.  At first glance, the environment and  
steps you described seemed fine, so I'm not sure what is awry.

I hope the info below helps:

Running the command-line demo
The command-line Lucene demo consists of two command-line programs: one
that indexes a directory tree of files and another that provides a  
simple search
interface. To run this demo, set your current working directory to  
the directory
where the binary distribution was expanded. Next, run the IndexFiles  
program
like this:

   java -cp lucene-1.4.2.jar;lucene-demos-1.4.2.jar   
org.apache.lucene.demo.IndexFiles docs
.
.
.
adding docs/queryparsersyntax.html
adding docs/resources.html
adding docs/systemproperties.html
adding docs/whoweare.html
9454 total milliseconds

This command indexes the entire docs directory tree (339 files in our  
case) into
an index stored in the index subdirectory of the location where you  
executed
the command.

NOTE Literally every file in the docs directory tree is indexed,  
including .gif
and .jpg files. None of the files are parsed; instead, each file is  
indexed
by streaming its bytes into StandardAnalyzer.

To search the index just created, execute SearchFiles in this manner:

   java -cp lucene-1.4.2.jar;lucene-demos-1.4.2.jar
                 org.apache.lucene.demo.SearchFiles

Query: IndexSearcher AND QueryParser
Searching for: +indexsearcher +queryparser
10 total matching documents
0. docs/api/index-all.html
1. docs/api/allclasses-frame.html
2. docs/api/allclasses-noframe.html
3. docs/api/org/apache/lucene/search/class-use/Query.html
4. docs/api/overview-summary.html
5. docs/api/overview-tree.html
6. docs/demo2.html
7. docs/demo4.html
8. docs/api/org/apache/lucene/search/package-summary.html
9. docs/api/org/apache/lucene/search/package-tree.html

SearchFiles prompts interactively with Query:. QueryParser is used  
with Standard-
Analyzer to create a Query. A maximum of 10 hits are shown at a time;  
if there are
more, you can page through them. Press Ctrl-C to exit the program.

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message