{"action":"created","issue":{"url":"https://api.github.com/repos/elasticquent/Elasticquent/issues/37","repository_url":"https://api.github.com/repos/elasticquent/Elasticquent","labels_url":"https://api.github.com/repos/elasticquent/Elasticquent/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/elasticquent/Elasticquent/issues/37/comments","events_url":"https://api.github.com/repos/elasticquent/Elasticquent/issues/37/events","html_url":"https://github.com/elasticquent/Elasticquent/issues/37","id":134613797,"number":37,"title":"reindex","user":{"login":"mariavilaro","id":10522884,"avatar_url":"https://avatars.githubusercontent.com/u/10522884?v=3","gravatar_id":"","url":"https://api.github.com/users/mariavilaro","html_url":"https://github.com/mariavilaro","followers_url":"https://api.github.com/users/mariavilaro/followers","following_url":"https://api.github.com/users/mariavilaro/following{/other_user}","gists_url":"https://api.github.com/users/mariavilaro/gists{/gist_id}","starred_url":"https://api.github.com/users/mariavilaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariavilaro/subscriptions","organizations_url":"https://api.github.com/users/mariavilaro/orgs","repos_url":"https://api.github.com/users/mariavilaro/repos","events_url":"https://api.github.com/users/mariavilaro/events{/privacy}","received_events_url":"https://api.github.com/users/mariavilaro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-18T15:38:09Z","updated_at":"2016-02-19T09:15:54Z","closed_at":null,"body":"I'm a newbie both with elasticsearch and laravel so it's possible that I'm getting this wrong:\r\nWhen reindexing, it deletes the items that I have NOW in my source table, and then add them again, so if I deleted an item, it's not deleted from elasticsearch. Shouldn't reindex remove the non existent items?"},"comment":{"url":"https://api.github.com/repos/elasticquent/Elasticquent/issues/comments/186125478","html_url":"https://github.com/elasticquent/Elasticquent/issues/37#issuecomment-186125478","issue_url":"https://api.github.com/repos/elasticquent/Elasticquent/issues/37","id":186125478,"user":{"login":"timgws","id":1050232,"avatar_url":"https://avatars.githubusercontent.com/u/1050232?v=3","gravatar_id":"","url":"https://api.github.com/users/timgws","html_url":"https://github.com/timgws","followers_url":"https://api.github.com/users/timgws/followers","following_url":"https://api.github.com/users/timgws/following{/other_user}","gists_url":"https://api.github.com/users/timgws/gists{/gist_id}","starred_url":"https://api.github.com/users/timgws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timgws/subscriptions","organizations_url":"https://api.github.com/users/timgws/orgs","repos_url":"https://api.github.com/users/timgws/repos","events_url":"https://api.github.com/users/timgws/events{/privacy}","received_events_url":"https://api.github.com/users/timgws/received_events","type":"User","site_admin":false},"created_at":"2016-02-19T09:15:54Z","updated_at":"2016-02-19T09:15:54Z","body":"That exists already.\r\n\r\nYou want to call [`->deleteFromIndex()`](https://github.com/elasticquent/Elasticquent/blob/0234890532ab50fd1944c476b9e9929173753879/src/ElasticquentCollectionTrait.php#L43-L65) on the model, then run reindex() again."}}