Re: Searching BLOB - Lucene setup & problem

From: John Sidney-Woollett <johnsw(at)wardbrook(dot)com>
To: "jdwatson1(at)gmail(dot)com" <jdwatson1(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Searching BLOB - Lucene setup & problem
Date: 2006-06-16 06:38:13
Message-ID: 449251D5.7080908@wardbrook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

This is a bit off topic for the Postgres list... ;)

Make sure you explicitly include the name of the Lucene jar file in your
command line invocation, and any other directories that are required
(normally your current working directory), so for Windows you'd use
something like

java -cp .;{pathto}\lucene-1.4.3.jar YouJavaApp

When you use Lucene in your webapp include the Lucene jar file in
{tomcat_home}\commons\lib or the WEB-INF\lib directory under your webapp.

Hope that helps.

John

jdwatson1(at)gmail(dot)com wrote:
> Hi John,
> I have had a read through the lucene website
> (http://lucene.apache.org/java/docs/index.html) and it sounds pretty
> good to me. I should be able to use this in conjuction with my JSP
> pages.
>
> This may sound quite dumb to anyone who develops in java, but I need a
> little help setting up the demo on my windowsXP machine. I have
> installed JDY 1.5.0_07, i have installed tomcat and can confirm that is
> is all up and running correctly, as I have already written a few simple
> JSP pages.
>
> I have downloaded the lucene package, extracted the package to my C:\
> and followed the steps of the demo page:
> http://lucene.apache.org/java/docs/demo.html
>
> But, when i try to run "java org.apache.lucene.demo.IndexFiles
> c:\lucene-2.0.0\src" from the cmd prompt, I get the following error:
>
> "Exception in thread 'main' java.lang.NoClassDefFoundError:
> org/apache/lucene/analysis/Analyser"
>
> I am not sure why this is coming up. I have followed the instructions
> on the demo page on the web.
>
> The only thing i can think of is I may have my "CLASSPATH" incorrect.
> Can someone help me out with a basic desription if what the classpath
> is and where I should point the classpath environment variable to?
>
> Once I have that correct, i think that I may be able to run the demo.
>
> thanks for any help you can provide.
>
> James
>
> "John Sidney-Woollett" wrote:
>
>>Save yourself some effort and use Lucene to index a directory of your 300
>>word documents. I'm pretty sure that Lucene includes an extension to read
>>Word documents, and you can use PDFBox to read/write PDF files. Marrying
>>the searching and displaying of results to your web application should be
>>trivial since you're wanting to use java anyway. Lucene has full character
>>set support and is blindingly fast
>>
>>If you're looking for a solution to this problem using Postgres, then
>>you'll be creating a ton extra work for yourself. If you're wanting to
>>learn more about postgres, then maybe it'll be worthwhile.
>>
>>John
>>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2006-06-16 07:01:20 Re: pgadmin window closes abnormally
Previous Message Richard Huxton 2006-06-16 06:35:44 Re: need help to recover database