Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Implement linear search #150

Closed
dcramer opened this Issue · 2 comments

2 participants

David Cramer Alex Gaynor
David Cramer
Owner

Full-text is hard. Let's start with a linear search, and move towards something better.

For example:

total, n = 0, 0
results = []
while total < 100 and n < 1000:
    for g in Group.objects.order_by('-last_seen')[n:100]:
        if has_matching_query(g, query):
            results.append(g)
    n+= 100
David Cramer
Owner

Another (working) implementation I did on this in another project: https://github.com/disqus/codebox/blob/master/codebox/apps/snippets/views.py#L31

Mostly as a prototype, but it should be fast enough

Alex Gaynor

This has long been fixed.

David Cramer dcramer closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.