<?phprequire_once__DIR__.'/vendor/autoload.php';useMeilisearch\Client;$client=newClient('http://127.0.0.1:7700','masterKey');# An index is where the documents are stored.$index=$client->index('movies');$documents=[['id'=>1,'title'=>'Carol','genres'=>['Romance, Drama']],['id'=>2,'title'=>'Wonder Woman','genres'=>['Action, Adventure']],['id'=>3,'title'=>'Life of Pi','genres'=>['Adventure, Drama']],['id'=>4,'title'=>'Mad Max: Fury Road','genres'=>['Adventure, Science Fiction']],['id'=>5,'title'=>'Moana','genres'=>['Fantasy, Action']],['id'=>6,'title'=>'Philadelphia','genres'=>['Drama']],["id"=>7,"title"=>"fiy","genres"=>["01","02"]],["id"=>8,"title"=>"fiy","genres"=>["03","04"]],];# If the index 'movies' does not exist, Meilisearch creates it when you first add the documents.$index->addDocuments($documents);// => { "uid": 0 }$index->updateFilterableAttributes(['id','genres']);$search=$index->search('fiy',['filter'=>['id > 2',"genres = '01'"]]);print_r($search->getHits());
WSL安装
1.Microsoft store 安装
1.1 启动WSL功能
在【程序和功能 -> 启用或关闭 Windows 功能】中勾选【适用于 Linux 的 Windows 子系统】
1.2 Store中下载安装
在 Microsoft Store 中下载并安装需要的 Linux 发行版
2.不使用Store安装WSL
注:1.1也要…
Python 实现语音转文本
Python可以使用多种方式来实现语音转文本,下面介绍其中两种。
方法一:使用Google Speech API
Google Speech API 是 Google 在 2012 年推出的一个 API,可以用于实现语音转文本。使用 Google Speech API 需要安装 Sp…