Closed cbleek closed 4 years ago
Yawik stores locations as an array of objects.
> db.jobs.find({_id:ObjectId("5c8115410acec3d470a03e41")},{locations:1}).pretty();
{
"_id" : ObjectId("5c8115410acec3d470a03e41"),
"locations" : [
{
"city" : "Vechta",
"region" : "Niedersachsen",
"coordinates" : {
"type" : "Point",
"coordinates" : [
8.28598,
52.72632
],
"_entity" : "Geo\\Entity\\Geometry\\Point"
}
}
]
}
Solr/blob/master/src/Entity/JobProxy.php#L358 stores a location by simply:
/**
* @see \Jobs\Entity\JobInterface::setLocation()
*/
public function setLocation($location)
{
return $this->job->setLocation($location);
}
the location field in solr is a sting. After saving a job in our demo, the location in solr contains "location":"Vechta, Niedersachsen ( 8.28598, 52.72632 )",
Problem is in another module (yawik/DemoSkin)
can we use our new viewHelper when saving the "location" in solr?
The value, which is stored in Solr:
https://github.com/yawik/Solr/blob/master/src/Entity/JobProxy.php#L358