foselasticabundle

Symfony2 FOSElasticaBundle update index for all entities related to the entity updated

守給你的承諾、 提交于 2019-12-18 12:21:05
问题 I'm using FOSElasticaBundle and Doctrine in my project, and my code works for the selective index update using the Doctrine lifecycle events. The issue I come up against is if I an update a related entity separately. For example a person may be related to a company through a manytomany relationship. If I update the company name through company entity directly, then indexes for the person related to the company will be out of date and still relate to the company's old name. I'm a bit lost as

Symfony 2.4 execute Command from Controller

☆樱花仙子☆ 提交于 2019-12-13 16:20:02
问题 I want to execute the command fos:elastica:populate from my controller. I tried that code but it doesn't work, i get error = 1 the var_dump show "" $command = 'fos:elastica:populate'; $app = new Application($this->get('kernel')); $app->setAutoExit(false); $input = new StringInput($command); $output = new ConsoleOutput; $error = $app->run($input, $output); var_dump($error); var_dump(stream_get_contents($output->getStream()); Any ideas ? I try a different code..... $command = $this->get(

ElasticSearch RoutingMissingException

回眸只為那壹抹淺笑 提交于 2019-12-13 11:56:40
问题 I'm trying to populate objects having parent-child relation, but get an error: [Elastica\Exception\ResponseException] RoutingMissingException[routing is required for [myindex]/[comment]/[12345]] Excerpt from type conf: article: _source: enabled: false mappings: ... comment: _source: enabled: false _parent: type: article property: article_id identifier: id _routing: required: true path: article_id mappings: article: type: long index: not_analyzed ... Cant understand what I am missing here....

FosElasticaBundle: how to dump the actual JSON passed to ElasticSearch?

点点圈 提交于 2019-12-13 04:12:13
问题 I am using FosElasticaBundle in a Symfony project. I configured my mappings but I get exception "expected a simple value for field [_id] but found [START_OBJECT]]". I'd like to see the actual JSON created by FosElasticaBundle so I can directly test it against my ElasticSearch server, and understand more about the exception. According to FosElastica documentation, everything should be logged when debug mode is enabled (i.e. in DEV environment) but I can't see this happening; I only see

elasticsearch index deleted

一曲冷凌霜 提交于 2019-12-10 22:55:24
问题 I'm facing a serious problem with my elasticsearch server. I'm using ES 1.7 on a symfony2 project with fosElasticaBundle. The ES index has been deleted two times today, and I can't figure out why. Here are the log I can read in my cluster.log: [cluster.metadata] [server] [index] deleting index [cluster.metadata] [server] [warning] deleting index [cluster.metadata] [server] [please_read] creating index, cause [api], templates [], shards [5]/[1], mappings [] [cluster.metadata] [server] [please

ElasticSearch RoutingMissingException

本秂侑毒 提交于 2019-12-04 01:40:27
I'm trying to populate objects having parent-child relation, but get an error: [Elastica\Exception\ResponseException] RoutingMissingException[routing is required for [myindex]/[comment]/[12345]] Excerpt from type conf: article: _source: enabled: false mappings: ... comment: _source: enabled: false _parent: type: article property: article_id identifier: id _routing: required: true path: article_id mappings: article: type: long index: not_analyzed ... Cant understand what I am missing here.... I'm using Symfony2.3, FOSElasticaBundle 3.0, ElasticSearch 1.2.2 When you have a parent child

FOSElasticaBundle and Doctrine Hydration

两盒软妹~` 提交于 2019-11-29 14:24:31
问题 I'm busy checking out elasticsearch for a new project that I'm starting on. I'm currently running Symfony2.5, with the latest FOSElasticaBundle and all that. I'm doing some benchmarks into performance of the bundle (I know elastic in itself is pretty darn fast), but I've come across a small problem that may actually be easy to solve, if only the bundle's documentation were more verbose. My actual question is simply how to, instead of returning an array of Doctrine objects (which I believe are