Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Readme.md

Basic search demo

Basic search using term

Basic Search

Notebook Link

  pipeline = [
    {
        '$search': {
            'text': {
                'query': "fight club",
                'path': "title"
            }
        }
    }
]

Fuzzy

Notebook Link

pipeline = [
    {
        '$search': {
            'text': {
                'query': "fight club",
                'path': "title"
            }
        },
        'fuzzy': {
            'maxEdits': 2
        }
    }
]

Highlighting

Notebook Link

pipeline = [
    {
        '$search': {
            'text': {
                'query': "fight",
                'path': "title"
            },
            # text highlighting
            'highlight': {"path": "title"}
        }
    }, {
        '$project': {
            'highlights': {"$meta": "searchHighlights"}
        }
    }
]

App

And here's an app that combines it all into a single REST endpoint:

link

Author

Reach out to Ethan Steininger for help