那里,
我安装了Laravel Scout。如果我现在创建一个新的记录,它将正确地导入到Algolia。编辑和删除也是有效的。但现在我想引进所有现有的组织。当我运行命令时:
$ php artisan scout:import "App\Models\Organisation\Organisation"
All [App\Models\Organisation\Organisation] records have been imported.
但是,没有任何组织被写入索引。我还需要在什么地方指定什么吗?
composer require laravel/scout
Using version ^9.2 for laravel/scout
./composer.json has been updated
Running composer update laravel/scout
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Probl
我正在尝试将SQL查询作为查询生成器的字符串。toSql()方法可以很好的工作,没有拉拉球探。我正在使用包进行全文搜索。这是我的密码。
Post::toSql(); // Working without scout => select * form post
但是当我试图搜索时,我发现了一个错误
Post::search('test')->toSql();
方法Laravel\Scout\Builder::toSql不存在
如何扩展Laravel以添加一个方法toSql到它。
我决定和Laravel一起测试Elasticsearch。我以为基础
尝试#1
composer require elasticsearch/elasticsearch -为Laravel安装ES
composer require laravel/scout -安装最新版本的童子军(9.1)
composer require tamayo/laravel-scout-elastic -为ES+Scout安装软件包
我知道这个错误:
Your requirements could not be resolved to an installable set of packages.
Prob
使用TNTSearch驱动程序进行搜索可以在家庭环境中工作,但是在生产时它会返回错误:下面的错误,
Symfony\Component\Debug\Exception\FatalThrowableError: Class 'AlgoliaSearch\Version' not found on vendor/laravel/scout/src/EngineManager.php:31
但是,我的.env有SCOUT_DRIVER=tntsearch,而配置文件scout.php有:
'driver' => env('SCOUT_DRIV
我正在使用Laravel Scout和Meilisearch进行标题列表的typeahead搜索。我还使用它来匹配具有不同拼写的重复项。我遇到的问题是,Meilisearch会给出匹配任何单词的结果。例如,键入the world将弹出:
The First Result
The Second Result
The World
World, The
World Games
World Test
当我需要匹配两个世界并且只返回the world和World, The时。有没有办法通过Meilisearch实现这一点?
我尝试使用scout- Elasticsearch -laravel从ec2实例连接到AWS elasticsearch,但失败了。 我的步骤: 已将主机添加到.env SCOUT_DRIVER=elastic ( I tried elasticsearch also )
SCOUT_ELASTIC_HOST=https://vpc-cofxxx-xxx.xxxxxx.ap-south-1.es.amazonaws.com 我可以卷曲aws es端点,它可以工作 现在它给出了以下错误:- No alive nodes found in your cluster 但正如我所说的,curl正在工
我正在使用Scout和Meilisearch。我想冲掉我的一个模特。
php artisan scout:flush "App\Comment"
返回
All [App\Comment] records have been flushed.
然而,当签出meilisearch时,这个表的记录仍然存在。
我认为这是因为我手动删除了数据库中表的所有记录。
我想跑
php artisan scout:import App\\Product
但作曲家正在展示
[ErrorException]
count(): Parameter must be an array or an object that implements Countable
在我的composer.json中,我有这个
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.3.*",
我正在尝试使用Laravel搜索我的模型,但它给了我一个错误。
Undefined type 'Laravel\Scout\Searchable'.
我已经包括了
use Laravel\Scout\Searchable;
在密码里。有人能告诉我我在这里做错了什么吗?
我一直按照原样跟踪这些文件,直到现在。
我犯了一个错误,妨碍了我做任何事情:
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'Laravel\Scout\ScoutServiceProvider' not found
我想移除童子军我想我移走了一条错误的线。我以前从没碰过这个文件。
我尝试删除供应商文件夹,删除comper.json中的"scout“行,并进行了编写器更新。
但这不管用。
谢谢你的帮助!
我正在使用laravel创建一个crud应用程序,并使用scout和algolia来执行搜索功能。然而,当我执行scout:import "App\Majors“时,它抛出了一个”尝试获取非对象的属性“错误。下面是我的模型。
class Major extends Model
{
use Searchable;
protected $fillable = ['title', 'album', 'lyrics', 'youtube_link'];
public function toSearcha
我正在尝试添加索引到Algolia使用Laravel Scout基于一个条件。例如,我有一个Article模型,如果文章是active,我只想将这篇文章添加到Algolia。我的第一个方法是:
public function toSearchableArray()
{
if($this->active) return $record;
return [];
}
这只会添加活动记录,但仍会尝试添加空数组,这在algolia中被视为操作(我将为此付费)。第二种方法是使用scout中的shouldBesearchable()函数:
public function shouldBe
这是我正在做的发言。它创建一个查询,按级别类别(军官、NCO或部队)显示男性或女性童子军的数量以及女性和男性童子军的总数。
SELECT
(Select count(Gender)
from stormtroopers_officer
join st_officer_assign on stormtroopers_officer.STID=st_officer_assign.STID
where Gender='Female' AND st_officer_assign.Role = 'Scout') as 'FOScout',
(SELECT
我已经安装和配置了meilisearch + Laravel软件包。
我的模型:
class Post extends Model
{
use Searchable;
}
当我运行php artisan scout:import 'App\Models\Post'时,它会返回:
Imported [App\Models\Post] models up to ID: 5
All [App\Models\Post] records have been imported.
但是当我检查索引时,它是空的。为什么?
正在创建索引,但没有导入数据。meilisearch和Scout
我目前正在尝试建立和运行我的网站与Laravel。
虽然我的本地人一切都很好,但我在我的制作网站上遇到了一个错误。
在我尝试使用具有“可搜索”特性的模型时,几乎所有的POST请求都会返回如下错误:
[2022-11-16 06:06:49] production.ERROR: Invalid URL: scheme is missing in "/indexes/comments/documents/delete-batch". Did you forget to add "http(s)://"? {"userId":1,"except
我正在尝试使用"babenkoivan/scout-elasticsearch-driver“和"astrotomic/laravel-translatable",但我不明白如何索引翻译后的单词。
我的模型看起来像:
namespace App\Models;
use Astrotomic\Translatable\Translatable;
use App\Models\Search\ShowIndexConfigurator;
use ScoutElastic\Searchable;
...
class Show extends BaseModel
{