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
2
votes
0 answers

FOS Elastica how to apply indexable_callback for level 2 entities?

Let's say, I have a "book" and an "author" entity; Then entity book has a getPublic() method that that returns "true" if the book is public. In the mapping config I use book: types: book: …
GGTT
  • 112
  • 8
2
votes
0 answers

Cannot find corresponding Doctrine objects

I'm using SF5 with the latest FosElastica bundle. I have 2 entities with a OneToMany relation. entity User 1 -> x Groups my fos_elastica.yaml looks like: fos_elastica: clients: default: { url: '%env(ELASTICSEARCH_URL)%' } indexes: …
Sancho
  • 1,288
  • 2
  • 25
  • 50
2
votes
1 answer

Fos elastica filter results with an array "record id's"

I have a SQL table that has many records. When I search, I do not want to use all the results, but I want it to be among the ids I want. I added 'term' to this and added 'addMust' to boolQuery. But there is no result. 'addShould' as I add, without…
2
votes
1 answer

Foselasticabundle : method returns empty results

I use Elasticsearch with Foselasticabundle to search in my Symfony app, but it returns empty results. This is my config and search method: foselasticbunde.yml: indexes: search: finder: ~ client: default …
MHZarei
  • 133
  • 1
  • 7
2
votes
0 answers

FOSElasticaBundle user indexes

I'm using symfony and elasticsearch with FOSElasticaBundle. I've got 2 entities: User, and UserItems. Is there a way to create a own index for each user automatically? so each logged in user can only search his own index (UserItems). Thanks in…
Marc Geurts
  • 39
  • 1
  • 6
2
votes
2 answers

FOSElasticaBundle not populating searchableDocuments in AWS ElasticSearch

I am trying to get FOSElasticaBundle working on AWS ElasticSearch. At the moment I have my development env all set up and working perfectly using Docker containers for ElasticSearch using FROM…
bateman_ap
  • 1,911
  • 7
  • 28
  • 41
2
votes
0 answers

Call ElasticaBundle Finder and Index in a Service

On my project I use FOSElastica to filter many entities, then I use the same portion of code on many pages: $query = ('' !== $request->get('q') && null !== $request->get('q')) ? $request->get('q') : null; $teamId = ('' !==…
mpiot
  • 1,482
  • 2
  • 15
  • 36
2
votes
1 answer

elasticsearch - where fields is null

I'm trying to write query (with foselastica bundle) where value should be some id or can be null. In mysql: WHERE city.id = 1 OR city.id IS NULL I know that I should use exists and must not expression, but not working for me. Any advice? $query…
2
votes
1 answer

Asciifolding not working with FOSElasticabundle

I'm using serializer to get fields, and stempel plugin for Polish language search for elasticSearch. Trying to get something like in this example, but without…
2
votes
3 answers

Resetting indexes with ruflin/elastica throws HttpException on heroku

I'm using elasticsearch in a Symfony project with FOSElasticaBundle, that requires ruflin/elastica client. In order to create indexes I use the command suggested in the documentation of FOSElasticaBundle and in my local machine everything is going…
2
votes
4 answers

elasticsearch index deleted

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…
GregOs
  • 403
  • 3
  • 13
2
votes
1 answer

Interface and Traits does not work properly

This is some weird behaviour I witnessed today and I wonder why.. I`ll get straight to the point: So we are using a2lix translations with symfony and fos elasticabundle class Class { use Translatable; } class ClassTranslation implements…
Filchev
  • 224
  • 1
  • 12
2
votes
0 answers

How to use highlight_query with Elastica / FOSElasticaBundle?

I'm new to Elastica and I'm searching for a way to highlight nested query results with highlight_query. I checked the code and $query->setHighlight() accepts only an array as a parameter. Maybe there's another way to achieve this result using…
unadivadantan
  • 363
  • 4
  • 14
2
votes
0 answers

FOSElasticaBundle disturbs lifecyle events

I have installed FOSElasticaBundle to handle search and used the following configuration: fos_elastica: clients: default: { host: localhost, port: 9200 } indexes: search: client: default types: …
Adib Aroui
  • 4,981
  • 5
  • 42
  • 94
2
votes
1 answer

FOSElasticaBundle mapping array

I try add mapped field to elastica mapping config: persistence: driver: orm model: PlaceBuundle\Entity\Place finder: ~ provider: ~ listener: ~ ..... …
Developer
  • 2,731
  • 2
  • 41
  • 71
1 2
3
16 17