Questions tagged [elastica]

Elastica is a PHP client for the elasticsearch full-text search and analytics engine.

Introduction

Elastica is open source and you can download or clone the source code on Github from ruflin/Elastica.

You can find the complete API here.

Requirements

Elastica v.0.20.5 require PHP 5.3 >=, for using Elastica on PHP 5.2 let see Elastica v0.19.8

Download

You can download this project in either zip or tar formats.

The prefered way is to clone Elastica with Git by running:

$ git clone git://github.com/ruflin/Elastica

Composer

You can also install Elastica by using composer:

{
    "require": {
       "ruflin/Elastica": "dev-master"
    }
}
257 questions
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
2 answers

Applying Cursors pagination in elasticaserch

Im new to elasticasearch and trying to apply the cursor paginatoin seen in facebook, twitter for my api. Is there a way to apply that throw filters, aggregations i already tried a couple queries but the issue that i can reserve the order of the…
AboElzooz
  • 309
  • 4
  • 16
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

Elasticsearch update same document simultaneous results in VersionConflictEngineException

My workers process objects and the write them to mysql and elasticsearch, now it happens that 2 (or multiple workers) process similar objects and update the same ES document. Resulting in the following error: VersionConflictEngineException[[test][4]…
Katch
  • 170
  • 1
  • 20
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
3
votes
2 answers

How to properly run a _count_ query using Elastica?

I've been putting together our search implementation using ElasticSearch and Elastica (http://elastica.io/). Currently I am having trouble figuring out how to execute a count search, as is spoken about in ElasticSearch's Count API. Can anyone clear…
Spot
  • 7,962
  • 9
  • 46
  • 55
3
votes
1 answer

ElasticSearch Nested Range Filter

I am attempting to construct an ElasticSearch query and am not getting the results I expect. Any help would be really appreciated! Mapping Details: I have indexed documents representing volunteer opportunities. Within each opportunity are fields…
Keith Morris
  • 275
  • 2
  • 9
3
votes
1 answer

How to connect MongoDB with Elastic Search using the ES plugin MongoDB river via Elastica

i'm new to programming, so i apologize, if my question is very simple. First of all, I have installed and configured MongoDB and ES with MongoDB river, but i can't find how to do it via Elastica. My example is curl -XPUT…
3
votes
1 answer

PHP sf.1.4 Propel 1.6: memory leaking while looping results

I am working with symfony 1.4 + propel 1.6 and I want to export (index) all my user database to ElasticSearch. I have written all the script and everything is working okay, besides one problem. I make a loop that repeats about 20.000~ times and with…
jtompl
  • 1,034
  • 13
  • 16
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
2 answers

ElasticSearch group by documents field and count occurences

My ElasticSearch 6.5.2 index look likes: { "_index" : "searches", "_type" : "searches", "_id" : "cCYuHW4BvwH6Y3jL87ul", "_score" : 1.0, "_source" : { "querySearched" : "telecom", } }, { "_index" :…
L01C
  • 578
  • 1
  • 8
  • 25
2
votes
1 answer

Unrecognized option "mappings" under "fos_elastica.indexes.app.types.user"

I use symfony with fos elastica bundle. I'm trying add mappings like in this tutorial https://www.codevate.com/blog/14-implementing-search-as-you-type-autocomplete-with-elasticsearch-and-symfony but, got this error: Unrecognized option "mappings"…
user10567054
2
votes
1 answer

Service "fos_elastica.finder.app.user" not found

Symfony can't find service for fos_elastica Service "fos_elastica.finder.app.user" not found: even though it exists in the app's container, the container inside "App\Controller\DevController" is a smaller service locator that only knows about the…
user10567054
2
votes
1 answer

Circular reference detected when using fos:elastica:populate

I was until now using the Groups annotation to serialize and populate my Elastic search index, and it was working fine as it was only using the fields in the group "elastica", and only for the Entities listed in my fos_elastica.yml. So I could…
Jb R.
  • 115
  • 1
  • 6
2
votes
1 answer

Filtering global aggregation in Elastica

I have elastic query built with ruflin/Elastica, with global aggregation. Is it possible to somehow add some filters to it, separate from my main query. It looks like so: $query = new Query($boolQuery); $categoryAggregation = new…
galdikas
  • 1,609
  • 5
  • 19
  • 43
1 2
3
17 18