example

 avatar
unknown
python
3 years ago
488 B
7
Indexable
query = 'football'

documents = [

    ['Why I love Football', 'Football is my life and ...', 'http://blah.blah/blah'],

    ['My sporting interests', 'Tennis, football and rugby are sports I love...', 'http://blah.blah/blah'],

    ['Football, football, football', 'This is a guide to the best things about...', 'http://blah.blah/blah']

]


class SearchEngine:

    def __init__(self, documents: list):
        self._documents = documents

    def search(self, query: str):
        pass
Editor is loading...