{"action":"created","issue":{"url":"https://api.github.com/repos/codeforamerica/ohana-api/issues/365","labels_url":"https://api.github.com/repos/codeforamerica/ohana-api/issues/365/labels{/name}","comments_url":"https://api.github.com/repos/codeforamerica/ohana-api/issues/365/comments","events_url":"https://api.github.com/repos/codeforamerica/ohana-api/issues/365/events","html_url":"https://github.com/codeforamerica/ohana-api/issues/365","id":104834200,"number":365,"title":"All service areas from all services at location inherited when using 'keyword' search.","user":{"login":"cderenburger","id":13293901,"avatar_url":"https://avatars.githubusercontent.com/u/13293901?v=3","gravatar_id":"","url":"https://api.github.com/users/cderenburger","html_url":"https://github.com/cderenburger","followers_url":"https://api.github.com/users/cderenburger/followers","following_url":"https://api.github.com/users/cderenburger/following{/other_user}","gists_url":"https://api.github.com/users/cderenburger/gists{/gist_id}","starred_url":"https://api.github.com/users/cderenburger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cderenburger/subscriptions","organizations_url":"https://api.github.com/users/cderenburger/orgs","repos_url":"https://api.github.com/users/cderenburger/repos","events_url":"https://api.github.com/users/cderenburger/events{/privacy}","received_events_url":"https://api.github.com/users/cderenburger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-04T05:47:20Z","updated_at":"2015-09-04T16:11:57Z","closed_at":null,"body":"When performing a <code>keyword=</code> search and setting a <code>service_area=</code> parameter, the results page includes all service areas for all services at a location, rather than the service area for the matching service.  This behavior is not present when setting a <code>category=</code> parameter.\r\n\r\nThis issue is perhaps better presented with some examples.\r\n\r\nWhen performing a search for \"Food Pantries\" the following results are given.\r\nhttps://win211-web-search.herokuapp.com/locations?utf8=%E2%9C%93&keyword=Food+Pantries&service_area=Wahkiakum&location=&org_name=\r\n\r\n![keyword_search](https://cloud.githubusercontent.com/assets/13293901/9677038/a001c51c-5289-11e5-80b4-947759005fe2.jpg)\r\n\r\nIf doing the same search but changing <code>keyword=</code> for <code>category[]=</code> the results are a correct match between the <code>category[]=</code> and <code>service_area=</code>\r\n\r\nhttps://win211-web-search.herokuapp.com/locations?utf8=%E2%9C%93&category[]=Food+Pantries&service_area=Wahkiakum&location=&org_name=\r\n\r\n![category_search](https://cloud.githubusercontent.com/assets/13293901/9677109/98d34666-528a-11e5-9c74-9210274b53d3.jpg)\r\n\r\n\r\n\"Puget Sound Labor Agency\", \"Lifelong\", and \"Northwest Harvest\" all include at least one service that includes the taxonomy term \"Food Pantries\", but that service does not contain the service area currently selected in the example.  These locations include other services which contain the service area, but not the taxonomy term.\r\n\r\nhttps://win211-web-search.herokuapp.com/locations/puget-sound-labor-agency?keyword=Food+Pantries&location=&org_name=&service_area=Wahkiakum&utf8=%E2%9C%93\r\n\r\n![details](https://cloud.githubusercontent.com/assets/13293901/9677162/4f3c1f04-528b-11e5-973a-d2474c038f26.jpg)\r\n\r\nThe Puget Sound Labor Agency is highlighted here as the simpler service for an example with one program the \"Food Pantry\" containing the taxonomy term \"Food Pantries\" in the service area \"King\" County.  This service is listed in the search results for \"Food Pantries\" all counties/service_areas in the state because the other program \"Wheelchair Ramps\" contains all 39 counties in the service area.\r\n\r\nIs there any way to have the <code>keyword=</code> searches return the correct services areas like <code>category=</code> searches?\r\n"},"comment":{"url":"https://api.github.com/repos/codeforamerica/ohana-api/issues/comments/137779352","html_url":"https://github.com/codeforamerica/ohana-api/issues/365#issuecomment-137779352","issue_url":"https://api.github.com/repos/codeforamerica/ohana-api/issues/365","id":137779352,"user":{"login":"cderenburger","id":13293901,"avatar_url":"https://avatars.githubusercontent.com/u/13293901?v=3","gravatar_id":"","url":"https://api.github.com/users/cderenburger","html_url":"https://github.com/cderenburger","followers_url":"https://api.github.com/users/cderenburger/followers","following_url":"https://api.github.com/users/cderenburger/following{/other_user}","gists_url":"https://api.github.com/users/cderenburger/gists{/gist_id}","starred_url":"https://api.github.com/users/cderenburger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cderenburger/subscriptions","organizations_url":"https://api.github.com/users/cderenburger/orgs","repos_url":"https://api.github.com/users/cderenburger/repos","events_url":"https://api.github.com/users/cderenburger/events{/privacy}","received_events_url":"https://api.github.com/users/cderenburger/received_events","type":"User","site_admin":false},"created_at":"2015-09-04T16:11:57Z","updated_at":"2015-09-04T16:11:57Z","body":"On the excel workbook I use to convert the info I need I've been matching services to locations, perhaps I need to flip that and instead match locations to services.  This would create a separate location (even if it contains the same info) for every service.  May be worth a try to see if it produces the desired results.\r\n\r\nOn the ohana-web-search I'd like to be able to keep the user input to a single search field, which is great because our own DB provider unfortunately requires different input fields for different types of searches.  If I understand correctly if the <code>keyword</code> search finds a match in a category, it returns those matches (ranked higher) I think in the search results while also performing a full text search.  Is it possible to have the <code>keyword</code> not perform a full text search, or rather return only category results if the string it is passed is an -exact- match for a category term?\r\n\r\nFor example a place I have some odd results is a keyword search for \"Furniture\".  I have a category term \"BM-3000.2000 - Furniture\", but in my <code>keyword</code> search results I also receive matches for \"TE-7900 - Street Furniture\" because \"furniture\" is in the taxonomy term.\r\n\r\nIs it possible for the keyword search to return only -exact- category matches if it finds that the string it is supplied is an -exact- match for a category?"}}