handcraftedinthealps / elasticsearchbundle Goto Github PK
View Code? Open in Web Editor NEWThis project forked from ongr-io/elasticsearchbundle
Fork of ongr-io/ElasticsearchBundle providing Symfony 5 support
License: MIT License
This project forked from ongr-io/elasticsearchbundle
Fork of ongr-io/ElasticsearchBundle providing Symfony 5 support
License: MIT License
When indexing a large set of documents in a cycle i see that memory usage grows every time i call manager->persist($document);
When using an Propery(type="object") a notice is thrown in the Result converter:
Notice: Undefined index: multiple
handcraftedinthealps/elasticsearch-bundle/Result/Converter.php:109
PHP 7.4
ES: 7.12
Bundle: 5.2.6.8
Need to update doctrine annotation for sulu article bundle for sulu 2.5.7 :)
It will be great if you add symfony 6 support
When using the newest version of the bundle an error occurs when searching for a document matching something (in our case it's a simple where something_id = 1) the following error can be seen in logs
Deprecation ["299 Elasticsearch-7.8.0-757314695644ea9a1dc2fecd26d1a43856725e65 "[types removal] Specifying types in search requests is deprecated.""]
Should happen with $document = $repository->findOneBy(['whatever_id' => 5]);
PHP 7.4.14
ES 7.8.0 (docker)
Bundle 5.2.6.8
Currently the Test Setup is created for Elasticsearch 5 which supports multiple Types and other features which where removed in newer Versions.
We did introduce a tests with ES 7 in: #19
They currently will fail because of this kind of features. We would need to investigate here some time to decide which tests are needed for ES7 and which are ES5 only tests.
Staring from Symfony 4, bundle conception has been rejected and is no longer used so how can I create mappings without it?
ongr_elasticsearch.yaml
ongr_elasticsearch:
managers:
default:
index:
index_name: book
hosts:
- '%env(ELASTICSEARCH_URL)%'
mappings:
- App
services.yaml
services:
_defaults:
autowire: true
autoconfigure: true
bind:
$manager: '@es.manager'
BookController.php
class BookController extends AbstractController
{
/**
* @Route("/book_popularity", methods={"GET"})
*/
public function getPopularBooks(Request $request, Manager $manager)
{
$repo = $manager->getRepository(Book::class);
$search = $repo->createSearch();
$query = new TermQuery('title', 'Harry Potter');
$search->addQuery($query);
$result = $repo->findDocuments($search);
return new JsonResponse($result);
}
}
Book.php
/**
* @ES\Document(type="ms_card_event")
*/
class Book
{
/**
* @ES\Property(type="text")
*/
protected string $title;
// constructor, getter & setterr
}
Without mapping I don't getting any results.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.