小编Abh*_*hri的帖子

如何决定Elasticsearch“音标过滤器”中的哪种语言使用哪种编码器?

我在 Elasticsearch 中使用了Metaphone和soundex编码器以及“Phonetic Token Filter”。

变音位对于英语单词很有用。

Soundex适用于英语、印地语以及许多其他语言。

我想知道哪些编码器最适合印地语以及其他印度语言(如果可能的话)?

  • 声音指数
  • 变音位
  • 双变音位
  • 精炼_soundex
  • Caverphone1 - 英语(新西兰本地化)
  • Caverphone2 - 英语(新西兰本地化)
  • 科隆 - 德语
  • nysiis - 即兴 Soundex
  • koelnerphonetik - 德语
  • haasephonetik - 德语
  • beider_morse - 英语和多种欧洲语言
  • daitch_mokotoff - 斯拉夫语和意第绪语姓氏

由于Elasticsearch 网站上没有列出我们应该选择哪种语言的编码器。

还请告诉我您已经使用过哪些编码器以及用于哪种语言。

metaphone phonetics elasticsearch

5
推荐指数
1
解决办法
1444
查看次数

如何使用 laravel excel 导出大量行

我需要将大量行导出到 Excel。我正在使用Laravel-excel。我遵循了导出大型数据库的文档中给出的所有建议。

// routes/web.php
Route::post('/dashboard/export', [DashboardController::class, 'export'])->middleware('auth');

// app/Http/Controllers/DashboardController.php
class DashboardController extends Controller
{

    public function export(Request $request)
    {
        $filename = str::random(20).".xlsx";
        (new UsersExport($request->all()))->queue($filename, 'public')->chain([
            new NotifyUserOfCompletedExcelExport(request()->user(),$filename ),
        ]);
        
        return json_encode([
            'message' => "You will receive email with download link once export is complete."
        ]);
        
    }
}


// app/Exports/UsersExport.php
class UsersExport implements FromCollection, WithHeadings
{
    use Exportable;
    public function __construct($config)
    {
        
        $this->config = $config;
    }
    
    public function collection()
    {
        $mains = DB::table('mains')->select('name', 'email', 'designation', 'country', 'university', 'discipline', 'subject', …
Run Code Online (Sandbox Code Playgroud)

laravel-excel laravel-8

4
推荐指数
1
解决办法
1万
查看次数