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 Chris Hostetter <ho...@fucit.org> on 2011/09/02 01:34:11 UTC

Re: getting data from only one database

: we created a solr which is connected to two databases and we created a
: jquery auto complete.in two databases we r having keywords and it is
: default search.so beside the search button we r ctearing more more
: drop down list and nmaed the two databases when the user click one one
: database and enter a search keyword we have to get the search results
: for the keyword from the selected database not fron two
: datbases......

if i understand your question, you are using DIH to index differnet types 
of documents -- some from database "one", and some from database "two"
-- and in some cases (autocomplete?) you only want results from documents 
that were indexed from database "one".

In that case -- you need to note which datbase the docs came from when you 
indexed them, which can be done by adding any field you wnat and recording 
any data you want in it about the source of the data, and then filtering 
on this at query time.

These two docs might be helpful...
https://wiki.apache.org/solr/MultipleIndexes#Flattening_Data_Into_a_Single_Index
https://wiki.apache.org/solr/DataImportHandlerFaq#How_would_I_insert_a_static_value_into_a_field_.3F


-Hoss