Hi,

I have a question concerning the spatial field type LatLonType and populating 
it via an embedded solr server in java.

So far I've only ever had to index simple types like boolean, float, and 
string. This is the first complex type. So I'd like to use the following field 
definition for example in my schema:

<field name="coordinate" type="LatLonType" indexed="true" stored="false" 
multiValued="false"/>

And then I'd like to populate this field in java as in the following psuedo 
code:

public SolrInputDocument populate(AppropriateJavaType coordinate) {

    SolrInputField inputField = new SolrInputField("coordinate");
    inputField.addValue(coordinate, 1.0F);

    SolrInputDocument inputDocument = new SolrInputDocument();
    inputDocument.put("coordinate", inputField);                

    return inputDocument;
}

My question is, what is the AppropriateJavaType for populating a solr field of 
type LatLonType?

Thank you for your time.

Reply via email to