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 Krishna Prasad Mekala <kr...@virtusa.com> on 2007/05/11 12:32:44 UTC

Indexing the ORACLE using lucene

Hi all,

 

I am new to Lucene. I am developing a small search utility using lucene.
I have to create the index from my Oracle database. Can anybody tell me
how to create the index from Oracle using lucene? Please send me code
snippets if possible.

 

Your valuable help is highly appreciated. 

 

Thanks in advance.

 

Thanks and best regards,

 

Krishna Prasad M


Re: Indexing the ORACLE using lucene

Posted by Steven Rowe <sa...@syr.edu>.
Krishna Prasad Mekala wrote:
> I have to create the index from my Oracle database. Can anybody tell me
> how to create the index from Oracle using lucene?

Check out Marcelo Ochoa's Oracle/Lucene integration:

   http://issues.apache.org/jira/browse/LUCENE-724

Steve

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


Re: Indexing the ORACLE using lucene

Posted by sairam123 <sa...@gmail.com>.
Hi,

I could able to create create the index . However, when i am trying to
search, i am hitting 0.

Environment : Windows
DB : Oracle 
-> I have created a directory called : c://dbindex. I am seeing the indexes
are created.
My sql Query fetches just one row 
select id, CSC_SITE_ID, ADDRESS1,CITY, STATE from WIPS_ADDRESSES where
csc_site_id = 41813612;

Result :
41813612	BUIDING 2166 12TH LGGETTE	FORT LEWIS	WA

-> I have created another directory called c://qa//a.query where I have an
entry called
FORT LEWIS
Also, tried with 41813612
I am not hitting any result.

Please let me know what is going wrong.

Please explain more on this syntax :

SearchFiles 
      [-index dir]    ** This is index directory
      [-field f]        ** Are these fileds same as filed in the table
      [-repeat n]     ** Please throw more lights on this
      [-queries file]  ** Do I have to copy paste the sql query or the
result i am expecting 
      [-raw]           ** What is this
      [-norms field]";  ** What is this

I am attaching both the 
 




http://www.nabble.com/file/p17443570/SearchDatabase.java SearchDatabase.java 
http://www.nabble.com/file/p17443570/SearchDatabase.java SearchDatabase.java 
http://www.nabble.com/file/p17443570/IndexDatabase.java IndexDatabase.java 
-- 
View this message in context: http://www.nabble.com/Indexing-the-ORACLE-using-lucene-tp10429479p17443570.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


Re: Indexing the ORACLE using lucene

Posted by Chris Lu <ch...@gmail.com>.
Just let you know DBSight already handles the index synchronization
with the database, including incremental indexing, with either
soft-deleted or hard-deleted records.

And it's free without any size limit if you just need to create an
index from the database. You don't need to do any java coding.

Like Erik mentioned, there are many things to consider. DBSight let
you easily change your logic, what to select, what to index, what
Analyzer to use, what XML/JSON/HTML to return.

-- 
Chris Lu
-------------------------
Instant Scalable Full-Text Search On Any Database/Application
site: http://www.dbsight.net
demo: http://search.dbsight.com
Lucene Database Search in 3 minutes:
http://wiki.dbsight.com/index.php?title=Create_Lucene_Database_Search_in_3_minutes

On 5/11/07, bbrown <bb...@botspiritcompany.com> wrote:
> On Fri, 11 May 2007 09:02:04 -0400, Erick Erickson wrote
> > Search the mail archive for Oracle, and there's lengthy discussion. The
> > short form is that you query your database, taking selected
> > data from it and add it to a Lucene document, then write the
> > document to your Lucene index. Repeat this for as many "documents"
> > as you need.
> >
> > There are a large number of decisions to be made. For instance,
> > what constitutes a "document". Whether (or how much) to de-normalize
> > your data. etc. The question "how to create an index from an Oracle
> > database" is far too general to give any more specific advice.
> >
> > Best
> > Erick
> >
> > On 5/11/07, Krishna Prasad Mekala <kr...@virtusa.com> wrote:
> > >
> > > Hi all,
> > >
> > >
> > >
> > > I am new to Lucene. I am developing a small search utility using lucene.
> > > I have to create the index from my Oracle database. Can anybody tell me
> > > how to create the index from Oracle using lucene? Please send me code
> > > snippets if possible.
> > >
> > >
> > >
> > > Your valuable help is highly appreciated.
> > >
> > >
> > >
> > > Thanks in advance.
> > >
> > >
> > >
> > > Thanks and best regards,
> > >
> > >
> > >
> > > Krishna Prasad M
> > >
> > >
>
> Yea, there isnt much documentation out there on how to do this.  But, ideally
> it is pretty simple.  Your goal is to index the content from your database
> into the Lucene.  That is pretty much it.  So, just look at the Document
> creation code.
>
> Also, to other lucene developers; I actually had to index the 'ID' field.  I
> kept getting null if I didnt index it?
>
> This is what I have done with MySQL, which should work for Oracle (jdbc).
>
> http://docs.google.com/Doc?id=dq6cjjg_72fmbcj4
>
> On updating the index.  For me, it is just as easy for me to delete the
> entire index (eg, delete the entire directory) and re-index the database
> again.  It takes more processing as opposed to a 'real' update but is simpler
> development-wise.
>
> --
> Berlin Brown
> [berlin dot brown at gmail dot com]
> http://botspiritcompany.com/botlist/?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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


Re: Indexing the ORACLE using lucene

Posted by bbrown <bb...@botspiritcompany.com>.
On Fri, 11 May 2007 09:02:04 -0400, Erick Erickson wrote
> Search the mail archive for Oracle, and there's lengthy discussion. The
> short form is that you query your database, taking selected
> data from it and add it to a Lucene document, then write the
> document to your Lucene index. Repeat this for as many "documents"
> as you need.
> 
> There are a large number of decisions to be made. For instance,
> what constitutes a "document". Whether (or how much) to de-normalize
> your data. etc. The question "how to create an index from an Oracle
> database" is far too general to give any more specific advice.
> 
> Best
> Erick
> 
> On 5/11/07, Krishna Prasad Mekala <kr...@virtusa.com> wrote:
> >
> > Hi all,
> >
> >
> >
> > I am new to Lucene. I am developing a small search utility using lucene.
> > I have to create the index from my Oracle database. Can anybody tell me
> > how to create the index from Oracle using lucene? Please send me code
> > snippets if possible.
> >
> >
> >
> > Your valuable help is highly appreciated.
> >
> >
> >
> > Thanks in advance.
> >
> >
> >
> > Thanks and best regards,
> >
> >
> >
> > Krishna Prasad M
> >
> >

Yea, there isnt much documentation out there on how to do this.  But, ideally 
it is pretty simple.  Your goal is to index the content from your database 
into the Lucene.  That is pretty much it.  So, just look at the Document 
creation code.

Also, to other lucene developers; I actually had to index the 'ID' field.  I 
kept getting null if I didnt index it?

This is what I have done with MySQL, which should work for Oracle (jdbc).

http://docs.google.com/Doc?id=dq6cjjg_72fmbcj4

On updating the index.  For me, it is just as easy for me to delete the 
entire index (eg, delete the entire directory) and re-index the database 
again.  It takes more processing as opposed to a 'real' update but is simpler 
development-wise.

--
Berlin Brown
[berlin dot brown at gmail dot com]
http://botspiritcompany.com/botlist/?


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


Re: Indexing the ORACLE using lucene

Posted by Erick Erickson <er...@gmail.com>.
Search the mail archive for Oracle, and there's lengthy discussion. The
short form is that you query your database, taking selected
data from it and add it to a Lucene document, then write the
document to your Lucene index. Repeat this for as many "documents"
as you need.

There are a large number of decisions to be made. For instance,
what constitutes a "document". Whether (or how much) to de-normalize
your data. etc. The question "how to create an index from an Oracle
database" is far too general to give any more specific advice.


Best
Erick

On 5/11/07, Krishna Prasad Mekala <kr...@virtusa.com> wrote:
>
> Hi all,
>
>
>
> I am new to Lucene. I am developing a small search utility using lucene.
> I have to create the index from my Oracle database. Can anybody tell me
> how to create the index from Oracle using lucene? Please send me code
> snippets if possible.
>
>
>
> Your valuable help is highly appreciated.
>
>
>
> Thanks in advance.
>
>
>
> Thanks and best regards,
>
>
>
> Krishna Prasad M
>
>