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
0
votes
1 answer

adding offset to elastic search query

I have the following code: $pictureQuery = new \Elastica\Query\MultiMatch(); $pictureQuery->setParam('query', $queryString); $pictureQuery->setType('phrase_prefix'); $pictureQuery->setParam('fields', array( …
adit
  • 32,574
  • 72
  • 229
  • 373
0
votes
1 answer

symfony2 FOSElasticaBundle : how to postpone document updating when elasticsearch service is down?

I am using symfony2 and FOSElasticaBundle. My elasticsearch service often gets killed or fails for a still unknown reason. I've put systemctl in place with restart always as a temporary fix. Still, if down, the elasticsearch listener which performs…
Sébastien
  • 5,263
  • 11
  • 55
  • 116
0
votes
1 answer

fos elastica populate is looping forever

i don t know what is going on with fos elastica : when i try to index my entities if shows the following result : hey@dotme:/var/www/v2-preprod/httpdocs/current# php app/console fos:elastica:populate 0/438 [>---------------------------] …
Charles-Antoine Fournel
  • 1,713
  • 1
  • 25
  • 37
0
votes
1 answer

Autocomplete with Elasticsearch

I’m trying to use Elasticsearch to index a city database and get autocomplete on a field. Here is my FOSElasticaBundle configuration : fos_elastica: indexes: xxxxxxx: settings: index: …
Sylvain
  • 2,742
  • 5
  • 21
  • 34
0
votes
1 answer

Can you have two or more types defined in different indexes for the same entity?

I’m using Elasticsearch 0.9 with FOSElasticaBundle 3.0.0.alpha6 and Symfony 2.5.10. Will FOSElastica Listener keep all indexes updated? Can I define different listener services for each environment? I'm asking to see if I can use different indexes…
Ben Stinton
  • 411
  • 2
  • 8
  • 17
0
votes
1 answer

ElasticSearch highlights results repeats snippets

I'm using FOSElasticaBundle to index ES documents with this config: index: analysis: analyzer: custom_analyzer: type: custom tokenizer: nGram filter: [stopwords, asciifolding…
Lionel
  • 387
  • 3
  • 18
0
votes
1 answer

Use elastica with PagerFanta and dynamic querybuilder

I have an application with symfony2 / doctrine 2 / elastica / fosElasticaBundle / pagerFanta. I want to use a custom and dynamic queryBuilder in combination with pagerfanta and elastica. Not to transform the results but to prefilter them. So far I…
Sébastien
  • 5,263
  • 11
  • 55
  • 116
0
votes
1 answer

FOSElasticaBundle sort not working

The configuration of my elastica type looks like following: acme_article: mappings: title: {type:string, index_analyzer:acme_analyzer} content: {type:string,…
Srdjan
  • 432
  • 4
  • 11
0
votes
1 answer

Elasticsearch - foselastica Sorting by integer having strange results

i want to sort my result of companies based on the count of nested (employment)objects, i added an extra field to the company entity that holds the count like: private employeeCount; getEmployeeCount(){ return count($this->employments); } and…
john Smith
  • 17,409
  • 11
  • 76
  • 117
0
votes
3 answers

Count query with PHP Elastica and Symfony2 FosElasticaBundle

I'm on a Symfony 2.5.6 project using FosElasticaBundle (@dev). In my project, i just need to get the total hits count of a request on Elastic Search. That is, i'm querying Elastic Search with a normal request, but through the special "count"…
Ninj
  • 1,492
  • 1
  • 15
  • 27
0
votes
0 answers

foselasticabundle nested conditional search

here is my config fos_elastica: clients: default: { host: localhost, port: 9200 } indexes: allstock: types: clip: mappings: clipInfo: …
Anil Gupta
  • 2,329
  • 4
  • 24
  • 30
0
votes
1 answer

FOSElasticaBundle: prioritizing followers in user search

I've got symfony2 project set up with elastica via FOSElasticaBundle. I've got indexing set up for User document(Mongo) using basic settings. Now when I do a search for users I'd like that search to be prioritized by specified user's followers (to…
impiix
  • 46
  • 6
0
votes
1 answer

Elastic search query for two fields

I'm trying to write a query for some products. Products have two fields, title and description. I'd like to write a query that passes in some text and returns to me products with matching text. I'd like all the products that have a match in the…
Derick F
  • 2,749
  • 3
  • 20
  • 30
0
votes
1 answer

How to sort elasticsearch results by distance?

I'm using elasticabundle for symfony2 and I want to sort results I'm seeking by distance I'm new to elasticsearch and I don't know how I can start the query I'm using : $c =…
Aysennoussi
  • 3,720
  • 3
  • 36
  • 60
0
votes
1 answer

Proper way to apply custom analyzers to fields with elastic search, apply multiple analyzers to one field or multiple fields with single analyzers?

EDIT: Added my current query to the end I have a large database of human names and am using elastic search (via symfony2's FOSElasticaBundle and Elastica) to do smarter searching of the names. I have a full name field, and I want to index the…
Pez
  • 1,251
  • 16
  • 32