{"action":"created","issue":{"url":"https://api.github.com/repos/graphhopper/graphhopper/issues/318","labels_url":"https://api.github.com/repos/graphhopper/graphhopper/issues/318/labels{/name}","comments_url":"https://api.github.com/repos/graphhopper/graphhopper/issues/318/comments","events_url":"https://api.github.com/repos/graphhopper/graphhopper/issues/318/events","html_url":"https://github.com/graphhopper/graphhopper/pull/318","id":56581607,"number":318,"title":"Incorporate filter search into the finding of the closest node search.","user":{"login":"KenSoutherland","id":1664445,"avatar_url":"https://avatars.githubusercontent.com/u/1664445?v=3","gravatar_id":"","url":"https://api.github.com/users/KenSoutherland","html_url":"https://github.com/KenSoutherland","followers_url":"https://api.github.com/users/KenSoutherland/followers","following_url":"https://api.github.com/users/KenSoutherland/following{/other_user}","gists_url":"https://api.github.com/users/KenSoutherland/gists{/gist_id}","starred_url":"https://api.github.com/users/KenSoutherland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KenSoutherland/subscriptions","organizations_url":"https://api.github.com/users/KenSoutherland/orgs","repos_url":"https://api.github.com/users/KenSoutherland/repos","events_url":"https://api.github.com/users/KenSoutherland/events{/privacy}","received_events_url":"https://api.github.com/users/KenSoutherland/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-02-04T20:19:32Z","updated_at":"2015-02-04T21:39:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/graphhopper/graphhopper/pulls/318","html_url":"https://github.com/graphhopper/graphhopper/pull/318","diff_url":"https://github.com/graphhopper/graphhopper/pull/318.diff","patch_url":"https://github.com/graphhopper/graphhopper/pull/318.patch"},"body":"The problem is as I discussed about the filtering. It's not a question of does the expanded search find a node or not, it's does the expanded search find a node that passes my filter. Inside of findClosest the findNetworkEntries returns a set of node ids, then we loop through these nodes using the edge explorer and the supplied filter. The basic search does not find a node that passes my filter so findClosest returns a \"null\" QueryResult. If I try and expand the search further I still don't find my node because no matter what value of maxRegionSearch, findNetworkEntries returns the first set of nodes that it finds but I already know those don't pass my filter, so once again they don't pass my filter and I get a \"null\" result. \r\n\r\nI've added the boolean to allow the filtering of the edges to be built into the search mechanism. I only added it to maintain backwards compatibility. I honestly don't see why this is not just done automatically.\r\n"},"comment":{"url":"https://api.github.com/repos/graphhopper/graphhopper/issues/comments/72945136","html_url":"https://github.com/graphhopper/graphhopper/pull/318#issuecomment-72945136","issue_url":"https://api.github.com/repos/graphhopper/graphhopper/issues/318","id":72945136,"user":{"login":"karussell","id":129644,"avatar_url":"https://avatars.githubusercontent.com/u/129644?v=3","gravatar_id":"","url":"https://api.github.com/users/karussell","html_url":"https://github.com/karussell","followers_url":"https://api.github.com/users/karussell/followers","following_url":"https://api.github.com/users/karussell/following{/other_user}","gists_url":"https://api.github.com/users/karussell/gists{/gist_id}","starred_url":"https://api.github.com/users/karussell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karussell/subscriptions","organizations_url":"https://api.github.com/users/karussell/orgs","repos_url":"https://api.github.com/users/karussell/repos","events_url":"https://api.github.com/users/karussell/events{/privacy}","received_events_url":"https://api.github.com/users/karussell/received_events","type":"User","site_admin":false},"created_at":"2015-02-04T21:39:27Z","updated_at":"2015-02-04T21:39:27Z","body":"Still there might be indeed a problem if e.g. your graph contains car and bike streets, now you search for the closest bike street but the findNetworkEntries method returns only nodes exploring car streets (e.g. close to a motorway)"}}