default search endpoint on, update the copyright notices for the test files, add Cache-Control headers if you want to use edge caching

This commit is contained in:
Aaron Blankstein
2017-04-12 18:18:16 -04:00
parent 584dbd6bc9
commit 566c2895ce
8 changed files with 76 additions and 16 deletions

View File

@@ -34,6 +34,7 @@ from flask_crossdomain import crossdomain
from api.config import DEFAULT_HOST, DEFAULT_PORT, DEBUG, MEMCACHED_TIMEOUT, MEMCACHED_ENABLED
from api.config import SEARCH_DEFAULT_LIMIT as DEFAULT_LIMIT, SEARCH_LUCENE_ENABLED as LUCENE_ENABLED
from api.utils import cache_control
from .substring_search import search_people_by_name, search_people_by_twitter
from .substring_search import search_people_by_username, search_people_by_bio
@@ -113,6 +114,7 @@ def test_alphanumeric(query):
@searcher.route('/search', methods = ["GET", "POST"], strict_slashes = False)
@crossdomain(origin='*')
@cache_control(MEMCACHED_TIMEOUT)
def search_by_name():
query = request.args.get('query')