About this video
What You'll Learn
- Create indexes and import documents through Meilisearch's REST API endpoints.
- Tune searchable attributes, ranking rules, and synonyms in the settings API.
- Use faceted search plus dumps and snapshots for filtering and backups.
Frédéric Harper and Carolina Ferreira from the Meilisearch team walk through the Rust-based search engine: REST API, indexes, typo tolerance, ranking rules, synonyms, faceted search, and deployment.
Jump to a chapter
- 0:00 <Untitled Chapter 1>
- 1:01 Introduction to Meilisearch and Guests
- 2:16 What is Meilisearch?
- 2:17 What Is Melee Search
- 5:23 Is It Comparable to Elasticsearch
- 5:44 Meilisearch vs. Elasticsearch
- 8:38 Getting Started: Downloading and Running
- 8:40 Getting Started
- 9:10 First Run, Master Key, and Web UI
- 9:13 Master Key
- 12:23 Data Structure: Indexes and Documents
- 14:00 Adding Documents (Importing Data)
- 16:03 Checking Update Status
- 16:17 Check the Update Id Status
- 17:35 Basic Searching and Typo Tolerance Demo
- 21:02 Integration Methods (SDKs and Frontend Tools)
- 22:41 Deployment and Scaling (Kubernetes, Sharding)
- 22:55 Deployment Architecture
- 24:50 Configuration and Settings Overview
- 28:47 Searchable Attributes
- 30:02 Ranking Rules Explained
- 30:03 Ranking Rules
- 35:25 Faceted Search Explained
- 35:26 Attributes for Faceting
- 36:04 Demo: Modifying Settings (Searchable Attributes, Faceting)
- 46:30 Add a Synonym
- 50:49 Distinct Attribute
- 57:03 Operational Aspects: Backup and Restore (Dumps vs. Snapshots)
- 1:00:01 Q&A: Name Meaning, Embeddability, V1 Timing
- 1:04:52 Final Remarks
- 1:04:54 Conclusion and Community
Full transcript
Generated from the English captions. Timestamps jump the player to that moment.
Read the full transcript
1:01 Introduction to Meilisearch and Guests
1:01 Hello, and welcome to today's episode. Today we are gonna take a look at MeiliSearch, a search engine database written in Rust. So far it has taken all the right boxes for me and I'm really happy and excited to be exploring it today. To guide me through our MeiliSearch journey today, I am joined by two members of the Meilisearch team, Fred and Carolina. Hello and welcome. You so Thank you both very much for joining me today. I'm very excited. I think we should start with some a quick round of introductions and then we'll talk about Meilisearch and what it is.
1:38 Okay. So hello everybody. I'm Carolina. I'm junior developer advocate at Meilisearch and I'm here with, my mentor, Fred. Wow. That that is a good intro. So my name is Fred. I'm a director of developer relation at Meilisearch, which mean that, you know, I mentor Carolina. It's one of it's one of my job. Yeah. But yeah. No. Yep. Yep. That's it. Alright. Awesome. Well, why do alright. I've got I've got it. I've I've got this under control. Okay. So why don't we start off then with what is Meilisearch? Who wants to tackle that? K. Maybe search is an ultra fast and ultra
2:17 What Is Melee Search
2:26 relevant search engine built in Rust, and you can communicate to the server with through a RESTful API. It's very simple. Yeah? Yeah. I know. I was I was going to say, you know, it's it's simple. When we say search engine, it's not like it's not a replacement for Google or or I was going to say AltaVista. Like, yeah, that that that is that is saying my name, my age. But, you know, it's not a replacement for those type of search engines. It's really, like, search engine you're gonna use in your web application or website. And
3:05 the best part of it is that it's open source. But, you know, like like, we like to think that, like, it's really open source because their way of doing thing is not just to put the source code and decide everything. We include the community. We try to be transparent as much as possible for decision or having discussion with the community. So, yeah, it's it's I would say it's the next generation search API. Awesome. I mean, it's open source. If I remember correctly it's MIT license, so it's pretty a very permissive open source project which is fantastic.
3:41 I love that it's written in Rust and you said ultra fast as well. I think you know all of these things are just what we want and I'm hoping when we explore it today we're gonna see this ultra simple to set up as well. I mean, I'm assuming with it being written in Rust we're just compelling a binary and throwing it around right, it's probably there's no runtime needed, there's nothing to set up but is it really going to be that easy? Yes. It should. It it should be. It should be. Like, you can make it complicated
4:11 if you want. Like, you know, you can use it with Docker. You can compile a search for yourself if you want to. But, like, if you want to try it quickly, yeah, it's just the binary, and you're gonna make it happen. Unless unless you're not following the instruction, you're really not good, David. So that but that's a different story. Yeah. I have been known to skip a few instructions from time to time. And I I'm new to development because I come from another background. I was a teacher, so I have I didn't code for the past years. I
4:43 I it's very recent for me. And I was quite new to code. I was coding for a year or two, and I could install Meilisearch and get get it to work very, very easily. So if I can, everybody can. I swear. Awesome. I think what we'll do then is we're just gonna get started. I think we'll pull up the docs, we'll start working through it. We'll see what we can start doing with Meilisearch as we go. Before we do that, do have question and one hello. So Peter says, good afternoon. Hey Peter. Thanks for joining us. Hello Peter. Hi.
5:20 And we have a question from Jared. Is it comparable to Elasticsearch? Is this a question you get a lot? Yes. Yeah. In our documentation, there is a section where we Yes. So what's it? I mean, we can build up the docs and take a look at the answer as well. But is there a one word answer? Yes or no here? Is it do people use this to replace Elasticsearch? Yes and no. In the sense it's like we we yeah. Yeah. It's it's a little more complicated than just yes and no in the sense like we are not a complete
5:44 Meilisearch vs. Elasticsearch
5:51 replacement for Elasticsearch, but for people using Elasticsearch for the search function of elastic search, like like strictly what we're it's the part we're quote unquote replacing. So I would say we're closer to a replacement to Algolia than a complete replacement to elastic search. Alright. Well, let's just get started then. Hopefully we can answer this question as we go Jared and you can can make your own decision. It depends like classic answer and technology. Yeah. Okay, let's see. Let's push the magic button. Three floating heads, one Meilisearch web page. So the next generation search API open source blazing
6:34 fast hyper relevant search engine. Sounds great to me. Are people using this and production already? Yes. Yes. Yes. So we have a we have a couple of great users. Right now the thing is that we don't have, like, a v one, so we're still really cautious about the version we're putting out there. It's still in development. So people still use this in production, but, this year, and I don't have the ATA yet, but we will launch the quote, unquote official v one version, which gonna be, like, even better than what we have right now, even faster,
7:15 and, you know, taking less resources. Alright. Thanks. Alright. Let's get the docs up then. So this is the getting started guides. Is the Elasticsearch question here, should we pull that up quickly before we start kicking the tires? There's comparison to alternatives. Thank you. Let me zoom in on that a bit as well. A little bit more real. Okay. Yeah. There's a whole section there in the documentation. So hopefully that helps the people that are having the same question. I think what you said is spot on from what I've read as well. Know, Elasticsearch does so much beyond just full text
8:01 search or text search and most of the time people are using it for that really small use case but you're bringing in all this other stuff with it and like having something that's just purpose built to do this kind thing, I think is really interesting. So that's everything. I I see some sometimes people are using Elasticsearch like you're using a shotgun to cut your picture tables and I'm like, yeah. So it it's good for use cases, but, like, more simple use cases, maybe you probably want something that is more adapted to your need and that, like, do one thing but
8:31 do it well, and probably doesn't cost the same amount of money too. Yeah. Definitely. Okay. Oh, that's the wrong page. There we go. Getting started. So in order to get this started, I mean you did mention there's containers and stuff, but I think I'm more than happy just to curl and shell this right into my system. So I'm assuming this is just gonna pull down a binary, stick it in my directory. See, I'm not even gonna read the docs, I'm just gonna run it. That's awesome. Okay. So a couple of things strike me here. No master key found. What's a what's
9:13 Master Key
9:15 a master key in this context? You can go and care. Master okay. The master keys to protect the the roots. If you want to to set it to production, you can set the master key. Okay. So this provides some sort of authentication, protections from admin endpoints or or search in general. Yeah. Okay. Yeah. Which which you don't need if you just want to test it. Yes. Makes sense to me. I also see Actics server here. I am a trying to be Rust developer these days and I have banged my head against Actics many times. So one of the things I'm now excited
9:56 for is that whenever I get stuck and I need to go see an example of how to work with Actics, gonna go to the Meilisearch code base, so that's awesome. Awesome. And then this is I think my DNS is just blocking a call to some analytics. We'll ignore that. So Actually, you make me think, like, that that should be something you I'm looking for a word, but, you accept to, like, send some stats to be more respectful about people data. It just gave me an idea to create an issue for our team. Oh, that's awesome. Yeah. It's always nice to
10:31 give that as a block telemetry or something like that. And I see we've actually got quite a lot of flags here. That I didn't even look at either. So lots of stuff. Okay. Let's get it running again and pop back over to this. Now that this is running, I'm assuming there's is there a web interface to Meilisearch? Yes. In development mode. Alright. Port seven seven zero zero. Let's see if it's running. Tada. Okay. So I haven't done anything with it yet. So I'm I'm gonna assume right now that the the UI really isn't gonna provide
11:08 me much value. Is that a fair assumption? It is. It is. And and you know what? Let's be honest. Even even when you're gonna have data data, out of the box right now, this is not the most sexy dev portal. The good news is that we just hired a designer. She started actually last week, and she is amazing. So she will give some love to those interfaces that are obviously made by developers. How big is the Meilisearch team at the moment? We are 13. 13. Nice. And soon, 14. Okay. So Yeah. The team the team's gonna
11:53 grow pretty fast in the next year. The company is is, like, it's working well. We're still a small startup beginning, but the product got a lot of traction, so it's it's going in the right direction. Yeah. Definitely. I mean, I think it's just one of these technologies. I think people have been looking for alternatives to search engine and databases for a long time and I think this fits in and just fills the right gap. So I'm really excited to see what happens. But right now I'm gonna try and play with it. So it's kind of just jump straight into this
12:23 Data Structure: Indexes and Documents
12:25 add document space. So that raises a few questions from my head now, does Meilisearch have any sort of schema or is the schema inferred from the data I put into it? Do define tables? What is what is the structure of the back end? Like how do I just interact with documents and nothing else? Do I need to prepare tables and if not, maybe you can help me out. No. No. So You don't have to to create any tables. You just have indexes with documents, and that's it. So actually, when when when you create document, like, the structure of the document you're gonna
13:02 create or if you import data from a JSON file, your, structure of the document will be, taken from the JSON file or, the document on the using JSON format that it will create. So if you look at the small code box right there with ID title, so you're gonna create document that have those two those two values, ID title. Ah, okay. So I'm gonna assume that the index that I write to is just part of the URL that I post this data to, and that's probably gonna connect the dots there. So Yeah. Let's see index. You can
13:39 see index as, like, separate database or separate separate silo of documents. Yeah. Alright. Well, let's just well, I guess I should save the first thing first rather than skipping ahead. So let's do that. So create a new file superman. So what what what you can do also is that, right right before the code you copy, there is a JSON file that you can download already populated for you. If you Oh, yeah. Yeah. Just move it to JSON so you don't have to unless you really want to write some JSON, feel free. But JSON JSON post product, it's probably
14:00 Adding Documents (Importing Data)
14:26 gonna be a little bit sexier if you download that JSON file. Yeah. I think that's a good idea. I said, I I usually just skip all this stuff, so you'll need to keep me right. So movies.JSON. Oh, actually, I think it's pointing on the getup page, so Oh, it's not really if you're gonna have access. Yeah. We should put a rolling. Raw. I like that. I'm just taking notes and being like, we should we should do better. It's it's perfect. Alright. Let's try that again then. -0movies.JSON dropping the raw link. Yep. There we go. And now we just wanna issue this curl
15:17 command, which is gonna populate our database with this. So Yeah. And and what you can see with that comment is that if if you read the documentation, you're gonna see that by importing those documents, using that, REST API endpoint, you are, automatically creating a Mendix called movies. But if you want, you can, If you check the documentation, you can create an index by yourself, and after that, have documents. So in the case that that index does not exist, Meilisearch will create it by default. Alright. Well, I'll keep it as movies for now because I'm sure I'll copy and paste Yeah. More
15:58 example code and I'll forget to change it. So I'll just leave it as is for now. Now I'm curious if I just pop over here then and hit refresh. We have movies now. Cool. Let's see. Gotta search for the metrics. May be still updating. Have documented. Yes. Check the update ID status. So this this is telling So if you go back now if you go back, the best way to do that is, like, if you go back to the other terminal you used Oh, yeah. Yeah. Probably in Versus Code, I think. Yeah. Yeah. You're gonna see it return you an update
16:17 Check the Update Id Status
16:41 ID. And, with that update ID, it's, because, like, the importation is is a sync. So it would probably be done by now, I guess, depending on the speed of your computer. But, like, if you want to check the status, you can do this by calling the proper API endpoint. It's get indexes, movies, updates, and then the number of the update ID, I think. Alright. Okay. So indexes, movies. Updates. Updates. And then zero. Yes. Cool. Let's put this through a GQ. Processed. Yeah. So we've just imported 19,554 movies. Alright. So now now you see its process.
17:35 Basic Searching and Typo Tolerance Demo
17:35 So if you refresh. Yeah. Yes. Now the matrix. There we go. That one doesn't exist. Oh, okay. That's just my dig at the second matrix but I'll save that for an hour time. So, I know it was so subtle even to myself. I felt I had to explain it but it's alright. So now we have a really fast way to search for movies and a database of around 20,000 and it does seem quick, I like it. So let's see what else the documentation is gonna run through. Is there anything you just wanna highlight, point out before we jump back
18:15 to the docs? Like, is there anything Try to try to search for metrics, by making a mistake, like search for, I don't know, matrix or metrics. So this this is a feature I like. I I call it threat proof because I I do mistakes all the time. And you know, this is how search work. You know? You go to Google search. I don't even fix my search query when I go on Google search because I'm like, oh, I made a mistake. It's faster to like push enter and just select what Google proposed me after. It's a little bit like that where like
18:50 it's it's typo tolerant. Yeah. I I do that all the time on my phone as well where I'm typing and I noticed the mistake and I think I'm just gonna go and hit and like Google fix it and it usually does. Okay. So yeah, I can type whatever I want here and I'm just testing how how much of a mistake I can make. Alright. Cool. Yeah. You need you need you need to be like close. You cannot go crazy with your mistakes either. But yeah. Okay. The movie with that guy that I like in it.
19:25 Oh, I I you nearly got your answer. I I think the what was the movie you just saw before? Oh. Yeah. Twelve twelve days of Christmas. It's it's your it's your preferred film movie. Well, I've never seen that, but I think that's definitely gonna have to be tonight's for you. A Christmas movie in February. Definitely. So Or Christmas romantic comedy. That that's promising. Yeah. It just seems to have matched each of those words that I've tied with the overview of the film, which makes sense. Like this is coming back. In fact, I've got a few choice, two choices. There we go.
20:07 Okay. Let's see what else we can do. So we actually, oh, see we've already covered checking updates as well, so we don't need to do that and we can do a search via the API which I'm assuming is gonna just be very to what we got back for the web interface. But let's just run it anyway. Nice. Cool. Alright. Let's see. So we got the web interface. We've had a quick play with that too. And then we can integrate it with our project and we've already made our million dollar thing and we could move on.
20:46 Perfect. Exactly. This is a sample like hello type of example. But after, you know now you've got a server working with Meilisearch and get access to the API, but you probably want to integrate it within your project. And this is what I really love because our integration team done, like, an amazing job. So if you want to integrate it yourself and, like, just, like, use the API and and create a code yourself, like, good for you. You can do it. But if you check on the sidebar on official's a SDK libraries on the four three links
21:02 Integration Methods (SDKs and Frontend Tools)
21:21 Okay. On the top of the yeah. You click there, and, you're gonna see a list of the actual integration we have. So, you know, if you are building something in PHP, again, you can just like do your HTTP request and and like call the API or you can use the SDK and just use like easy function to do the implementation. Yeah. That's pretty pretty well covered support there. Know, I'll skip the Java one, but you know, Golang and JavaScript, PHP, Ruby, Rust. I mean, I think that's pretty much every language that I'm gonna be working with these
21:57 days anyway. So it's nice to see that support is just there out of the box. So those all officially maintained by the the Meilisearch team? Yep. Yeah. Yeah. And, actually, it's there there is other integration. So we have our team like, we have a team that work full time on integrations. So, like, more and more front end tools are coming. More frameworks are coming. Yeah. We we really think that that's just gonna make, like, people's life easy, so we put a lot of effort on that. Yeah. And there's also front end tools. You can say, you know, I use React a fair
22:30 bit, so it looks like there's a way to just drop that in react components, angular view. I'm not sure what instant search is but it sounds fancy. And we have Kubernetes deployment manifest as well, is this a Helm chart or yeah, a Helm chart, there we go. Yep. Is Meilisearch horizontally scalable or do I just run one of them? Like what is the deployment architecture there? Yeah. Right right now it's not. Like, I mean, we are working on making it hazier horizontally scaling because right now, there's no what's the word when shading? Sharding? Sharding. Yeah.
22:55 Deployment Architecture
23:15 Close enough. So there's no way to do sharding right now, but it's something we're gonna work on because in production, that's gonna be important to be able to to use it like that. Yeah. But I guess it's also retina and rust fully synchronous through the actor framework. So I can imagine it's pretty fast and scales terribly well just vertically. It never remained horizontally, but it's nice to know that. It is. It is. Act actually, you know, the thing that are taking most of the resources is when you import document. So, it's it's taking a lot of memories
23:47 to import documents, but, I would say it's the biggest, unless you tell me capital I'm wrong, but I think it's the biggest, usage of resources. And even for that, right now, what you see when you try Meilisearch right now is the actual version we have, but our developers are working on the v two of the engine. So the the like, strictly the engine part. And, if you think Meilisearch is now, you've seen nothing. So I I should release a video soon enough, I hope, of, like, just showcasing how much Meilisearch is even faster right now
24:23 because now we we're not gonna talk about, like, something like 100,000 document. We're gonna talk about, like, 1,000,000, two million document, and that's gonna be faster than the experience we have right now. So it's it's it's just awesome. But now, obviously, you have to believe me because you cannot see it, but, yeah, It's it's it's coming in the pipeline really, really soon. Well, you seem quite trustworthy, so I know I believe you. Also You shouldn't you shouldn't you shouldn't not trust me. Well, I pulled up this held chart values file. I actually see this in the environment
24:50 Configuration and Settings Overview
24:57 variable. It looks like it disables the analytics as well, so Meilis know analytics, true. There you go. Oh I didn't even know Alright so I'm curious about the, you know, I've not really done anything yet and I'm getting a whole lot back from Meilisearch. Like you know, I've just imported data and I could imagine doing this for my application when I start throwing loads of documents into the index and then just using it as a search endpoint. Is there is everything indexed by default for me or do I have to tweak the schema in some way to tell it how to index
25:32 and which matters to apply? Like how how much configuration do I have when I work with Meilisearch? Well, do you you can customize what you want to be indexed, the what you want to be searchable, the attributes you want to be you want to be you want to set a searchable. You can like, there is a bunch of thing you can customize. Like, you it's ultra relevant out of the box, but you can change a lot of things. Like, if you want, here, the relevancy is, set by the first document indexed. For instance, something a word found in the title will
26:16 be more important, considered as more important than a word found in the overview, for instance. But if you want to change this this behavior, you can. You can. In the settings, you have a lot of things you can customize. Does that mean there's a curl request I can send to kinda understand that schema just now? Will it print it out for me? Yeah. You can can actually, you can you know, all the option you can change is like you can have a list of associated word of synonyms because, like, we can treat synonyms and you define
26:51 those synonyms yourself. You can have a list of stop words. Like, as an example, you've seen, like, your your really long example trying to, make your product look bad, David. You know, you've seen I'm joking. You've seen out, like, all the, like I don't know what's the word in English, but, you know, like, those small word that are in between, like, t h e, of, buy, those words that you probably don't want them to be part of your search queries. So those are call stop words. You can define them. Has Carol said, like, the ranking rules. And
27:24 there's both things you can do. In the documentation, you can see those if you go and I think it's in reference. In the API reference, there is a section called settings. So if you go at the top level yeah. Click reference. API reference. Settings. Yeah. Yeah. But you can you can, yeah, you can see all of them there. And if you want to see how use the API to change them, you can check-in the API reference. There's also a check a section called settings. Oh, yeah. So you were asking how to, can, like, get the list so you can use, like,
28:09 the m deck slash settings. Yeah. Okay. You you got it. Yeah. Let's take a look. So current request to movies settings, and we get back to this. Okay. So we got ranking rules. Don't know what that means yet. Distinct attributes, searchable attributes, display, attraction. Alright. Okay. We've got a fair amount of customization here. I'm gonna guess what some of this means and then you can tell me Okay. Where I'm wrong or whether I'm right. I'm gonna skip the ranking rules and just let both of you handle that in a moment because I'm not sure. The searchable attributes, think I can maybe work
28:47 Searchable Attributes
28:50 that one out. So you know if I maybe wanted to store people I meet at conferences in a Meilisearch. I may want to be able to search for them by name or a company or Twitter handle but probably not by email address, I wouldn't want to expose that. I'm assuming by searchable attributes I can just say only allow searching on these certain fields. Mhmm. That's my guess. That's right. And displayed attributes is this what if I pull down, say I search movies for the matrix, the displayed attributes will be the only ones that are returned for each of those.
29:26 Do we call them records at Meilisearch or rows of documents? Documents. Okay. But I'm assuming the displayed attributes are what sent by default, I'm not sure if I could tweak that. The stop words, I think Fred's already kinda covered that a moment ago. Synonyms, I'm assuming if I wanna call the matrix or translate it to other languages, would I use synonyms there? Yeah. Mhmm. Yep. And I'll leave attributes for faceting up to you. So if you just wanna tell me what rank and rules and attributes for faceting are, I would love that. Okay. Ranking rules are the the rules that define
30:03 Ranking Rules
30:07 the relevance of the search results. So it's it's a bucket sort. Like, first, it's by the results are showed by increasing number of typos. There is also the how do you sorry. Like, my English is not here at the moment. The proximity of the words you search is not the same to search, for instance, I love rock and and I love something and rock. So the the results are going to to show in that particular order. The word position, it's I'm sorry. I the attributes, that is related with the searchable attributes, this thing I mentioned
31:09 earlier. Like, the the order of the first document is in which attributes appear in the first document, it's important. Something that appears in the title, it's not the same as word that appears in the overview because the title appears first in the first document. And do you want to help me, Fred? Yeah. Which one you you have left? Which position and accept exactness? Yeah. So, word position is is, like, it's the result are sorted by, the position of the query word and the attributes. So if you go you can even see example of that. If you go into documentation and, like, the
31:58 learn court I know right now it's a little bit all over the place because we we talk about different topic. But, like, if you could click on learn, I think it's a core concept relevancy and if you check ranking row. So maybe, like, something more visual is gonna be easier. If you scroll down until you go to example yeah. So you're gonna see, like yeah. There. So you're gonna see, like, each go up a little bit. Each tab, to show you example of, like, those, those different rules. So, like, if you go to word position, you're gonna see, like, if
32:34 you search for Belgium, like like like, is gonna happen, is gonna happen before Dunkirk because Belgium app her appear sooner in the attributes. So it's really like to say, like, hey. If the, word position is more important to you, like, you would have a title like, if you took if you put this as one of the, the more important rule for your search. So as an example, if there is a a movie that is metrics colon, how the movie was done, like the comic documentary on metrics. So if you put word position as one of the, main attributes
33:17 for your search, that title, that movie will come first before the metrics because, like, metrics, the word is before the metrics. Does does it make sense what you just said? Yes. So based what and what you've just described there, I'm assuming if I search for Christmas, movies that have Christmas in the title will show up before movies that mention Christmas in their overview. Yeah. So Christmas in the title, Christmas in the title. Yeah. So that that's two thing. Like Christmas in the title is because because we didn't set any ranking rule or, like, in terms of the
33:59 what do you wanna say something, Carol? Because no. Because the the the attribute title is more important than the attribute overview. But let's say we are just searching only the overview is searchable. So if Christmas is the first word in the overview, it will appear first in your search result than if it's the last words in the middle. Right. And and because why why title is more important right now is because we didn't set, the rules ourselves, so we go with the default rules. And because we go with the default rules, it means that it will take, the importance
34:37 of the, different attributes will be in, the order that they are in each document. So each JSON object. So you're gonna have, like, titles gonna be more important after that poster, after that overview, after that release date, after that junk. It's the first document. Yep. So when I search for Disney, I get something that has Disney as a title, then I get something that has Disney as the first word on the overview. First word in overview, first word in overview, alright, there's a few and then second word. Okay. That's done to make sense now. I
35:10 think I understand that. And I'm assuming if I just pick another random word like Donald, that should spring up to the top. Yeah. There we go. That makes sense. Got it. Now there was one more thing, the attributes for faceting. Okay. Facets are like categories in which you can search. So let's say you in the in the movie example, you have the genre. You say that in English genre of the movie and you can just it's a strange word for me to say. Sorry. So you can just search in the comedy type movies or the romantic movies,
35:26 Attributes for Faceting
35:59 etcetera. You can set categories to search. Awesome. So I'm gonna throw an idea out there then. Let's tell me if we can do this in a timely amount of fashion. Yeah. Now our schema here is just a default because all we did was import movies dot JSON but what I'm thinking is and let me test a hypothesis here is that this will return that movie. Yeah. Now I probably never want to search by the poster URL. So what I'm thinking is could we modify the searchable attributes to omit the poster and add and the genre as a faceted search
36:04 Demo: Modifying Settings (Searchable Attributes, Faceting)
36:36 to make it a little bit more sophisticated. Mhmm. Yep. Yeah. Yeah. You can do it. Is is that part of the getting started guide and I've just like made it up or no? No. No. Actually, that's gonna be let me be sure we have we have an example for that. This thing should be no. Searchable attributes. So if you go if you go in reference in settings and searchable attributes yeah. So feature reference. Yep. Our search bar of our documentation works. Oh, yeah. Actually, search search is is really good in the documentation because we're using
37:30 a software called Meilisearch. Yeah. It's so good. It's working so well. I was actually just about to ask if you used Meilisearch for the search on the doc. So I'm glad you said to the YouTube. Alright. So I could just We're we're dogfooding. So this reference page in the documentation is is working against the same movie set. So I'm actually not really gonna have to change too much here. Right? Like I could just drop this in and that's gonna give us title, description and genre as a search. I think we need to change that to
38:04 overview instead of description. Is that right? Yes. And go. And then I can do my update command. Where was that? Updates one, which I would expect just to see. Oh, well, maybe not up, maybe it won't be done as quickly as I thought because does this have to rebuild the indices on the index? That's a good question. I have no idea. That's fair. Do you do you know, Pavel? It's I think I know it's much better to to set the in the settings before indexing the documents. But Yeah. But I assume the data will still
38:49 be there. It will be just not searchable because if you change your setting at some point, like, the document is still there. So yeah. Well, we have achieved our first objective, which is I'm now dropping in the poster URL and it's not returning anything. So I'm calling that a win. Fred's calling that a win too by the looks of it. Alright. Objective two is is there a special operator for faceted search? Like, can I do an action or like or do I just type like, how would I do a faceted search where I only want action movies?
39:27 I don't know if you can do it from this web interface. I don't know if it's so. Oh, but we could do it from the curl, I guess. Right? Yes. Alright. I'm gonna test out your docs now. So fast as you search and see if I can find me a recurl command. Okay. So first we have to update the thing. That makes sense. Let's take off director. It looks like we have that in our dataset. Not sure. Alright. And that seems happy. I just like running the status of my update. Someone has answered a question on whether the indices
40:16 have to be rebuilt with a yes. I'm assuming they maybe have some knowledge here. I'm not sure. Dictomy? Dictal Tommy? Do we know that person? Nope. Is it It like it it may be my boss because he's using a different username everywhere he goes, so I never know if it's him. Do you know if it's Tommy? If if it's Thomas? I don't know. Or maybe it's my maybe it's my tech writer. Yes. Tommy. Or it could just be a random YouTuber who's like, sure. Whatever. Yes. Like, yeah. Trust me. Alright. That's what we're continuing. And you
40:49 know what? This is this is something I like because, like, I'm I'm totally fine with having, like, users that know more than me because, like, that means that they're using it. Like, it's perfect. Yeah. 99.90.5% of all users know more than me. So I'm I'm quite comfortable with that now. Yeah. Okay. So we've added our attributes for faceting. Now we wanna do a search returning only the genre that I want. Someone else has commented saying, I think it is Madden post. Uh-huh. Okay. Yeah. This guy I know is is one of the developer on core.
41:29 It's it's one of our developers. So thanks, Martin, for using your real name, so we know it's you. Oh, and there you go. You gotta wave. Hi. Hi. Oh, I think Nico I think Nico, Tommy, is is probably our tech writer. Nice. Well, thank you for helping out. Okay. So we've got a carload request here now and this is doing a search against our movies databases, we've added genres as a faceted filter. We're passing on Thriller as the query. We don't have a director in our dataset, don't think so I'm just gonna remove that. So we're searching for
42:09 let me see if I've got this right. We're filtering on where the genre is horror or mystery and thriller exists on the title or the overview. Is that what we expect here? Yes. Maybe? Yes. Alright. And let's see if we can confirm that. Jiku is your friend. It is. So we got the genre match. Now do we have a thrill? Yeah. And thrill and the overview. Works exactly like we thought it was gonna work. That's really cool. I mean I've got to say even though we can just throw together some really trampled trivial JSON and apply it to change the
42:53 way the software works. I'm always really happy. Like I don't have to dig around and work stuff out. Think the u UX, DX, the intuitive works rather than having to have preexisting knowledge always amazes me. I think that's great. That that's one of the goal we have when, you know, we build a platform to as you saw, like to work out, like, out of the box. So you don't need to change your setting. Obviously, you probably want to at some point to, like, get better results to your users, but you don't have to. And you can
43:23 already try it and and and see how it's worked really easily. So, you know, there's something like, there are some some what's what's the word in English? Like, is snobbish snobbish a word in English? Or some some, let's say, pretentious people that are like, hey. You know, software should be complicated to be powerful. And I I'm, like, I'm totally like, after all these years of software development on my side, I'm like, no. Like, the simpler you make it, the better it is for the users. Even if users are developer and they know how to use those tools, but
43:57 be sure that they can configure it. Like and they can do, like, more sophisticated or more complicated things. But, you know, when you look at Meilisearch, it it seems like, yeah, it's it's simple. Like, it's there's no there's not a lot of much work done. And but believe me, there's a lot of work behind the scene to make it that easy. But I I think it's one of the strong point of of using Meilisearch too. Like, you don't need to be an expert. Like, if you know how to do HTTP requests and and use a framework
44:26 or like just use Carol even to test it, like you know how to use the software. Cool. Awesome. And you are right. Snobbish or snobby is another perfectly term Okay. Pretentious. Awesome. Yeah. Because English English is not my first language too, so sometimes I speak French and sometimes I use French word and I say them with English accent hoping that it's a real word. Yeah. I I speak Scots English, but I do my best not to inflict the Scottish on people. So it gets me into You have you have no accent, by the way. I was I
45:01 was expecting like a strong Scottish accent. No. No. No. I keep that for the weekend. But I've got my my work voice that just it keeps things easier. Anyway, cool. Let's do a couple more things and then I'll let us get back to our our days. One of the things I'm thinking of here is we have the genres. Right? Let me search for yeah. Science fiction. Do we also have push the wrong button. I'm not very good with computers. There we go. We don't have sci fi like now maybe I'm pushing something that's not gonna work here, but
45:44 I'm thinking do we have synonym support for faceted search as well? No. Maybe. No. We're not sure. Actually, I have no idea to be honest. Shall we try and see what happens? Yes. Alright. Let's break things. Alright. So I'm gonna use your search is really good on this, I've got to tell you. I'm gonna add this to my blog, which has got three articles in it over ten years, but still. Okay. So we can add synonym. Where's my car request? I'm sure it's in oh, it's not in here. Oh, let's try another page. Setting synonyms.
46:28 There we go. Yeah. I'm gonna try and add a synonym for science fiction to sci fi. Hey John. I mean I appreciate the vote of confidence but I'm definitely winging it. So okay. Let's see. And I don't wanna add a sweater jumper, but I do appreciate that example. I'm gonna add science fiction and we'll add sci fi sci fi and sci fi, the weird TV version two. That look okay? So yeah. Look good. And now I just need to make sure I update the rate and then Yes. I was going to save it. Oh, sorry.
46:30 Add a Synonym
47:18 Yeah. We've got we're getting loads of waves today. Hi, Thomas. We're getting away from Thomas too. Okay. Oh, so Thomas is my boss. And the other Tommy, I I I checked with him, and he is he is the tech driver, the to me. And I I was just been told that it won't work, but let's try it. Oh, well. Let's let's try it. That's fine. Alright, well we got our update ID, I won't bother looking that up. I'm gonna okay, here's a question. I have this movies.JSON that we've been working with. If I were to then
47:57 change this sci fi and then reapply that document over the top. Am I gonna end up with two copies of Captain Marvel or will it know and update that record? If if you keep the if you keep the same Heidi, that's gonna be replaced. Yes. Alright. And I'm gonna change this to the weird sci fi. Okay. We're getting away from Sangam too. Hey man, how's it going? Sangam. People are chatting today. It's nice. Obviously everyone's here to learn about Meilisearch. I forgot what I was doing so we should just chat. Oh the movies, there we go. Yeah.
48:41 Yeah. The song. It was this one, the post request to index movies documents pass that to JSON and that I'm assuming that maybe it's updating in the background so we can do the update for and we also have a question that we can tackle too. John asks does this run on stable rust or nightly rust? Stable. Stable, awesome. Even better. Okay. Moment of truth. The thing that we already been told isn't gonna work but I'm gonna try and The actual channel showed up. Well, that was a nice idea. So the synonyms work within the text search but not on
49:31 the faceted level. And I guess that's probably be expected you you suspected that as well. But you know you know what, David? If you really want this to be added to Meilisearch, I would suggest you to either do a PR or, worst case, then submit an idea, create an issue. And roadmap. Be yeah. You know? But I I certainly see you because you you know, Rawkode, and you like it. I I'm pretty sure you're you're you're good to do a PR. Oh yeah. Definitely. I just feel pop out for five minutes. No. I I I would definitely love to explore
50:10 the code base. I think I I will be doing that at some point. But knows that I'm even thinking about our lives like would we want synonyms on a facet? I'm not entirely sure maybe, but I'll think about it. Okay. All right, let's try and cover one more thing before we finish up for today then. Is there anything that either of you have you're particularly partial to that you'd like to show off or should I just pick something at random again at my random head? Tell me you have something. Yeah. Go where I'm done. Let let's have
50:44 fun. Yes. Alright. So what's a distinct attribute? Let's see. Like, oh, you should have Susan down or, oh, that's gonna be interesting. Oh, it's interesting, but you can showcase that with the this dataset. It's just like for when you have the a document with for instance, it's more for ecommerce. Like, you have a jacket. It's the same jacket, and you have in white and in black. And you want when you search for that jacket, you want just one document to be returned. Alright. Do you understand? You don't I think that I think that makes sense. Yeah. So if I've got, like,
50:49 Distinct Attribute
51:40 assume say we had in our database, I don't know why we would have this, but I'm gonna try and stick to the movies example anyway. Like if we had different variations of each movie for the format it was released like you know VHS, DVD, Blu ray, we'd maybe use a distinct attribute there that when I search for the metrics, you don't return four of them. You just say, you know, there's one and then there's other variations of it. Does that make is that right? Yes. You you can see, like, if you scroll up just a little bit, you can see
52:08 the example, like, you have a JSON where, like, it's the two same product. But in that case, as capital said, the only difference is the color. So we're gonna say, like, if you set up the distinct attribute being, like, product ID right after you have, like, that curl curl, like, code, if you scroll down just a little bit, you're gonna set up, like, distinct attributes of product ID because this is, like, what's gonna be distinct between those two product when you're gonna search for it. You're just gonna get, like, the letter jacket. Okay. And what would the search result look
52:43 like on that? Like I'm getting one back, does it give me any indication of which variations exist? Are they omitted from the the results or does it just pick the one that it finds and return that? We don't have an example on that. We should. PR issue. Well, let's find out. Okay. Let's find out. Hold on. Let's see. What's our first movie? I'm gonna copy and paste Shazam and then we can use the I is the ID a Meilisearch special thing or is that just part of the dataset ID? You need the ID. Each document must have a unique identifier.
53:25 Alright. So for the link, you should choose another one because you can't have the Okay. The same. I'm gonna apply this dataset over the top and we'll see that there's also a Shazam, which is an action and there's one that's a fantasy because, you know, this is contrived, so I'm just gonna make this work. We now have two Shazams with different IDs and then I'm gonna apply a distinct setting update to this index to do title, and then we'll see what happens. And, you know, just looking back to the ID, by default, Meilisearch will use as your,
54:04 like, document unique ID, any, like, the first, attribute that's gonna have the word ID or, like, the the choose label ID. No matter if it's, like, UID or, like, this is my ID or it's also non case sensitive. It's non case sensitive, but you can also define what's gonna be your your unique ID if you want to. Okay. Cool. So I can if I want to, I can say use something else as a unique attribute. Alright. Well, we're now in a situation where I'm pretty sure I've applied a distinct attribute. In fact, I'm really curious now to see
54:45 what our if I just pull out these settings now and take a look at what we're what we have. I'll change this to get request. So we we set our attributes for faceting, we added some synonyms, we got our searchable stuff and we have our distinct attributes set now. Okay. So in theory, if I Well I should be able to see this through the web interface, right? Shazam. I only got one. Yeah. So at least I guess just picked one of them and returned it. But I guess we could always confirm that. Yes. It's it's the case. It's gonna return only the
55:34 first one. That that's like with the example capital set in ecommerce, it's probably because you want you know, when you go into Amazon and you have, like, different size of the bottle, like, you just return one bottle. And when you click on it, now you get, like, all the information in your product. So I assume it's for those kind of use cases. I'm not sure where when you would like to use that setting not in that type of scenario. Yeah. That makes sense, I guess. I'll I'll I'll stop trying to do weird and random things there. I promise.
56:13 No. Actually, it's no. It's fine. It's it's it's what I love. And it it's also why I'm happy Carol is there because she's way more brilliant than me. So. Alright, well why don't I see. So anyone that's watching, please feel free if you've got any questions drop them into the YouTube. We're gonna be finishing shortly, so we'll handle any questions we can before we do. Why don't we talk a little bit about the operational side then of Meilisearch? I think we've covered a really good what it is, what it does, know, we'll kick the tires
56:42 on a few of these settings, we'll work with the API, everything really just does what I expect which I think is fantastic. You know, now I'm at the stage where I'm like, okay, I played with it, I kicked it, I like it, I wanna ship it into production. Like I just, let's assume I'm thrown onto Kubernetes with that helm chart and it does its thing. What about backup and restore? Is that something that's relatively easy to put together if something were to go wrong? Yep. Can you repeat please because I didn't understand you. Yeah. So now I've got Meilisearch and
57:03 Operational Aspects: Backup and Restore (Dumps vs. Snapshots)
57:17 production, and I'm curious. Like, I wanna be able to build out backup and restore processes. So what would that look like to make sure that I never lose data? You can you can search for snapshots or dump. Dump. There's two way to to to kind of, like, get your data. So creating a creating a dump will oh, do you want to go, Kettle? No. It's just a dump is now the database is not compatible between versions, but when you create a dump, you can change from versions without problems. But and snapshots are you have to use the same version
58:03 for now. So I'm gonna Yeah. So throw out my naive understanding of that. Please feel free to go. Oh, please go. When you when you talk about dumps, I'm assuming that I'm actually just getting the JSON representation of all the objects which can be imported to whatever and the index and is performed again when I import it. I'm assuming the snapshot is actually like a database representation of all of those documents that can be migrated to another copy of that database. Yep. Yep. Exactly. Exactly. And right now for people that are listening, we suggest that when you move
58:38 from one version to the next version of Meilisearch right now, you probably want to use the dumps because we're not at v one, so we are still making some breaking changes. So it's probably the easiest way to go if you want to be sure you're gonna retrieve your data. Starting from v one, we're gonna be really careful when we're gonna introduce new breaking changes. But right now, we're still concerned that's, like, we we like, there's still a lot of good things to do with the product. So we're we're not totally good citizen when it comes to breaking change right now.
59:12 Is Meilisearch embeddable or is only can I only run it as its own binary? Do we know? Say that again, sorry. Can I embed like as exposed as like a rust crate that I can embed into my own and not have to operate, like, run it separately or is it always expected to be run as its own process? I don't think so. I think I took suspected that you run it as an external application. So as a service that's a good question, actually. And and to be honest, I have no idea because I don't know Rust at all.
59:54 Maybe I can get the answer before the end of the Alright. Well, we have a couple of questions from John in the audience. So let's throw them out just now. His first question is, does Meilisearch or does Meilis mean anything? Yes. It's the Nordic god of oblivion according to an historian. So that's why maybe search you need a search engine to look for the forget the things you forgot. Ah, nice. It is it is brilliant, though. I was not part. You you would think that I was part of the decision. I was not there because it's brilliant. But, yeah,
1:00:01 Q&A: Name Meaning, Embeddability, V1 Timing
1:00:41 I really like the idea. The the thing is that what we've seen is is people struggle to say the name sometimes. So, yeah, that's another thing. Just to go back to the unbendable question I asked Marie, and he said, basically, no. It's not unbendable. So I was not wrong, but it it was just an assumption. I would like I had no idea. Yeah, I'm not even sure if it's a completely valid use case for this kind of thing, but I guess it's always something that I think is interesting because databases are difficult, but okay. Let's go back to another question from
1:01:19 John. He's asked, when is v one planned? Good good question. So yeah. Actually, I I don't even know what I could say right now. I said we're, like, really open with the process, but until we we won, we kept a little some of the stuff a little more secret. Actually, we're in the process of hiring a PM that will really help us to have, like, a a better road map, and we're gonna make that road map public. But let's say that it should be around q three. So we're gonna have, like, alpha and and even alpha and beta that's gonna be available
1:01:59 before. Right now, we're assuming that around q three, we're gonna have to v one. The only thing that people need to understand also is that it's not because we're not a v one that you cannot use it in production. Like, there's we we have a lot of, like, let's say, customers that are using the product in production. So it's it's working right now. It's just that we want to be sure that we're gonna give and they've done better experiments with, as an example, with the new engine, and that we're gonna be sure that, like, the structure
1:02:31 of our endpoint and everything is, like, quote, unquote, set in stone for, like, a v one. But, it's it's coming faster than we think, and and, seriously, I'm really exciting excited about that. You know, I've I started to work the, quote, unquote, marketing plan, if I can say, like, what are we gonna share on Twitter and those kind of things. I'm like, like, I cannot wait. Like, I'm like, I I guess the developer find me a little bit annoying because I'm trying to, like, move her earlier when I'm gonna release the version. So yeah. Because I I want people to
1:03:04 use it as as fast as possible. Possible. And, like, people that may not be confident in Meilisearch because we don't have, like, an official stable version. So I want to be sure that you can use it right now, but I want to have a v one for that exact reasons. Yeah. I think I'll I'll just gonna summarize that in my own little way now. So I think it's really clear to my head, but what you have said there is production ready to use. People should be using it. It's fantastic. However, you may need to do a dump and
1:03:36 reimport your data because it's the underlying database format may change before v one. Is it safe to assume as the API is relatively stable? Like if I start building against them, am I gonna be okay for v one? Yeah. Relatively. So so yeah. Because, again, we're kind of, like, making us assumption would would we're how can I say that? We're making us ourselves some caution when it comes to that. So I would say I would say it's mostly stable, but maybe things can change before v one. But, you know, we've been running, we've we've been duck footing and our
1:04:18 actually, I didn't see a lot of change when comes to the API. So I think we're pretty solid. I just want to, like, put a little asterisk that's yeah. That may change, but no. Anyhow, you you you get a guess of of what I wanna say. Alright. It sounds to me that people should be checking that out if you need search across any of your applications, Meilisearch is definitely ticking a lot of these boxes. I think we've covered a lot with really showing off the product, we've seen how it works, we've done a few things that we
1:04:47 probably weren't supposed to do, but fortunately most of it worked, so that was really cool. Do you have any final remarks before we finish up for today? Mean, you know what? Like, try it, see if it's if it's good for you because it may not be the software for you. But, one of the things that we would like your feedback, either positive or constructive feedback. And, we have a pretty awesome community too. So, obviously, I would say, Kevin, right now, is is answering most of the support question we have, but also, in in terms of, like, the Meilisearch employee,
1:04:54 Conclusion and Community
1:05:26 but we have a a awesome community. So join us on our Slack Slack community, or, we also use GitHub discussion, and it's just nice to get a feedback and and see where that's going. Alright. Well, thank you both very much for joining me today. It was a pleasure to play with Meilisearch and be guided by you both answering all those questions. I hope people like what they see, they check it out and open loads of issues and PRs and help you push towards that v one. So again, thank you. Have a great day and I'll speak to you all soon. Thank
1:05:58 Thanks for everything else. Bye. Yes. Bye. Bye.
Technologies featured
Meet the Cast
Stay ahead in cloud native
Tutorials, deep dives, and curated events. No fluff.
Comments