Skip to content

mrfuxi/simple_search

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a really basic search engine for Django. To use, simply add simple_search to INSTALLED_APPS
and register models for searching as follows:

class MyModel(Model):
    field1 = models.CharField(max_length=1000)

    class Search:
         fields = [
             "field1"
         ]


Then import simple_search.models.search and call:

search(MyModel, 'this is a "search string"')

search() can take pagination options. There is still plenty unimplemented (see the comment in models.py)

The ranking algorithm prioritises multiple word matches and uncommon matches.

About

A simple search API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%