You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Danny Huang <dh...@seattletimes.com> on 2007/05/08 18:33:18 UTC

feature question

 

I am really new to the search space and to Solr, so I apologize if my
question seems primitive.

Can Solr index database records directly by accessing whatever db server
I have, or does it only index web documents (via http)? 

 


Re: feature question

Posted by Ryan McKinley <ry...@gmail.com>.
Danny Huang wrote:
>  
> 
> I am really new to the search space and to Solr, so I apologize if my
> question seems primitive.
> 
> Can Solr index database records directly by accessing whatever db server
> I have, or does it only index web documents (via http)? 
> 
>  

Take a look at the tutorial:
http://lucene.apache.org/solr/tutorial.html

out of the "box", solr indexes xml files that match your schema

The tutorial with these example files:
http://svn.apache.org/repos/asf/lucene/solr/trunk/example/exampledocs/

There is an experimental SQL interface, but I'd recommend getting 
familiar with the standard XML support before considering that route.

ryan




Re: feature question

Posted by Tom Hill <so...@zvents.com>.
Hi Danny,


On 5/8/07, Danny Huang <dh...@seattletimes.com> wrote:

> Can Solr index database records directly by accessing whatever db server
> I have, or does it only index web documents (via http)?


Solr doesn't collect documents, you build documents and post them to Solr.
So you can query your database, and build a doc and post it. Or you could
use a crawler and build documents from web pages.

There are tools that access the database such as DBSight, and I believe
solr-103 is starting to address this, but I haven't tried them.
https://issues.apache.org/jira/browse/SOLR-103

See http://lucene.apache.org/solr/tutorial.html#Indexing+Data for a tutorial
on how to get documents into solr.

BTW, I think queries like this should go to the solr-user list, rather than
solr-dev

Tom

Re: feature question

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Besides the other replies on this thread, there is another really  
nice way to tie a database dynamically to Solr.  Use acts_as_solr.   
The prerequisites are that you be using Ruby and ActiveRecord to  
model your database tables.  But its as easy as this:

	class Book < ActiveRecord::Base
	  acts_as_solr
	end

Any time a book record is updated, created, or deleted the change is  
sent to Solr and committed.  And it supports searching via Solr and  
merging those results with the database records.

	Erik


On May 8, 2007, at 12:33 PM, Danny Huang wrote:

>
>
> I am really new to the search space and to Solr, so I apologize if my
> question seems primitive.
>
> Can Solr index database records directly by accessing whatever db  
> server
> I have, or does it only index web documents (via http)?
>
>
>