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 vijay_schi <vi...@yahoo.com> on 2008/02/07 20:27:38 UTC

uniqueKey gives duplicate values

Hi,

I'm new to solr. I have a uniqueKey on string which has the data of
12345_r,12346_r etc etc.
when I'm posting xml with same data second time, it allows the docs to be
added. when i search for id:12345_r on solr client , i'm getting multiple
records. what might be the problem ? 

previously I'm using in integer, it was working fine. As I changed to
string, its allwing duplicates. 

can anyone Clear/Help on this? 
-- 
View this message in context: http://www.nabble.com/uniqueKey-gives-duplicate-values-tp15341288p15341288.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: uniqueKey gives duplicate values

Posted by Yonik Seeley <yo...@apache.org>.
On Feb 7, 2008 2:51 PM, vijay_schi <vi...@yahoo.com> wrote:
> I want to know, what type of analyzers can be used for the data 12345_r,
> 12346_r, 12345_c, 12346_c ....etc , type of data.
>
> I had text type for that uniqueKey and some query , index analyzers on it. i
> think thats making duplicates.

Yes, that is the problem.  uniqueKeys must be single tokens after analysis.
Use the string type instead.

-Yonik

Re: uniqueKey gives duplicate values

Posted by vijay_schi <vi...@yahoo.com>.
I want to know, what type of analyzers can be used for the data 12345_r,
12346_r, 12345_c, 12346_c ....etc , type of data.

I had text type for that uniqueKey and some query , index analyzers on it. i
think thats making duplicates.




Yonik Seeley wrote:
> 
> On Feb 7, 2008 2:27 PM, vijay_schi <vi...@yahoo.com> wrote:
>> I'm new to solr. I have a uniqueKey on string which has the data of
>> 12345_r,12346_r etc etc.
>> when I'm posting xml with same data second time, it allows the docs to be
>> added. when i search for id:12345_r on solr client , i'm getting multiple
>> records. what might be the problem ?
>>
>> previously I'm using in integer, it was working fine. As I changed to
>> string, its allwing duplicates.
>>
>> can anyone Clear/Help on this?
> 
> Double check that your uniqueKey correctly specifies the name of the
> field that contains 12345_r,
> and that you restarted Solr after the schema change.
> 
> The example schema that comes with Solr uses a string uniqueKey, and
> it works fine.
> 
> -Yonik
> 
> 

-- 
View this message in context: http://www.nabble.com/uniqueKey-gives-duplicate-values-tp15341288p15341772.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: uniqueKey gives duplicate values

Posted by Yonik Seeley <yo...@apache.org>.
On Feb 7, 2008 2:27 PM, vijay_schi <vi...@yahoo.com> wrote:
> I'm new to solr. I have a uniqueKey on string which has the data of
> 12345_r,12346_r etc etc.
> when I'm posting xml with same data second time, it allows the docs to be
> added. when i search for id:12345_r on solr client , i'm getting multiple
> records. what might be the problem ?
>
> previously I'm using in integer, it was working fine. As I changed to
> string, its allwing duplicates.
>
> can anyone Clear/Help on this?

Double check that your uniqueKey correctly specifies the name of the
field that contains 12345_r,
and that you restarted Solr after the schema change.

The example schema that comes with Solr uses a string uniqueKey, and
it works fine.

-Yonik