You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Ankur Goel <an...@brickred.com> on 2004/01/31 13:09:40 UTC

Lucene with Postgres db

Hi,

I have to search the documents which are stored in postgres db. 

Can someone give a clue how to go about it?

Thanks

Ankur Goel
Brickred Technologies
B-2 IInd Floor, Sector-31
Noida,India
P:+91-1202456361
C:+91-9810161323
E:ankurg@brickred.com
http://www.brickred.com
 



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


Re: Lucene with Postgres db

Posted by Leo Galambos <Le...@seznam.cz>.
Have you tried a special add-on for pgsql - 
http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/

Lucene is faster than tsearch (I hope so), but tsearch neednot be 
synchronized with the main DB...up to you.

Cheers,
Leo

Ankur Goel wrote:

>Hi,
>
>I have to search the documents which are stored in postgres db. 
>
>Can someone give a clue how to go about it?
>
>Thanks
>
>Ankur Goel
>Brickred Technologies
>B-2 IInd Floor, Sector-31
>Noida,India
>P:+91-1202456361
>C:+91-9810161323
>E:ankurg@brickred.com
>http://www.brickred.com
> 
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
>
>
>
>  
>


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


RE: Lucene with Postgres db

Posted by Stephen Eaton <se...@gateway.net.au>.
What I do is do a db select and build up a result set of all the
documents/fields I need to search then I index them.  This is usually
performed once a day and does so on all db records.  I'm currently using
turbine and torque to do this. 

> -----Original Message-----
> From: Ankur Goel [mailto:ankurg@brickred.com] 
> Sent: Saturday, 31 January 2004 8:10 PM
> To: lucene-user@jakarta.apache.org
> Subject: Lucene with Postgres db
> 
> Hi,
> 
> I have to search the documents which are stored in postgres db. 
> 
> Can someone give a clue how to go about it?
> 
> Thanks
> 
> Ankur Goel
> Brickred Technologies
> B-2 IInd Floor, Sector-31
> Noida,India
> P:+91-1202456361
> C:+91-9810161323
> E:ankurg@brickred.com
> http://www.brickred.com
>  
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 
> __________ NOD32 1.614 (20040129) Information __________
> 
> This message was checked by NOD32 antivirus system.
> http://www.nod32.com
> 
> 


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


RE: Lucene with Postgres db

Posted by Ankur Goel <an...@brickred.com>.
Thanks for reply...but I still have some confusion.

While creating indexes when we have documents in directory structure we just
have to pass directory path as argument here when we will execute select
query should the returned data be in InputStream form?   


While searching how the index will map to the documents in database since we
have documents stored in different tables in database?
Ankur Goel
Brickred Technologies
B-2 IInd Floor, Sector-31
Noida,India
P:+91-1202456361
C:+91-9810161323
E:ankurg@brickred.com
http://www.brickred.com
 

-----Original Message-----
From: Otis Gospodnetic [mailto:otis_gospodnetic@yahoo.com] 
Sent: Saturday, January 31, 2004 5:52 PM
To: Lucene Users List
Subject: Re: Lucene with Postgres db

Use JCDB to connect to your DB, issue appropriate SELECTs to select
each of you entity/document units, then use the returned data to create
instances of Lucene documents, add those to the index via IndexWriter,
and you got yourself a Lucene index that represents data you have
stored in DB.

If your DB changes frequently, and you want your index in sync with DB
at all times, then you have to figure out how to add/delete/update your
Lucene index every time one does INSERT/DELETE/UPDATE against your DB.

Otis


--- Ankur Goel <an...@brickred.com> wrote:
> Hi,
> 
> I have to search the documents which are stored in postgres db. 
> 
> Can someone give a clue how to go about it?
> 
> Thanks
> 
> Ankur Goel
> Brickred Technologies
> B-2 IInd Floor, Sector-31
> Noida,India
> P:+91-1202456361
> C:+91-9810161323
> E:ankurg@brickred.com
> http://www.brickred.com
>  
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 


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


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


Re: Lucene with Postgres db

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Use JCDB to connect to your DB, issue appropriate SELECTs to select
each of you entity/document units, then use the returned data to create
instances of Lucene documents, add those to the index via IndexWriter,
and you got yourself a Lucene index that represents data you have
stored in DB.

If your DB changes frequently, and you want your index in sync with DB
at all times, then you have to figure out how to add/delete/update your
Lucene index every time one does INSERT/DELETE/UPDATE against your DB.

Otis


--- Ankur Goel <an...@brickred.com> wrote:
> Hi,
> 
> I have to search the documents which are stored in postgres db. 
> 
> Can someone give a clue how to go about it?
> 
> Thanks
> 
> Ankur Goel
> Brickred Technologies
> B-2 IInd Floor, Sector-31
> Noida,India
> P:+91-1202456361
> C:+91-9810161323
> E:ankurg@brickred.com
> http://www.brickred.com
>  
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 


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