: My data is stored in a database, I want Solr to look up the data in that
: database using my existing index. At the moment, I have set the <dataDir>

you seem to be confusing two issues....

: element in my solrconfig to point at my existing index, and checked the
: schema on my existing index using Luke but I can't get any results when
: searching in Solr.
: 
: My index was created using hibernate-search. 

...if you have an existing index, and you want to search in Solr, you have 
to create a schema.xml file that tells solr what the fields are that you 
have and what datatypes to treat them as -- in particular what analysers 
to use when querying them.

if hibernate-search built your index, you'll need to look at how it was 
configured to build the index to figure some of this out (i'm not familiar 
with hibernate-search so i can't help you there) ... the 
LUkeRequestHandler can help you spot check the raw index if you need to 
(ie: "oh, look all of hte terms are lowercased so i guess i would use a 
LowerCaseFilterFactory")

: How I can retrieve my data in Solr, using the existing Lucene index? I think
: I need to set the database connection details somewhere, just not sure
: where. I have set up a dataImport handler, but I don't want that to
: overwrite my exising index.

If you are given solr an existing index, it doens't care what database it 
was built from -- just what analsysis rules were used when it was built.  
the only thing in solr that cares about databases is the DataImportHandler 
which you could use to update your idex as new data gets added to your 
database if you want -- but first you have to create a schema.xml that 
makes sense for your index.

Alternately: create the schema.xml that you *want* to have, abandom your 
existing index and use DataImportHandler to build a new index and keep it 
up to date.


-Hoss

Reply via email to