What to use for the unique key?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

What to use for the unique key?

Jack L
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 
Reply | Threaded
Open this post in threaded view
|

Re: What to use for the unique key?

Yonik Seeley-2
On 2/27/07, Jack L <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

ReWhat to use for the unique key?

Jack L
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 <[hidden email]> 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