You will be fine to store this as a string in a Lucene index. Just make sure that when you're reading the document back from the index, you aren't trying to convert the field value to an int.
Pete Peter Miller Senior Developer, CondéNet UK -----Original Message----- From: Michael Mitiaguin [mailto:[email protected]] Sent: 01 April 2009 23:32 To: [email protected] Subject: guid versus Int Id as a primary keys in tables for indexing I used to have Lucene indices against tables where int id field served as a primary key. Now I need to add full text search for tables where GUID ( SQL Server ) is a primary key. Has anyone used guids for that purpose , any possible complications ? My undestanding my select statement after applying Lucene search t ( if I don't store everything there ) will be just changed from select ... where id in ( lucene_hit_id1 , ... , lucene_hit_id2 ) to select ... where guid in ( lucene_hit_guid1 , ... , lucene_hit_guid2 ) ** Please consider the environment before printing this e-mail ** The information contained in this e-mail is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise, is not intended to waive privilege or confidentiality. Internet communications are not secure and therefore Conde Nast does not accept legal responsibility for the contents of this message. Any views or opinions expressed are those of the author. Company Registration details: The Conde Nast Publications Ltd Vogue House Hanover Square London W1S 1JU Registered in London No. 226900
