robottokauf3 / meilisearch-elixir Goto Github PK
View Code? Open in Web Editor NEWElixir client for MeiliSearch
License: MIT License
Elixir client for MeiliSearch
License: MIT License
Currently, only v0.20 is tagged, while the package is v0.25.2. That affects hex.pm and creates an illusion of an abandoned package.
cc @robottokauf3
Hi there @robottokauf3! Would you care to update the version of meilisearch on hex?
That would be great!
I see no commits since September, and no-one is replying to #2. So I wanted to know if it is still maintained, and is it stable enough to be used in prod?
Hi @robottokauf3, I work for Meilisearch as the Integrations team manager, and I would like to offer my help (and personal time) to help upgrade this library to support the new versions of Meilisearch.
If you think that's a good idea, we can work together to upgrade this package :)
Meilisearch.Index => Meilisearch.Indexes
Meilisearch.Document => Meilisearch.Documents
There may be more ..
Thanks for creating this awesome library. Would you consider switching the HTTP client from httpoison to finch? Reasons include:
If you're open to this then I'd be happy to submit a pull-request updating the Meilisearch.HTTP
to use Finch. Thanks.
How do you configure the master key? I didn't see it in the docs. I tried this:
config :meilisearch,
api_key: System.get_env("MEILI_MASTER_KEY")
I'm pretty sure I'm getting that value at runtime but getting this back when I do the search: {:error, nil, :econnrefused}
So when I insert 12296 documents using this query below, localhost:7700
shows me 12296 items.
but if I un-comment
# chan_uuid: c.id,
# chan_readable_id: c.readable_id,
# chan_name: c.name,
# chan_description: c.description,
I see 0 items
in the meilisearch web ui.
I am certain I am always passing add_or_replace() 12296 items.
I am not sure if this is related to the elixir module or not to be honest.
I am certain this join works in SQL(12296 items):
CREATE VIEW media_items_joined AS
SELECT items.id,
items.title,
items.artist,
items.presenter_name,
items.presented_at,
items.published_at,
items.updated_at,
items.localizedname,
items.language_id,
items.source_material,
items.description,
items.media_category,
items.media_format,
items.tags,
items.filepath,
items.cdn_path,
items.readable_id,
items.duration,
items.size_bytes,
items.width,
items.height,
items.view_count,
items.like_count,
items.dislike_count,
plist.id AS playlist_uuid,
plist.readable_id AS playlist_readable_id,
plist.name AS playlist_basename,
chan.id AS channel_uuid,
chan.readable_id AS channel_readable_id,
chan.name AS channel_basename,
org.id AS org_uuid,
org.readable_id AS org_readable_id,
org.basename AS org_basename,
org.shortname AS org_shortname
FROM mediaitems AS items
LEFT JOIN playlists AS plist ON items.playlist_id = plist.id
LEFT JOIN channels AS chan ON plist.channel_id = chan.id
LEFT JOIN orgs AS org ON chan.org_id = org.id;
elixir seed.exs code follows:
alias FaithfulWord.Repo
alias FaithfulWord.Schema.{MediaItem, Playlist, Org}
alias FaithfulWord.Channels.Channel
import Ecto.Query
import Meilisearch.Indexes
import Meilisearch.Documents
Meilisearch.Indexes.delete("mediaitems")
Meilisearch.Indexes.create("mediaitems")
# returns 12296 list items
mediaitems =
from(mediaitem in MediaItem,
left_join: p in Playlist,
on: mediaitem.playlist_id == p.id,
left_join: c in Channel,
on: p.channel_id == c.id,
left_join: o in Org,
on: mediaitem.org_id == o.id,
select: %{
id: mediaitem.id,
readable_id: mediaitem.readable_id,
title: mediaitem.title,
description: mediaitem.description,
comment: mediaitem.comment,
tags: mediaitem.tags,
artist: mediaitem.artist,
media_format: mediaitem.media_format,
media_category: mediaitem.media_category,
source_material: mediaitem.source_material,
presented_at: mediaitem.presented_at,
presenter_name: mediaitem.presenter_name,
duration: mediaitem.duration,
size_bytes: mediaitem.size_bytes,
cdn_path: mediaitem.cdn_path,
view_count: mediaitem.view_count,
like_count: mediaitem.like_count,
dislike_count: mediaitem.dislike_count,
playlist_uuid: p.id,
playlist_readable_id: p.readable_id,
playlist_name: p.name,
playlist_description: p.description,
# chan_uuid: c.id,
# chan_readable_id: c.readable_id,
# chan_name: c.name,
# chan_description: c.description,
org_uuid: o.id,
org_readable_id: o.readable_id,
org_shortname: o.shortname,
org_basename: o.basename
})
|> Repo.all()
Meilisearch.Documents.add_or_replace("mediaitems", mediaitems)
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.