Lucene on Windows

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Lucene on Windows

Charles Wunderlich
I'm trying to implement Lucene and I'm having problems with the
installation. Please help.

 

I have windows 2003 server.

Installed Java (c:\jdk1.3.1_17)

Unzipped lucene-1.4.3.zip to d:\lucene

Copied lucene-1.4.3.jar and lucene-demos-1.4.3.jar to c:\jdk1.3.1_17\lib

 

I try to run the indexer from the command line (as shown on page 14 of
Lucene in action) but I don't get a response back.

Java build/index d:\lucene

 

 

Thanks

 

Charles W

 

Reply | Threaded
Open this post in threaded view
|

Re: Lucene on Windows

D.Saravanaraj
try putting the jar files in the jre/lib/ext folder of the jre used by the
system
or
try adding the path of the jar files like

d:\lucene\lucene-1.4.3.jar;d:\lucene\lucene-demos-1.4.3.jar;
to the classpath in the environmental variables.


On 3/8/06, Charles Wunderlich <[hidden email]> wrote:

>
> I'm trying to implement Lucene and I'm having problems with the
> installation. Please help.
>
>
>
> I have windows 2003 server.
>
> Installed Java (c:\jdk1.3.1_17)
>
> Unzipped lucene-1.4.3.zip to d:\lucene
>
> Copied lucene-1.4.3.jar and lucene-demos-1.4.3.jar to c:\jdk1.3.1_17\lib
>
>
>
> I try to run the indexer from the command line (as shown on page 14 of
> Lucene in action) but I don't get a response back.
>
> Java build/index d:\lucene
>
>
>
>
>
> Thanks
>
>
>
> Charles W
>
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Lucene on Windows

Erik Hatcher
In reply to this post by Charles Wunderlich
On Mar 8, 2006, at 12:19 PM, Charles Wunderlich wrote:
> I'm trying to implement Lucene and I'm having problems with the
> installation. Please help.
>
>
>
> I have windows 2003 server.
>
> Installed Java (c:\jdk1.3.1_17)

I personally would have installed a much more recent version of  
Java.  It is up to version 1.5 (errr, 5.0!).

> Unzipped lucene-1.4.3.zip to d:\lucene
>
> Copied lucene-1.4.3.jar and lucene-demos-1.4.3.jar to c:\jdk1.3.1_17
> \lib

Lucene 1.9.1 is the latest version of Lucene.

I strongly recommend against moving 3rd party JAR files into your JDK  
lib directory.  Use the "java" command-line option to set a  
classpath, or the CLASSPATH environment variable instead.

> I try to run the indexer from the command line (as shown on page 14 of
> Lucene in action) but I don't get a response back.
>
> Java build/index d:\lucene

This is _not_ the command-line shown on page 14 of LIA.  The command-
line is this:

        java lia.meetlucene.Indexer build/index /lucene

Also read the "code conventions and downloads" section on page xxxii  
where we discuss classpath.  You did not mention downloading the  
Lucene in Action code, but to run our Indexer example, you'll need to  
download that and follow those instructions as well.

        Erik

Reply | Threaded
Open this post in threaded view
|

RE: Lucene on Windows

Charles Wunderlich
In reply to this post by Charles Wunderlich

My /jre/lib folder doesn't have a ext folder.
I added the .jar files to the classpath.
Still no luck. I've been trying to finish what someone else started.
------------

I'm now trying to setup Lucene on another machine running winxp.
Java -version 1.5.0_06
Download & unzipped 1.9.1 to c:\lucene
C:\lucene>set classpath
classpath=c:\lucene\lucene-core-1.9.1.jar;c:\lucene\lucene-demos-1.9.1.j
ar

I get the following message(s):
C:\lucene>java build/index c:\lucene
Exception in thread "main" java.lang.NoClassDefFoundError: build/index

C:\lucene>java lia.meetlucene.Indexer build/index /lucene
Exception in thread "main" java.lang.NoClassDefFoundError:
lia/meetlucene/Indexer

__
Quote from page 14 of LIA.
Note: If you're running this application on a Windows platform command
shell, you need to adjust the command line's directory and path
separators. The Windows command line is java build/index c:\lucene
__
       


Thanks

CharlesW



-----Original Message-----
From: D.Saravanaraj [mailto:[hidden email]]
Sent: Wednesday, March 08, 2006 11:42 AM
To: [hidden email]
Subject: Re: Lucene on Windows

try putting the jar files in the jre/lib/ext folder of the jre used by
the
system
or
try adding the path of the jar files like

d:\lucene\lucene-1.4.3.jar;d:\lucene\lucene-demos-1.4.3.jar;
to the classpath in the environmental variables.


On 3/8/06, Charles Wunderlich <[hidden email]> wrote:

>
> I'm trying to implement Lucene and I'm having problems with the
> installation. Please help.
>
>
>
> I have windows 2003 server.
>
> Installed Java (c:\jdk1.3.1_17)
>
> Unzipped lucene-1.4.3.zip to d:\lucene
>
> Copied lucene-1.4.3.jar and lucene-demos-1.4.3.jar to
c:\jdk1.3.1_17\lib
>
>
>
> I try to run the indexer from the command line (as shown on page 14 of
> Lucene in action) but I don't get a response back.
>
> Java build/index d:\lucene
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Lucene on Windows

Erik Hatcher
Charles,

Again you've missed a key piece of the command-line... the actual  
classname.  You are also apparently trying to run the demo that ships  
with Lucene using a code example from "Lucene in Action" - these two  
are completely separate.

If you want to run the demo and have Lucene in Action, reference the  
appendix that describes running it in great detail.  Also, be sure to  
pay particular attention to the _exact_ command-lines provided.

        Erik



On Mar 8, 2006, at 2:16 PM, Charles Wunderlich wrote:

>
> My /jre/lib folder doesn't have a ext folder.
> I added the .jar files to the classpath.
> Still no luck. I've been trying to finish what someone else started.
> ------------
>
> I'm now trying to setup Lucene on another machine running winxp.
> Java -version 1.5.0_06
> Download & unzipped 1.9.1 to c:\lucene
> C:\lucene>set classpath
> classpath=c:\lucene\lucene-core-1.9.1.jar;c:\lucene\lucene-
> demos-1.9.1.j
> ar
>
> I get the following message(s):
> C:\lucene>java build/index c:\lucene
> Exception in thread "main" java.lang.NoClassDefFoundError: build/index
>
> C:\lucene>java lia.meetlucene.Indexer build/index /lucene
> Exception in thread "main" java.lang.NoClassDefFoundError:
> lia/meetlucene/Indexer
>
> __
> Quote from page 14 of LIA.
> Note: If you're running this application on a Windows platform command
> shell, you need to adjust the command line's directory and path
> separators. The Windows command line is java build/index c:\lucene
> __
>
>
>
> Thanks
>
> CharlesW
>
>
>
> -----Original Message-----
> From: D.Saravanaraj [mailto:[hidden email]]
> Sent: Wednesday, March 08, 2006 11:42 AM
> To: [hidden email]
> Subject: Re: Lucene on Windows
>
> try putting the jar files in the jre/lib/ext folder of the jre used by
> the
> system
> or
> try adding the path of the jar files like
>
> d:\lucene\lucene-1.4.3.jar;d:\lucene\lucene-demos-1.4.3.jar;
> to the classpath in the environmental variables.
>
>
> On 3/8/06, Charles Wunderlich <[hidden email]>  
> wrote:
>>
>> I'm trying to implement Lucene and I'm having problems with the
>> installation. Please help.
>>
>>
>>
>> I have windows 2003 server.
>>
>> Installed Java (c:\jdk1.3.1_17)
>>
>> Unzipped lucene-1.4.3.zip to d:\lucene
>>
>> Copied lucene-1.4.3.jar and lucene-demos-1.4.3.jar to
> c:\jdk1.3.1_17\lib
>>
>>
>>
>> I try to run the indexer from the command line (as shown on page  
>> 14 of
>> Lucene in action) but I don't get a response back.
>>
>> Java build/index d:\lucene
>>
>>

Reply | Threaded
Open this post in threaded view
|

RE: Lucene on Windows

Charles Wunderlich
In reply to this post by Charles Wunderlich


>Again you've missed a key piece of the command-line... the actual  
>classname.  
Can you provide example so I can better understand? Knowing my
configuration, what would be a valid command line for indexing a folder
(p:/files)?

>You are also apparently trying to run the demo that ships  
>with Lucene using a code example from "Lucene in Action" - these two  
>are completely separate.
I really don't care about a demo, I just need to index and search files
for now. I'll have more time to learn more later.
I downloaded Lucene from lucene.apache.org. Please feel free to educate
me. I've searched several groups and found several people having similar
issues, but I couldn't find a solution.


>If you want to run the demo and have Lucene in Action, reference the  
>appendix that describes running it in great detail.  Also, be sure to  
>pay particular attention to the _exact_ command-lines provided.

I need to:
1) Index thousands of files in sub directories (p:/files/1980,
p:/files/1981,..., p:/files/2006). I expect this to take some time
index.

2) Search indexed data via web front end that my programmer will create.



Thanks

Charles W
Reply | Threaded
Open this post in threaded view
|

Re: Lucene on Windows

Erik Hatcher

On Mar 8, 2006, at 3:53 PM, Charles Wunderlich wrote:
>> Again you've missed a key piece of the command-line... the actual
>> classname.
> Can you provide example so I can better understand? Knowing my
> configuration, what would be a valid command line for indexing a  
> folder
> (p:/files)?

In your second example, you did specify the command-line with the  
classname, so my apologies for not mentioning that in my last  
message.  However, you were using the command-line from "Lucene in  
Action" using its custom code but without actually providing the code  
from Lucene in Action in your classpath.

>> You are also apparently trying to run the demo that ships
>> with Lucene using a code example from "Lucene in Action" - these two
>> are completely separate.
> I really don't care about a demo, I just need to index and search  
> files
> for now. I'll have more time to learn more later.
> I downloaded Lucene from lucene.apache.org. Please feel free to  
> educate
> me. I've searched several groups and found several people having  
> similar
> issues, but I couldn't find a solution.

Unfortunately Lucene isn't quite that deployable out of the box so  
easily.  The demo that comes with Lucene can provide a quick way to  
do what you're after, but it is not flexible and is not something  
you're likely to want to live with for very long.  However, since  
you're apparently new to Java and Lucene, the demo is perhaps your  
best bet to go with for starters.

Lucene in Action describes using the demo in great detail in Appendix  
A.  It seems from your previous message mentioning the book that you  
have it.  If so, follow the instructions in Appendix A exactly and  
you should be in business.  There are also instructions publicly  
available on Lucene's website:

        <http://lucene.apache.org/java/docs/demo.html>

Either should do the trick for your needs.

>> If you want to run the demo and have Lucene in Action, reference the
>> appendix that describes running it in great detail.  Also, be sure to
>> pay particular attention to the _exact_ command-lines provided.
>
> I need to:
> 1) Index thousands of files in sub directories (p:/files/1980,
> p:/files/1981,..., p:/files/2006). I expect this to take some time
> index.
>
> 2) Search indexed data via web front end that my programmer will  
> create.

Best wishes,
        Erik

Reply | Threaded
Open this post in threaded view
|

searching algorithm?

sivan v
hello all i know that lucene using inverted indexing algorithm  for the indexing processing..
   
  but i want to know which algorithm it using for searching the documents..
   
  please help me to know this..
   
  thanking you..
   


      Enduringly your's,
  V.Sivanarul.,M.Tech.




               
---------------------------------
Blab-away for as little as 1ยข/min. Make  PC-to-Phone Calls using Yahoo! Messenger with Voice.