Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async returns max_results, but not centered around query location. #35

Open
GoogleCodeExporter opened this issue May 28, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Use async branch to search a large database, using large max distance.

What is the expected output? What do you see instead?
max_results results are returned, but they are not clustered around the search 
location. They may be offset towards one compass quadrant (NE, SE, SW, NW)

What version of the product are you using? On what operating system?
Async branch, patched for issues 13, 16, 23, 33.

Please provide any additional information below.
This behaviour is caused by over optimisation. max_results are found and 
returned before searching adjacents geocells of equal resolution for closer 
results.

Eliminate this behaviour by changing geomodel.py from:

if len(results) >= max_results:
        if DEBUG:
          logging.debug(('GeoModel Proximity Query: '
                         'Wanted %d results, ending search') %
                        (max_results,))
        break

to:
if len(results) >= max_results and len(cur_geocells) == 4:
        if DEBUG:
          logging.debug(('GeoModel Proximity Query: '
                         'Wanted %d results, ending search') %
                        (max_results,))
        break

Original issue reported on code.google.com by [email protected] on 5 Nov 2012 at 12:45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant