Răsfoiți Sursa

Merge pull request #2373 from visuddhinanda/development

Development
visuddhinanda 3 zile în urmă
părinte
comite
6648e2cac3

+ 2 - 1
api-v13/app/Console/Commands/IndexOpenSearch.php

@@ -31,7 +31,8 @@ class IndexOpenSearch extends Command
         //
         $service = app(OpenSearchService::class);
         if ($service->count() === 0) {
-            $this->call('opensearch:index-pali');
+            $this->call('opensearch:index-tipitaka', ['book' => 0, '--granularity' => 'all']);
+            $this->call('opensearch:index-term');
         } else {
             if (App::environment('local')) {
                 $this->info('data exist');

+ 1 - 1
api-v13/app/Console/Commands/InitSystemChannel.php

@@ -141,7 +141,7 @@ class InitSystemChannel extends Command
                 $channel->status = $value['status'];
             }
             $channel->save();
-            $this->info("created" . $value['name']);
+            $this->line("init " . $value['name']);
         }
         $this->info("init:system.channel successful");
 

+ 1 - 1
api-v13/app/Console/Commands/InitSystemDict.php

@@ -96,7 +96,7 @@ class InitSystemDict extends Command
             $channel->dest_lang = $value['dest_lang'];
             $channel->meta = json_encode($value, JSON_UNESCAPED_UNICODE);
             $channel->save();
-            $this->info("updated {$value['name']}");
+            $this->line("updated {$value['name']}");
         }
         $this->info("init:system.dict successful");
 

+ 3 - 3
api-v13/app/Services/OpenSearchService.php

@@ -198,7 +198,7 @@ class OpenSearchService
                             'dimension' => 1536,
                             'method'    => [
                                 'name'       => 'hnsw',
-                                'space_type' => 'cosinesimil',
+                                'space_type' => 'innerproduct',
                                 'engine'     => 'faiss',
                             ],
                         ],
@@ -234,7 +234,7 @@ class OpenSearchService
                             'dimension' => 1536,
                             'method'    => [
                                 'name'       => 'hnsw',
-                                'space_type' => 'cosinesimil',
+                                'space_type' => 'innerproduct',
                                 'engine'     => 'faiss',
                             ],
                         ],
@@ -285,7 +285,7 @@ class OpenSearchService
                             'dimension' => 1536,
                             'method'    => [
                                 'name'       => 'hnsw',
-                                'space_type' => 'cosinesimil',
+                                'space_type' => 'innerproduct',
                                 'engine'     => 'faiss',
                             ],
                         ],

+ 1 - 1
api-v13/config/mint.php

@@ -163,7 +163,7 @@ return [
         ],
     ],
     'opensearch' => [
-        'index' => 'wikipali_20260424',
+        'index' => 'wikipali_20260516',
         'config' => [
             'scheme' => env('OPENSEARCH_SCHEME', 'http'),
             'host' => env('OPENSEARCH_HOST', '127.0.0.1'),