{"action":"opened","issue":{"url":"https://api.github.com/repos/jarektkaczyk/eloquence/issues/80","repository_url":"https://api.github.com/repos/jarektkaczyk/eloquence","labels_url":"https://api.github.com/repos/jarektkaczyk/eloquence/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/jarektkaczyk/eloquence/issues/80/comments","events_url":"https://api.github.com/repos/jarektkaczyk/eloquence/issues/80/events","html_url":"https://github.com/jarektkaczyk/eloquence/issues/80","id":147140303,"number":80,"title":"Search on relationship multiple word field just matches first word","user":{"login":"wolfius","id":1514442,"avatar_url":"https://avatars.githubusercontent.com/u/1514442?v=3","gravatar_id":"","url":"https://api.github.com/users/wolfius","html_url":"https://github.com/wolfius","followers_url":"https://api.github.com/users/wolfius/followers","following_url":"https://api.github.com/users/wolfius/following{/other_user}","gists_url":"https://api.github.com/users/wolfius/gists{/gist_id}","starred_url":"https://api.github.com/users/wolfius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolfius/subscriptions","organizations_url":"https://api.github.com/users/wolfius/orgs","repos_url":"https://api.github.com/users/wolfius/repos","events_url":"https://api.github.com/users/wolfius/events{/privacy}","received_events_url":"https://api.github.com/users/wolfius/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-09T15:53:04Z","updated_at":"2016-04-09T15:53:04Z","closed_at":null,"body":"Hi!\r\n\r\nI'm using search with the simplest config, just `Model::search($terms)` where `$terms` can be 1 or many words.\r\n\r\nI'm noticing that, when I make a search directly on a Model that has a multiple word field, the search matches the terms on any of the words of the field, but if I search on this same field through a relationship from another model, the terms only match the first word.\r\n\r\nExample: \r\n\r\nI have a Dealership with name 'Ford Whatever'. If I search `Dealership::search('whatever')` it brings me that dealership, if I search 'ford' it brings me all dealerships that start with that word.\r\n\r\nNow I have Salesmans that belongs to Dealership 'Ford Whatever'. If I search (having defined 'dealership.name' as a searchable field) `Salesman::search('Whatever')` it brings me no results, but I know the search is being done in that field because if I search 'Ford', it brings me all salesmen that belong to dealerships that start with 'Ford' (which it really doesn't help much).\r\n\r\nI don't think this is working as intended but I'll appreciate if someone could tell me if I'm doing soemthing wrong, or maybe a tip on a workaround?\r\n\r\nThanks!"}}