{"action":"created","issue":{"url":"https://api.github.com/repos/ruflin/Elastica/issues/892","labels_url":"https://api.github.com/repos/ruflin/Elastica/issues/892/labels{/name}","comments_url":"https://api.github.com/repos/ruflin/Elastica/issues/892/comments","events_url":"https://api.github.com/repos/ruflin/Elastica/issues/892/events","html_url":"https://github.com/ruflin/Elastica/issues/892","id":95272014,"number":892,"title":"Suggestions and Highlighting","user":{"login":"yamilrevilla","id":6315677,"avatar_url":"https://avatars.githubusercontent.com/u/6315677?v=3","gravatar_id":"","url":"https://api.github.com/users/yamilrevilla","html_url":"https://github.com/yamilrevilla","followers_url":"https://api.github.com/users/yamilrevilla/followers","following_url":"https://api.github.com/users/yamilrevilla/following{/other_user}","gists_url":"https://api.github.com/users/yamilrevilla/gists{/gist_id}","starred_url":"https://api.github.com/users/yamilrevilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamilrevilla/subscriptions","organizations_url":"https://api.github.com/users/yamilrevilla/orgs","repos_url":"https://api.github.com/users/yamilrevilla/repos","events_url":"https://api.github.com/users/yamilrevilla/events{/privacy}","received_events_url":"https://api.github.com/users/yamilrevilla/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-15T19:31:43Z","updated_at":"2015-07-21T05:09:23Z","closed_at":null,"body":"Hi, ruflin :+1: \r\n\r\nI'm facing two little problems, the first is that I set the highlighting but nothing happen. I'm using this code based on the test file\r\n\r\n```php\r\n$qS = new Query\\QueryString($query_string);\r\n\r\n$query = new Query;\r\n        $query\r\n            ->setFrom(0)\r\n            ->setSize(10)\r\n            ->setHighlight(\r\n                array(\r\n                    'fields' => array(\r\n                        'titulo' => array(\r\n                            'fragment_size' => 200,\r\n                            'number_of_fragments' => 1,\r\n                        ),\r\n                    ),\r\n                )\r\n            )\r\n            ->setSort(['destacado_categoria' => 'desc', '_score' => 'desc']);\r\n```\r\n\r\nThe result comes without the highlights. \r\n\r\nThe second problem is the Phrase suggester, I got this code (based on the test file lib/Elastica/Test/Suggest/PhraseTest.php)\r\n\r\n```php\r\n$buscador = new Search($cliente);\r\n$buscador->addIndex('anuncios')->addType('anuncio');\r\n\r\n$suggest = new Suggest();\r\n$phraseSuggest = new Phrase('suggest1', 'titulo');\r\n$phraseSuggest->setText($query_string);\r\n$phraseSuggest->setAnalyzer('simple')->setHighlight('<suggest>', '</suggest>')->setStupidBackoffSmoothing(0.4);\r\n$phraseSuggest->addCandidateGenerator(new DirectGenerator('titulo'));\r\n$suggest->addSuggestion($phraseSuggest);\r\n\r\n$result = $buscador->search($suggest);\r\n$suggests = $result->getSuggests();\r\n\r\nprint_r($suggests);\r\n```\r\n\r\nI have a document with 'Samsung' in the 'titulo' so I search 'Samsong' and nothing happen, this is what i get\r\n\r\n```\r\nArray\r\n(\r\n    [suggest1] => Array\r\n        (\r\n            [0] => Array\r\n                (\r\n                    [text] => samsong\r\n                    [offset] => 0\r\n                    [length] => 7\r\n                    [options] => Array\r\n                        (\r\n                        )\r\n\r\n                )\r\n\r\n        )\r\n\r\n)\r\n```\r\n\r\nWhat I'm doing wrong friend? Thanks for an amazing job.\r\n\r\nPD: Forgive me for my bad English :smile: \r\n"},"comment":{"url":"https://api.github.com/repos/ruflin/Elastica/issues/comments/123162211","html_url":"https://github.com/ruflin/Elastica/issues/892#issuecomment-123162211","issue_url":"https://api.github.com/repos/ruflin/Elastica/issues/892","id":123162211,"user":{"login":"ruflin","id":244900,"avatar_url":"https://avatars.githubusercontent.com/u/244900?v=3","gravatar_id":"","url":"https://api.github.com/users/ruflin","html_url":"https://github.com/ruflin","followers_url":"https://api.github.com/users/ruflin/followers","following_url":"https://api.github.com/users/ruflin/following{/other_user}","gists_url":"https://api.github.com/users/ruflin/gists{/gist_id}","starred_url":"https://api.github.com/users/ruflin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruflin/subscriptions","organizations_url":"https://api.github.com/users/ruflin/orgs","repos_url":"https://api.github.com/users/ruflin/repos","events_url":"https://api.github.com/users/ruflin/events{/privacy}","received_events_url":"https://api.github.com/users/ruflin/received_events","type":"User","site_admin":false},"created_at":"2015-07-21T05:09:23Z","updated_at":"2015-07-21T05:09:23Z","body":"@yamilrevilla Sorry for the late answer. Both of these queries also heavily depend on the documents you put in. Can you create a gist that makes the above reproducable? Means it also adds documents and the shows what your expected outcome is?"}}