{"action":"created","issue":{"url":"https://api.github.com/repos/sleimanx2/plastic/issues/45","repository_url":"https://api.github.com/repos/sleimanx2/plastic","labels_url":"https://api.github.com/repos/sleimanx2/plastic/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/sleimanx2/plastic/issues/45/comments","events_url":"https://api.github.com/repos/sleimanx2/plastic/issues/45/events","html_url":"https://github.com/sleimanx2/plastic/issues/45","id":192592680,"number":45,"title":"\"type\" is not a valid parameter. ","user":{"login":"Damian89","id":11396147,"avatar_url":"https://avatars.githubusercontent.com/u/11396147?v=3","gravatar_id":"","url":"https://api.github.com/users/Damian89","html_url":"https://github.com/Damian89","followers_url":"https://api.github.com/users/Damian89/followers","following_url":"https://api.github.com/users/Damian89/following{/other_user}","gists_url":"https://api.github.com/users/Damian89/gists{/gist_id}","starred_url":"https://api.github.com/users/Damian89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Damian89/subscriptions","organizations_url":"https://api.github.com/users/Damian89/orgs","repos_url":"https://api.github.com/users/Damian89/repos","events_url":"https://api.github.com/users/Damian89/events{/privacy}","received_events_url":"https://api.github.com/users/Damian89/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-30T15:19:07Z","updated_at":"2016-11-30T15:36:04Z","closed_at":null,"body":"Do you have an idea how to resolve this issue:\r\n\r\n```\r\nUnexpectedValueException in AbstractEndpoint.php line 247:\r\n\"type\" is not a valid parameter. Allowed parameters are: \"analyzer\", \"analyze_wildcard\", \"default_operator\", \"df\", \"explain\", \"fields\", \"fielddata_fields\", \"filter_path\", \"from\", \"ignore_unavailable\", \"allow_no_indices\", \"expand_wildcards\", \"indices_boost\", \"lenient\", \"lowercase_expanded_terms\", \"preference\", \"q\", \"query_cache\", \"request_cache\", \"routing\", \"scroll\", \"search_type\", \"size\", \"sort\", \"source\", \"_source\", \"_source_exclude\", \"_source_include\", \"terminate_after\", \"stats\", \"suggest_field\", \"suggest_mode\", \"suggest_size\", \"suggest_text\", \"timeout\", \"track_scores\", \"version\", \"request_cache\", \"client\", \"custom\", \"filter_path\"\r\n```\r\n\r\nUsing CURL I see that my server has entries, which are automatically placed via Plastic, but I cant read/search them using this simple example:\r\n\r\n```\r\n$search = $request->input('search');\r\n$results = Plastic::search()->match('title',$search)->get();\r\n```\r\n\r\nThe error is very obvious - replacing:\r\n\r\n```\r\n    public function getType()\r\n    {\r\n        return $this->type;\r\n    }\r\n```\r\n\r\nwith:\r\n\r\n```\r\n    public function getType()\r\n    {\r\n         return 'searchindex'; // my type\r\n    }\r\n\r\n```\r\nworks well, but thats not nice. \r\n\r\nLooks like I forgot about something? Do you have an idea?"},"comment":{"url":"https://api.github.com/repos/sleimanx2/plastic/issues/comments/263904576","html_url":"https://github.com/sleimanx2/plastic/issues/45#issuecomment-263904576","issue_url":"https://api.github.com/repos/sleimanx2/plastic/issues/45","id":263904576,"user":{"login":"Damian89","id":11396147,"avatar_url":"https://avatars.githubusercontent.com/u/11396147?v=3","gravatar_id":"","url":"https://api.github.com/users/Damian89","html_url":"https://github.com/Damian89","followers_url":"https://api.github.com/users/Damian89/followers","following_url":"https://api.github.com/users/Damian89/following{/other_user}","gists_url":"https://api.github.com/users/Damian89/gists{/gist_id}","starred_url":"https://api.github.com/users/Damian89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Damian89/subscriptions","organizations_url":"https://api.github.com/users/Damian89/orgs","repos_url":"https://api.github.com/users/Damian89/repos","events_url":"https://api.github.com/users/Damian89/events{/privacy}","received_events_url":"https://api.github.com/users/Damian89/received_events","type":"User","site_admin":false},"created_at":"2016-11-30T15:36:04Z","updated_at":"2016-11-30T15:36:04Z","body":"Digging in your code, I got it working:\r\n\r\n`$results = Plastic::search()->type('searchindex')->match('title', $search)->get();`\r\nOR\r\n`$results = Plastic::search()->model( new Searchindex )->match('title', $search)->get();`\r\n\r\nBut hits(), maxScore(), ... do not work in $result. \r\n\r\nAny other ideas why type, index, ... are not being passed to Plastic?"}}
{"actor":{"display_login":"Damian89"}}