Implement linear search #150

Closed
dcramer opened this Issue May 13, 2011 · 2 comments

Projects

None yet

2 participants

Owner
dcramer commented May 13, 2011

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
Owner
dcramer commented May 13, 2011

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

Contributor
alex commented Dec 12, 2012

This has long been fixed.

@dcramer dcramer closed this Dec 12, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment