{"action":"closed","issue":{"url":"https://api.github.com/repos/floriansemm/SolrBundle/issues/114","repository_url":"https://api.github.com/repos/floriansemm/SolrBundle","labels_url":"https://api.github.com/repos/floriansemm/SolrBundle/issues/114/labels{/name}","comments_url":"https://api.github.com/repos/floriansemm/SolrBundle/issues/114/comments","events_url":"https://api.github.com/repos/floriansemm/SolrBundle/issues/114/events","html_url":"https://github.com/floriansemm/SolrBundle/issues/114","id":132015196,"number":114,"title":"The results returns true all the time","user":{"login":"safwan74","id":13835770,"avatar_url":"https://avatars.githubusercontent.com/u/13835770?v=3","gravatar_id":"","url":"https://api.github.com/users/safwan74","html_url":"https://github.com/safwan74","followers_url":"https://api.github.com/users/safwan74/followers","following_url":"https://api.github.com/users/safwan74/following{/other_user}","gists_url":"https://api.github.com/users/safwan74/gists{/gist_id}","starred_url":"https://api.github.com/users/safwan74/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/safwan74/subscriptions","organizations_url":"https://api.github.com/users/safwan74/orgs","repos_url":"https://api.github.com/users/safwan74/repos","events_url":"https://api.github.com/users/safwan74/events{/privacy}","received_events_url":"https://api.github.com/users/safwan74/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-07T21:32:03Z","updated_at":"2016-05-11T12:06:10Z","closed_at":"2016-05-11T12:06:10Z","body":"I have the following code:\r\n\r\n    public function searchPageAction(Request $request)\r\n    {\r\n       \r\n            $searchfor = $request->query->get('textbox');\r\n           \r\n       $query = $this->get('solr.client')->createQuery('PagesBundle:Article');\r\n$query->addSearchTerm('title_s', $searchfor);\r\n$query->addField('title_s'); \r\n$query->addField('id'); \r\n$query->addField('content_s'); \r\n//$query->addSearchTerm('content_s', $searchfor);\r\n\r\n$results = $query->getResult();\r\n        \r\n        return $this->render('PagesBundle:page:search-results.html.twig', array('message'=>$results,\r\n            ));\r\n    }\r\n\r\nThe problem I have is that the query returns true all the time even if the string from the request is empty! It doesn't filter the results. \r\n\r\nI can see that I can index the data in solr using the bundle, however the problem I have is that it returns all the results even if the string is empty \"\". What am I doing wrong. \r\n\r\nBy the way, I like the extension and thank you for the efforts, please excuse me as I am newbie to  solr.  "}}