You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Nicolas St-Laurent <ns...@wantedtech.com> on 2006/11/23 23:31:26 UTC
Solr and Oracle
Hi,
Does someone use Solr to index/search in a database instead of XML
documents ? I search for information about this and I don't find any.
Actually, I index huge Oracle tables with Lucene with a custom made
indexer/search engine. But I would prefer to use Solr instead. If
someone can give me a hint on how to do this, I will appreciate.
Thanks,
Nicolas St-Laurent
Re: Solr and Oracle
Posted by Michael Imbeault <mi...@sympatico.ca>.
I index documents I have in a mysql database via xml. You can build your
xml documents on the fly with the data from your database and index
that, no problem at all.
Michael Imbeault
CHUL Research Center (CHUQ)
2705 boul. Laurier
Ste-Foy, QC, Canada, G1V 4G2
Tel: (418) 654-2705, Fax: (418) 654-2212
Nicolas St-Laurent wrote:
> Hi,
>
> Does someone use Solr to index/search in a database instead of XML
> documents ? I search for information about this and I don't find any.
> Actually, I index huge Oracle tables with Lucene with a custom made
> indexer/search engine. But I would prefer to use Solr instead. If
> someone can give me a hint on how to do this, I will appreciate.
>
> Thanks,
>
> Nicolas St-Laurent
>
Re: Solr and Oracle
Posted by Walter Underwood <wu...@netflix.com>.
I am doing this. Let's assume that you can make a query so that
each row of the result is one document that you want to index.
Create an XML document in Solr update format in a StringBuilder,
then POST that to the Solr instance. After about 1000 documents,
post a "<commit/>". After all the rows, post a "<commit/>", then
an "<optimize/>".
My documents are rather small, so I batch twenty of them in a
single post. That runs faster than one document per post.
The whole thing is about two pages of Java. It will get bigger
when I start checking the return codes from the commits.
I would share it, but it uses a custom DB layer, so it wouldn't
work for anyone else.
wunder
==
Walter Underwood
Seach Guru, Netflix
On 11/24/06 8:14 AM, "Nicolas St-Laurent" <ns...@wantedtech.com> wrote:
> Thank you Bertrand.
>
> The documentation on Solr is still sparse. I've already looked in
> SolrResources, find some idea, but not exactly what I need. When my
> solution will work, I will document it into the wiki.
>
> Nicolas
>
> Le 06-11-24 à 02:48, Bertrand Delacretaz a écrit :
>
>> On 11/23/06, Nicolas St-Laurent <ns...@wantedtech.com> wrote:
>>
>>> ...I index huge Oracle tables with Lucene with a custom made
>>> indexer/search engine. But I would prefer to use Solr instead...
>>
>> Instead of using Lucene's API directly, with Solr you'll have to add
>> your documents to the index using HTTP POST messages.
>>
>> There are a few Java clients for Solr floating around on the wiki and
>> in Jira IIRC, but you just need a POST, any way of doing it is fine
>> (using jakarta httpclient for example).
>>
>> See http://wiki.apache.org/solr/SolrResources for more info.
>>
>> -Bertrand
Re: Solr and Oracle
Posted by Nicolas St-Laurent <ns...@wantedtech.com>.
Thank you Bertrand.
The documentation on Solr is still sparse. I've already looked in
SolrResources, find some idea, but not exactly what I need. When my
solution will work, I will document it into the wiki.
Nicolas
Le 06-11-24 à 02:48, Bertrand Delacretaz a écrit :
> On 11/23/06, Nicolas St-Laurent <ns...@wantedtech.com> wrote:
>
>> ...I index huge Oracle tables with Lucene with a custom made
>> indexer/search engine. But I would prefer to use Solr instead...
>
> Instead of using Lucene's API directly, with Solr you'll have to add
> your documents to the index using HTTP POST messages.
>
> There are a few Java clients for Solr floating around on the wiki and
> in Jira IIRC, but you just need a POST, any way of doing it is fine
> (using jakarta httpclient for example).
>
> See http://wiki.apache.org/solr/SolrResources for more info.
>
> -Bertrand
Re: Solr and Oracle
Posted by Bertrand Delacretaz <bd...@apache.org>.
On 11/23/06, Nicolas St-Laurent <ns...@wantedtech.com> wrote:
> ...I index huge Oracle tables with Lucene with a custom made
> indexer/search engine. But I would prefer to use Solr instead...
Instead of using Lucene's API directly, with Solr you'll have to add
your documents to the index using HTTP POST messages.
There are a few Java clients for Solr floating around on the wiki and
in Jira IIRC, but you just need a POST, any way of doing it is fine
(using jakarta httpclient for example).
See http://wiki.apache.org/solr/SolrResources for more info.
-Bertrand
Re: Solr and Oracle
Posted by Yonik Seeley <yo...@apache.org>.
On 11/23/06, Nicolas St-Laurent <ns...@wantedtech.com> wrote:
> Does someone use Solr to index/search in a database instead of XML
> documents ?
Solr doesn't index/search XML documents, only uses XML as a transport
syntax for adding documents to Solr.
There has been some recent work on a CSV loader, if that might be an
easier format for you to get your data into:
https://issues.apache.org/jira/browse/SOLR-66
-Yonik