Questions tagged [foselasticabundle]

FOSElasticaBundle - Elasticsearch PHP integration for your Symfony2 project using Elastica.

Elasticsearch client is comparable to a database connection. Most of the time, you will need only one.

Elastica can handle objects instead of data arrays if a serializer callable is configured

Elasticsearch index is comparable to Doctrine entity manager. Most of the time, you will need only one.

Elasticsearch type is comparable to Doctrine entity repository.

If you are using the JMSSerializerBundle for serializing objects passed to elastica you can define serializer groups per type.

241 questions
4
votes
1 answer

Unknown key for a VALUE_STRING in [index]

I'm trying to find a way where I can build my $params array using the native syntax to search for a post which name is equal to 'test': $params = [ "index" => "post_index", "type" => "post", 'body' => [ 'query' => [ …
famas23
  • 2,072
  • 4
  • 17
  • 53
4
votes
0 answers

Symfony Elasticsearch Integration (FOSElasticaBundle)

I am busy implementing elasticsearch for a customer project. Elasticsearch seems pretty powerful and has a neat API. Integrated with FOSElasticaBundle i have the following configuration: fos_elastica: clients: default: host: localhost …
fredtro
  • 63
  • 7
4
votes
1 answer

Optional Self-Parent Relation in Elasticsearch

I have a Symfony2 project, and I'm trying to implement a search feature using Elasticsearch. My problem is, I need to index an entity with an optional self-relation. It means that my Item entity has a "parent" field, referencing another Item. In…
TiPi
  • 330
  • 4
  • 19
4
votes
0 answers

FOSElasticaBundle Created/Update upload Nested Entity

Help somebody Who knows, fosElasticaBundle not upload nested entity, why ?? I have question, when I create talent in elastic don't upload nested entity but when EDIT this talent - nested field upload in elastic. Why if create talent nested not…
shuba.ivan
  • 3,824
  • 8
  • 49
  • 121
4
votes
1 answer

Sorting in FOSElasticaBundle

I use FOSElasticaBundle in my project to search on my Player entity. As i only want to search entities with the property isactive on a value 1, i followed the documentation on "Filtering Results and Executing a Default Query":…
Fabian
  • 1,806
  • 5
  • 25
  • 40
3
votes
0 answers

How to index files from a directory with FOSElastica, without a Doctrine entity

I would like to index in a Elastic instance the files (mainly images) from an upload directory. I'm using the FOSElastica bundle for Symfony 4. Now I know how to do this by having a Doctrine Image entity, and I succesfully created virtual properties…
Jackano
  • 61
  • 3
3
votes
2 answers

How to use ingest pipelines on already indexed documents?

I've been using FOSElasticaBundle to index my documents (which are entities from a Symfony project kept in a db through Doctrine) into Elastic Search. FOSElastica does an automatic mapping and index after that all the documents. The problem is that…
Malcom HAMELIN
  • 305
  • 1
  • 3
  • 11
3
votes
1 answer

simple match query with Elastica QueryBuilder

I try lot of thing for executing a simple Match value request in ElasticSearch with PHP - Elastica library (FosElasticaBundle). But nothing run. Do you have a idea for run correctly this kind of code : $match = new…
miltone
  • 4,416
  • 11
  • 42
  • 76
3
votes
1 answer

FOSElasticaBundle: Is it possible to change "query_builder_method" in controller?

According to FOSElasticaBundle documentation it is possible to configure application to use custom query builder method like this: user: persistence: elastica_to_model_transformer: query_builder_method:…
Jakub Matczak
  • 15,341
  • 5
  • 46
  • 64
3
votes
3 answers

FOSElastica why my result is not serialized?

I have configured FOSElasticaBundle as follow: fos_elastica: clients: default: { host: %elasticsearch_host%, port: %elasticsearch_port% } serializer: ~ indexes: app: types: tags: …
vardius
  • 6,326
  • 8
  • 52
  • 97
3
votes
1 answer

Symfony 2 FOSElasticaBundle : elastic search documents are not automatically synchronized with entities : need to run ' fos:elastica:populate'

I am working with FOSElasticaBundle on a basic entity nammed 'Foobar'. I have defined 1 index nammed 'foobar' with 2 types 'foobar_published' and 'foobar_draft'. The problem is that my Foobar entities are not automatically synchronized with elastic…
ben.IT
  • 1,490
  • 2
  • 18
  • 37
3
votes
1 answer

elastica search how to convert Elastica\Result to actual doctrine object

I am using FOSElasticaBundle with symfony2 and doctrine 2. I have trouble understanding how to retrieve actual doctrine objets from a search result. I am under the impression that it is the default behaviour but I get this kind of result…
Sébastien
  • 5,263
  • 11
  • 55
  • 116
3
votes
2 answers

Unit testing Symfony application using FOSElasticaBundle without an ES Server?

I have an application with an existing set of unit tests which are using SQLite as the DB. I have recently added search capabilities via ES which have replaced many of the endpoint actions that used to query the DB directly. I want to test all of…
Jason McClellan
  • 2,931
  • 3
  • 23
  • 32
3
votes
0 answers

FOSElasticaBundle to filter out entity with certain property

I have setup FOSElasticaBundle that indexes InstagramShopPictures, which has the following property: class InstagramShopPicture { /** * @var integer $id * * @ORM\Column(name="id", type="integer") * @ORM\Id *…
adit
  • 32,574
  • 72
  • 229
  • 373
2
votes
1 answer

FOSElasticaBundle configuration with Symfony 5 and AWS Elasticsearch

I am trying to connect to an AWS Elasticsearch domain using FOSElasticaBundle (version v6.0.0-beta4). According to the documentation, this bundle uses ruflin/Elastica bundle. After researching the documentation and the related questions here, I…
1
2
3
16 17