Here's what I did:
1. Downloaded and unpacked 2.1.0
2. >cd lucene-2.1.0
3. >java -cp lucene-core-2.1.0.jar:lucene-demos-2.1.0.jar
org.apache.lucene.demo.IndexFiles <PATH TO MY DOWNLOAD>/lucene-2.1.0/
docs
Step 3 takes a little bit to run. You can point this at any
directory you want to index
4. >ls
BUILD.txt NOTICE.txt
contrib/ lucene-core-2.1.0.jar src/
CHANGES.txt README.txt
docs/ lucene-demos-2.1.0.jar
LICENSE.txt build.xml
index/ luceneweb.war
#Notice the "index" directory that gets added
5. >java -cp lucene-core-2.1.0.jar:lucene-demos-2.1.0.jar
org.apache.lucene.demo.SearchFiles
Query: vector
Searching for: vector
35 total matching documents
1. /Users/grantingersoll/downloads/lucene-2.1.0/docs/api/org/apache/
lucene/util/BitVector.html
2. /Users/grantingersoll/downloads/lucene-2.1.0/docs/api/org/apache/
lucene/document/Field.TermVector.html
3. /Users/grantingersoll/downloads/lucene-2.1.0/docs/api/org/apache/
lucene/document/class-use/Field.TermVector.html
4. /Users/grantingersoll/downloads/lucene-2.1.0/docs/api/org/apache/
lucene/index/TermFreqVector.html
5. /Users/grantingersoll/downloads/lucene-2.1.0/docs/api/org/apache/
lucene/document/Fieldable.html
6. /Users/grantingersoll/downloads/lucene-2.1.0/docs/api/org/apache/
lucene/index/MultiReader.html
7. /Users/grantingersoll/downloads/lucene-2.1.0/docs/api/org/apache/
lucene/index/FilterIndexReader.html
8. /Users/grantingersoll/downloads/lucene-2.1.0/docs/api/org/apache/
lucene/index/ParallelReader.html
9. /Users/grantingersoll/downloads/lucene-2.1.0/docs/api/org/apache/
lucene/document/AbstractField.html
10. /Users/grantingersoll/downloads/lucene-2.1.0/docs/api/org/apache/
lucene/benchmark/stats/TestData.html
more (y/n) ?
Now, I did this all on OS X. Perhaps you are having permission
problems that it can't create the index directory?
Also, can you check your email settings, for some reason line breaks
are getting stripped and it is very hard to make out your commands.
HTH,
Grant
On Jun 12, 2007, at 1:30 PM, Lucene Help wrote:
I tried uninstalling lucene and installing it again. This time,
after setting the CLASSPATH C:\lucene-2.1.0\lucene-core-2.1.0.jar;C:
\lucene-2.1.0\lucene-demos-2.1.0.jar, I typed java
org.apache.lucene.demo.IndexFiles C:\lucene-2.1.0\src into the
commandline prompt. I got the following: Cannot save index to
'index director, please delete it firstPlease let me know what I am
doing wrong. Thank you.> From: [EMAIL PROTECTED]> Subject:
Re: ERROR opening the Index - contact sysadmin!> Date: Tue, 12 Jun
2007 13:14:17 -0400> To: java-user@lucene.apache.org> > It looks to
me like your indexing did not take (although for some > reason my
mail reader is munging your line breaks so it is hard to > tell
for sure). I would make sure you have successfully indexed and >
then try to start the web app. To verify you index was created,
you > can use Luke (http://www.getopt.org/luke/)> > I presume you
have read http://lucene.apache.org/java/docs/ > demo3.html, but
maybe double checking it would be helpful.> > > On Jun 12, 2007, at
10:13 AM, Lucene Help wrote:> > >> > I am using apache-tomcat
5.5.23 and lucene-2.1.0. At the command > > prompt, I typed, java
org.apache.lucene.demo.IndexHTML - create - > > index C:\Program
Files\Apache Software Foundation\Tomcat 5.5\webapps > > \opt\lucene
\index ..I then got the following: Usage: IndexHTML [- > >
create] [-index <index>] <root_directory>I then copied and pasted
> > the luceneweb.war from C:\lucene-2.1.0 to C:\Program Files
\Apache > > Software Foundation\Tomcat 5.5\webappsI checked to
make sure that > > the configuration.jsp in the directory C:
\Program Files\Apache > > Software Foundation\Tomcat 5.5\webapps
\luceneweb was set correctly, > > which it was: String
indexLocation = "/opt/lucene/index";Then I > > went opened a
Mozilla Firefox version 2.0.0.3 browser and typed in > > http://
localhost:8080/luceneweb/I entered, "test" for my Search > >
Criteria, and tried various numbers for Results Per Page, clicked
> > on the Search button, and got the error I described below,
which was:> > Welcome to the Lucene Template application. (This is
the header)> >> >> >> > ERROR opening the Index -
contact sysadmin!> > Error message: no segments*
file found: files:> >> >> >> >> >> > Apache Lucene Template WebApp
1.0 Thank you in advance!> From: > > [EMAIL PROTECTED]> Subject:
Re: ERROR opening the Index - contact > > sysadmin!> Date: Tue, 12
Jun 2007 09:40:55 -0400> To: java- > > [EMAIL PROTECTED]> >
Can you tell us the steps you went > > through to get to this page?
> > Thanks,> Grant> > On Jun 12, 2007, > > at 3:10 AM, Lucene Help
wrote:> > >> > Hello,I just downloaded > > Lucene and tried
running the demo. I seem > > to be okay up until > > I type in a
query into the "Search Criteria" > > page and click on > > the
"Search" button at the URL: http://localhost: > > 8080/ > >
luceneweb/At this point I am at the URL http://localhost:8080/ > >
> > luceneweb/results.jsp?query=test&maxresults=2 which gives me
the > > > > following:> > Welcome to the Lucene Template
application. (This > > is the header)> >> >> >> >
ERROR opening the Index > > - contact sysadmin!> >
Error message: no segments* > > file found: files:> >> >> >> >> >>
> Apache Lucene Template WebApp > > 1.0 If someone could help me
out > > ASAP, that would be great. > > Thanks!Lucene User> > >
>
_________________________________________________________________>
> > > With Windows Live Hotmail, you can personalize your inbox
with > > your > > favorite color.> > www.windowslive-hotmail.com/
learnmore/ > > personalize.html?locale=en- > > > >
us&ocid=TXT_TAGLM_HMWL_reten_addcolor_0607> > > >
--------------------------> Grant Ingersoll> Center for Natural >
> Language Processing> http://www.cnlp.org/tech/lucene.asp> > Read
> > the Lucene Java FAQ at http://wiki.apache.org/jakarta-lucene/
> > > LuceneFAQ> > > > > >
--------------------------------------------------------------------->
> > To unsubscribe, e-mail: java-user-
[EMAIL PROTECTED]> > > For additional commands, e-
mail: [EMAIL PROTECTED]>> >
_________________________________________________________________>
> Make every IM count. Download Windows Live Messenger and join
the > > i’m Initiative now. It’s free.> > http://im.live.com/
messenger/im/home/?source=TAGWL_June07> > > >
--------------------------------------------------------------------->
To unsubscribe, e-mail: [EMAIL PROTECTED]>
For additional commands, e-mail: [EMAIL PROTECTED]>
_________________________________________________________________
Make every IM count. Download Windows Live Messenger and join the
i’m Initiative now. It’s free.
http://im.live.com/messenger/im/home/?source=TAGWL_June07
--------------------------
Grant Ingersoll
Center for Natural Language Processing
http://www.cnlp.org/tech/lucene.asp
Read the Lucene Java FAQ at http://wiki.apache.org/jakarta-lucene/
LuceneFAQ
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]