Re: translating a character code to an ordinal?

2013-06-10 Thread geeky2
i will try it out and let you know - -- View this message in context: http://lucene.472066.n3.nabble.com/translating-a-character-code-to-an-ordinal-tp4068966p4069339.html Sent from the Solr - User mailing list archive at Nabble.com.

Re: translating a character code to an ordinal?

2013-06-10 Thread Erick Erickson
Hmmm, that may be a wrinkle. I'm actually not sure what'll happen if the _raw_ thing you copy to the int field is not an int (or whatever). You spoke of character code translation, so it may blow up. In which case I'd consider a custom update processor that read the source field, performed whatever

Re: translating a character code to an ordinal?

2013-06-10 Thread geeky2
i will try it. i guess i made a "poor" assumption that you would not get predictable results when copying a code like "mycode" to an int field where where the desired end result in the int field is say, "1". i was worried that some sort of ascii conversion or "wrap around" would happen in the int

Re: translating a character code to an ordinal?

2013-06-10 Thread Erick Erickson
You can use copyField. All it does is send the raw data to the second field, the fact that they're different types is irrelevant. Why not just give it a try? Erick On Fri, Jun 7, 2013 at 8:08 PM, geeky2 wrote: > hello jack, > > thank you for the code ;) > > what "book" are you referring to? AF

Re: translating a character code to an ordinal?

2013-06-07 Thread geeky2
thx, please send me a link to the book so i get/purchase it. thx mark -- View this message in context: http://lucene.472066.n3.nabble.com/translating-a-character-code-to-an-ordinal-tp4068966p4068997.html Sent from the Solr - User mailing list archive at Nabble.com.

Re: translating a character code to an ordinal?

2013-06-07 Thread Jack Krupansky
pha" draft available later next week. -- Jack Krupansky -Original Message- From: geeky2 Sent: Friday, June 07, 2013 8:08 PM To: solr-user@lucene.apache.org Subject: Re: translating a character code to an ordinal? hello jack, thank you for the code ;) what "book" are you

Re: translating a character code to an ordinal?

2013-06-07 Thread geeky2
hello jack, thank you for the code ;) what "book" are you referring to? AFAICT - all of the 4.0 books are "future order". we won't be moving to 4.0 (soon enough). so i take it - copyfield will not work, eg - i cannot take a code like ABC and copy it to an int field and then use the regex to tu

Re: translating a character code to an ordinal?

2013-06-07 Thread Jack Krupansky
This won't help you unless you move to Solr 4.0, but here's an update processor script from the book that can take the first character of a string field and add it as an integer value for another field: add-char-code.js content content_code_i