Skip to content

larasearch:reindex -> Call to undefined method Illuminate\Database\Query\Builder::reindex()  #97

@prigal

Description

@prigal

Hello,

Thanks for your work, can't wait to test it, but I have an issue and I don't understand.

When I run

php artisan larasearch:reindex App\\Product --relations

I got this trace :

---> Reindexing App\Product

  [BadMethodCallException]                                               
  Call to undefined method Illuminate\Database\Query\Builder::reindex()  

This is my model :

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

use Iverberk\Larasearch\Traits\SearchableTrait;

class Product extends Model
{

    /**
     * Get the requests for the product.
     */
    public function requests()
    {
        return $this->hasMany('App\Request');
    }
}

I'm using Laravel 5.1 with your devL5 branch.

Previous command was ok :

php artisan larasearch:paths 'App\Product' --relations
{
    "paths": {
        "App\\Product": []
    },
    "reversedPaths": {
        "App\\Product": [
            ""
        ]
    }
}

And localhost:9200 :

{
  "status" : 200,
  "name" : "Quentin Quire",
  "cluster_name" : "elasticsearch",
  "version" : {
    "number" : "1.6.0",
    "build_hash" : "cdd3ac4dde4f69524ec0a14de3828cb95bbb86d0",
    "build_timestamp" : "2015-06-09T13:36:34Z",
    "build_snapshot" : false,
    "lucene_version" : "4.10.4"
  },
  "tagline" : "You Know, for Search"
}

Thanks for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions