Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Implementação De Um Mecanismo De Busca Textual ...

Implementação De Um Mecanismo De Busca Textual Na Plataforma Libreflix Usando Elasticsearch

Guilmour Rossi

December 05, 2018
Tweet

More Decks by Guilmour Rossi

Other Decks in Programming

Transcript

  1. Implementação De Um Mecanismo De Busca Textual Na Plataforma Libreflix

    Usando Elasticsearch Recuperação Inteligente da Informação Guilmour Rossi
  2. 6 ElasticSearch • Servidor de buscas distribuído • Feito em

    cima do Apache Lucene • Buscas Full-Text • Orientado a documentos • Schema-Free • RESTful API • Escrito em Ja… va
  3. 9 Relevância “Lucene (and thus Elasticsearch) uses the Boolean model

    to find matching documents, and a formula called the practical scoring function to calculate relevance. This formula borrows concepts from term frequency/inverse document frequency and the vector space model but adds more- modern features like a coordination factor, field length normalization, and term or query clause boosting.” https://www.elastic.co/guide/en/elasticsearch/guide/current/scoring-theory.html
  4. 12 GET http://localhost:9200/db/movies/_search { “query”:{ “bool”:{ “must”:{ “term”:{ “title”: “Matrix”

    } } } } } { “took”: 24, . . . “hits”: { “total”: 3, “max_score”: 3.4788452, “hits”:[ . . . ] } }
  5. 15 Libreflix • NodeJS • MongoDB 600+ filmes cadastrados 250+

    filmes disponíveis indexados por ora ← 20000+ contas de usuário
  6. 16 Mongo para ElasticSearch https://code.likeagirl.io/5-different-ways-to-s ynchronize-data-from-mongodb-to-elasticsearch-d 8456b83d44f - Dados que

    já estavam no banco. - Novos dados a serem inseridos https://github.com/yougov/mongo-connector https://github.com/compose/transporter
  7. 17

  8. 18