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 Jack L <jl...@yahoo.ca> on 2007/02/27 13:04:26 UTC
What to use for the unique key?
I am indexing some pages whose urls are unique.
I wanted to use url as the unique key but got a
problem that "=" is not allowed in unique keys.
I could use a MD5 hash of the url as the unique key
but I'm not sure if there is a better/simpler way.
I wonder what others use for the unique keys?
--
Best regards,
Jack
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re[2]: What to use for the unique key?
Posted by Jack L <jl...@yahoo.ca>.
Hello Yonik,
You are right. = is allowed. The problem was because & was
not properly escaped in xml.
--
Thanks,
Jack
Tuesday, February 27, 2007, 8:47:35 AM, you wrote:
> On 2/27/07, Jack L <jl...@yahoo.ca> wrote:
>> I am indexing some pages whose urls are unique.
>> I wanted to use url as the unique key but got a
>> problem that "=" is not allowed in unique keys.
> That doesn't sound right. unique keys can be anything (but they need
> to be indexed to a single token... to text analysis). The fieldType
> for the unique key field that most people use is "string", which
> allows anything as it's value.
> -Yonik
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: What to use for the unique key?
Posted by Yonik Seeley <yo...@apache.org>.
On 2/27/07, Jack L <jl...@yahoo.ca> wrote:
> I am indexing some pages whose urls are unique.
> I wanted to use url as the unique key but got a
> problem that "=" is not allowed in unique keys.
That doesn't sound right. unique keys can be anything (but they need
to be indexed to a single token... to text analysis). The fieldType
for the unique key field that most people use is "string", which
allows anything as it's value.
-Yonik