GithubHelp home page GithubHelp logo

handcraftedinthealps / elasticsearchbundle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ongr-io/elasticsearchbundle

17.0 17.0 10.0 2.38 MB

Fork of ongr-io/ElasticsearchBundle providing Symfony 5 support

License: MIT License

PHP 86.75% Twig 13.25%

elasticsearchbundle's People

Contributors

adrienbrault avatar alexander-schranz avatar asev avatar brammers avatar chs2 avatar chyzas avatar dvondrak avatar einorler avatar fattouchsquall avatar grandltu avatar ivannis avatar juliensantos87 avatar kmiladi avatar linasmo avatar ltrocky avatar luca-rath avatar makasim avatar mvar avatar ndinh215 avatar nibsirahsieu avatar norkunas avatar prokyonn avatar saimaz avatar tautrimas avatar tomaspocevicius avatar toooni avatar trylika avatar weburnit avatar xwb avatar zylius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

elasticsearchbundle's Issues

Undefined index: multiple

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

ES 7.* deprecation notice on query

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

Fix failing Elasticsearch 7 tests

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.

Bundle 'App' does not exist.

Staring from Symfony 4, bundle conception has been rejected and is no longer used so how can I create mappings without it?

  • Symfony 5.1
  • ElasticSearch 7.1
  • This bundle 5.2.6.6

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.