: Subject: When does Solr actually convert textual representation into non-text
:     formats (e.g. Date)

The short answer is: any place you want.

At the lowest level, FieldType's are required to support converting 
(legal) "String" values into whatever native java object best represents 
their type -- but they are also allowed/encouraged to accept objects of 
that native type directly and use them as is.

In some cases, like with the "XmlUpdateRequestHandler" code , the raw 
sting input is left sa is and passed down to the FieldType, because the 
RequestHandler's parsing code shouldn't make assumptions about the field 
types -- in other cases, like the "JavaBinUpdateRequestHandler" the type 
info comes along with the data, so it can easily pass the 
Integer/Date/Whatever on to the FieldType.

In between, things like UpdateRequetProcessor's can convert from String to 
Date or vice versa as they see fit.

As for DIH: i'm not entirely sure all of the places where a String might 
be converted to a Date ... i think there are special transformers for 
that, but when dealing with things like jdbc datasources you 
frequently get a true Date object back from the jdbc connection and i 
*think* DIH uses those Date objects as is.

: 4) copyField

copy field is not something i've ever considered in this context ... i 
genuinely don't know what would happen if you copyField'd from a 
TrieDateField to TextField and your indexing code was providing a true 
"Date" object ... i suspect you'd get a simple date.toString() in the text 
field.


-Hoss

Reply via email to