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

Symfony Elastic mapping

I have mapping for entity for field "skills" * @ORM\Column(name="skills", type="array", nullable=true) * @Groups({"for_profile_project"}) */ private $skills = []; elastic config (this is my all config postebin) teams: indexes: profile: …
shuba.ivan
  • 3,824
  • 8
  • 49
  • 121
0
votes
2 answers

FOSElasticaBundle search date range

i try search date range with FOSElasticaBundle $query = new MatchAll(); $now = date('Y-m-d'); $rangeLower = new Filtered( $query, new Range('visibleFrom', array( 'gte' => $now )) ); $rangeUpper…
Developer
  • 2,731
  • 2
  • 41
  • 71
0
votes
2 answers

Symfony Terminal fos elastic populate

I need run command in service app/console fos:elastica:populate --no-reset --index=profile --type=team by terminal all work fine but I need run in service $application = new \Symfony\Bundle\FrameworkBundle\Console\Application($this->kernel); …
shuba.ivan
  • 3,824
  • 8
  • 49
  • 121
0
votes
1 answer

FOSElasticaBundle Update Nested Entity

Why I have empty nested entity? I have index talent. In database talent have nested user and when Now, when I update or create a talent, it not will be updated as a nested object in ElasticSearch and I don't understand why ? fos_elastica: clients: …
shuba.ivan
  • 3,824
  • 8
  • 49
  • 121
0
votes
1 answer

Elasticsearch: no such index - Symfony FOS/elastica-bundle

I try to get first experiences with Elasticsearch. Therefore I build a simple web app with Symfony and used the FOSElasticaBundle for Elastica integration. Now when i try to populate the index via the console i get the following error: [2015-12-17…
Jupdi
  • 23
  • 7
0
votes
1 answer

Search different date format in elastic search

I've indexed a date column from my mysql database with the following configuration mappings: first_name: { boost: 5 , type: string, index: not_analyzed } last_name: { boost: 5, type:…
wnoveno
  • 546
  • 3
  • 9
  • 25
0
votes
1 answer

FosElasticaBundle and race condition

I'm using Elastic Search with FOSElasticaBundle, when I add a new object in MongoDB database, the Elastic listener fires and indexes it. My problem is when I add the new object and page where you can see all objects is refreshed and, sometimes,…
0
votes
1 answer

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

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…
Francesco Abeni
  • 4,190
  • 1
  • 19
  • 30
0
votes
2 answers

Allowing case-insensitive search with snowball_analyzer in Elasticsearch

First of all I'm completly new to ES. I created ES search criteria below for searching items which works fine but what I now need is, I want to turn make field into case-insensitive so that the search result would be the same for hello, HeLlo, HELLO…
BentCoder
  • 12,257
  • 22
  • 93
  • 165
0
votes
2 answers

Elasticsearch implementing sort by field and direction

I've been reading the documentation and other example posts since yesterday to work out how to add sort by field and the direction to my current query array here but so far no luck. I've seen examples like {"sort": {"_score": "desc"}, "query": {…
BentCoder
  • 12,257
  • 22
  • 93
  • 165
0
votes
1 answer

Elastica PHP Query Where Or

How to make a WHERE categoryId = 1 OR categoryId = 2 query with Elastica ? I'm doing this but I got 0 result : $query = new \Elastica\Query(); $boolOr = new \Elastica\Filter\BoolOr(); $boolOr->addFilter(new…
Siol
  • 311
  • 8
  • 21
0
votes
1 answer

Create FOSElasticaBundle action in controller

I decided to deal with ElasticSearch. Immediately faced with the problem of writing action in the controller. Here is my configuration. Can someone write a small example of how to use this bundle for these fields fos_elastica: clients: default:…
qqq
  • 11
  • 6
0
votes
0 answers

Found Elasticsearch with Aliased Index with Routing

We have multiple organization having identical structure of records in Database. We are using ES with aliased index and routing features for each organization. Now, when we clear the ES index and start with clean state, then search records is coming…
joy d
  • 408
  • 2
  • 13
0
votes
1 answer

Elasticsearch and symfony search for a part of a word

I'm quite new to Elastic Search, maybe you can help me: So, I have symfony and Elasticsearch (FOSElasticaBundle). If I'm searching for a full word in title - everything is working (for example if I type "hello", I will get results where "hello"…
Aleksandr
  • 91
  • 10
0
votes
1 answer

FOS elastica ordering results by datetime

I'm ordering FOS elastica search results by datetime field in database. The elastica.yml has this property set on mapping: startsAt: { type: date, format: Y-m-d H:i:s } But on populate i get this: [Elastica\Exception\ResponseException] …
3ND
  • 430
  • 1
  • 6
  • 17