Ok got it. 
I am indexing two tables differently. I am using Solrj to index with
@Field annotation. I make two queries initially and fetch the data from
two tables and index them separately. But what if the ids in two tables
are same? That means documents with same id will be deleted when doing
update. 

How does this work? Please explain. 

Thanks. 

-----Original Message-----
From: Aleksander M. Stensby [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 19, 2008 3:49 PM
To: solr-user@lucene.apache.org
Subject: Re: Unique id

Yes it is. You need a unique id because the add method works as and "add

or update" method. When adding a document whose ID is already found in
the  
index, the old document will be deleted and the new will be added. Are
you  
indexing two tables into the same index? Or does one entry in the index

consist of data from both tables? How are these linked together without
an  
ID?

- Aleksander

On Wed, 19 Nov 2008 10:42:00 +0100, Raghunandan Rao  
<[EMAIL PROTECTED]> wrote:

> Hi,
>
> Is the uniqueKey in schema.xml really required?
>
>
> Reason is, I am indexing two tables and I have id as unique key in
> schema.xml but id field is not there in one of the tables and indexing
> fails. Do I really require this unique field for Solr to index it
better
> or can I do away with this?
>
>
> Thanks,
>
> Rahgu
>



-- 
Aleksander M. Stensby
Senior software developer
Integrasco A/S
www.integrasco.no

Reply via email to