Git Product home page Git Product logo

laravel-scout-elasticsearch's Introduction

介绍

Laravel Scout 开发的 Elasticsearch 驱动;
之所以造这个轮子是因为 laravel-scout-elastic 不支持中文分词且不支持多张表;
Elasticquent 这种不基于 scout 的又略麻烦;

文档

详细文档

教程

链接

laravel-scout-elasticsearch's People

Contributors

baijunyao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-scout-elasticsearch's Issues

laravel debuger报错

No alive nodes found in your cluster {"exception":"[object] (Elasticsearch\Common\Exceptions\NoNodesAvailableException(code: 0)

配置都对了,服务器上es也对外可访问了,但是生成索引的时候报错。

scout import的时候报错:

image

打印如下:
isAlive()是false.

PS D:\phpStudy\PHPTutorial\WWW\forum> php artisan scout:import "App\Thread"
Elasticsearch\Connections\Connection {#682
  #handler: Closure {#683
    class: "Elasticsearch\Connections\Connection"
    this: Elasticsearch\Connections\Connection {#682}
    parameters: {
      $request: {
        typeHint: "array"
      }
      $connection: {
        typeHint: "Elasticsearch\Connections\Connection"
      }
      $transport: {
        typeHint: "Elasticsearch\Transport"
        default: null
      }
      $options: {}
    }
    use: {
      $handler: Closure {#670 …}
    }
    file: "D:\phpStudy\PHPTutorial\WWW\forum\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Connections\Connection.php"
    line: "212 to 318"
  }
  #serializer: Elasticsearch\Serializers\SmartSerializer {#673}
  #transportSchema: "http"
  #host: "http://1xxx3.12:9200"
  #path: null
  #log: Psr\Log\NullLogger {#655}
  #trace: Psr\Log\NullLogger {#653}
  #connectionParams: array:1 [
    "client" => []
  ]
  #headers: array:3 [
    "Content-Type" => array:1 [
      0 => "application/json"
    ]
    "Accept" => array:1 [
      0 => "application/json"
    ]
    "User-Agent" => array:1 [
      0 => "elasticsearch-php/6.7.1 (Windows NT 10.0, PHP 7.3.6)"
    ]
  ]
  #isAlive: false
  -pingTimeout: 1
  -lastPing: 0
  -failedPings: 0
  -lastRequest: []
}

配置文件如下:
image

.env
image

另外,文档上面的配置文件有点问题,我是在你的博客里面找到了正确的配置方法。

v4.0问题求助

image
v4.0composer不下来,第二就是无法使用分页,会报错; 如果可以的话,帮忙解决下~~谢谢

按照文档弄的报错

{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index [laravel_hbh_202004166887]","resource.type":"index_or_alias","resource.id":"laravel_hbh_202004166887","index_uuid":"_na_","index":"laravel_hbh_202004166887"}],"type":"index_not_found_exception","reason":"no such index [laravel_hbh_202004166887]","resource.type":"index_or_alias","resource.id":"laravel_hbh_202004166887","index_uuid":"_na_","index":"laravel_hbh_202004166887"},"status":404}
http://big.com/search?s=%2F%2Fsearch

es 最新版 用的

[求助] 请问如何实现Request Body Query?

如题,目前看到所有的教程和示例都是使用的URI search(如Article::search('功能齐全的搜索引擎')->get()->toArray(),效果其实就是URI查询)。

请问search()方法如何实现Request Body Query查询?如何指定请求方式(GET/POST/PUT等)?即类似:

POST /movies/_search { "query":{ "match":{ "title":"Last Christams" } } }

感激不尽!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.