Category : elasticsearch

I’m indexing a list of schools, each one can offer courses in several languages. I’m using FOSElasticaBundle in a Symfony 4 project. This is my fos_elastica.yaml : fos_elastica: indexes: school_ndx: index_name: school_ndx types: etablissement: persistence: driver: orm model: AppEntitySchool properties: languages: { property_path: myFuncLanguages } And this is the myFuncLanguages : public function myFuncLanguages() { ..

Read more

I encounter a problem in my production site in Symfony 4.2.8 (yes I know…). When I try to launch a bin/console fos:elastica:populate or bin/console fos:elastica:reset the console crash (with -vvv option) : Exception trace: () at /var/www/current/vendor/ruflin/elastica/lib/Elastica/Transport/Http.php:190 ElasticaTransportHttp->exec() at /var/www/current/vendor/ruflin/elastica/lib/Elastica/Request.php:194 ElasticaRequest->send() at /var/www/current/vendor/ruflin/elastica/lib/Elastica/Client.php:689 ElasticaClient->request() at /var/www/current/vendor/friendsofsymfony/elastica-bundle/src/Elastica/Client.php:58 FOSElasticaBundleElasticaClient->request() at /var/www/current/vendor/ruflin/elastica/lib/Elastica/Client.php:721 ElasticaClient->requestEndpoint() at /var/www/current/vendor/ruflin/elastica/lib/Elastica/Index.php:586 ElasticaIndex->requestEndpoint() at /var/www/current/vendor/ruflin/elastica/lib/Elastica/Index.php:225 ..

Read more

EAV – product model I’m making a smart filter and I’m done with everything. But not all values need to be counted, such as width, height, depth. And that’s exactly what I can’t do Here’s my config: fos_elastica: clients: default: { url: ‘%env(ELASTICSEARCH_URL)%’ } indexes: product: properties: unitPrice: type: integer discount: type: keyword attributeValues: type: ..

Read more

Here is my code to make aggregations : public function getNbContributions(ParamFetcher $paramFetcher) { $index = $this->client->getIndex($this->container->getParameter(‘nuxeo_doc_index’)); $query = new ElasticaQuery(); if ($paramFetcher->get(‘periode’) != null) { $histogramInterval = ”; if (strtolower(trim($paramFetcher->get(‘periode’))) == ‘a’) { $histogramInterval = ‘year’; } else if (strtolower(trim($paramFetcher->get(‘periode’))) == ‘m’) { $histogramInterval = ‘month’; } else if (strtolower(trim($paramFetcher->get(‘periode’))) == ‘s’) { $histogramInterval = ..

Read more

Each entry in my elasticsearch server has this form : { "_index": "nuxeo_doc", "_type": "doc", "_id": "ce8ac97d-0376-49b1-b665-cac98081b5d5", "_version": 1, "found": true, "_source": { "titre": "Nuxeo GDPR Brochure.pdf", "rating": 0, "repository": "default", "uuid": "ce8ac97d-0376-49b1-b665-cac98081b5d5", "nbr_comment": "0", "file": { "mime-type": "application/pdf", "name": "Nuxeo GDPR Brochure.pdf", "digest": "7c874ecf777bcad8bc64f1590522e07e", "length": 371567, "encoding": "" }, "date_modify": "2020-07-30T11:47:01.922Z", "tag": [‘tag_1’, ‘tag_2’], ..

Read more

I am using elastic search elasticsearch:6.8.4 on fos in Symfony 4.4 by friendsofsymfony/elastica-bundle": "^5.0" I am facing an issue with sort field with config in fos_elastica.yaml. My config like: user_first_name_sort: {type: icu_collation_keyword, language: nb, index: true} This work fine for Norwegian language as expected. But, word aa elastich search consider as å when sorting How ..

Read more