-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Upgrade search app to Elastic Search 5.4 #3373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 12 commits
f291550
a922986
b7e1189
848ee3c
e5c42c0
4cf429f
1291961
a4208de
ec992c3
8200055
d0a8ce2
0c538f8
75cf46f
f2d0758
ede0827
87c1c9d
213a390
9dafb8b
07be69d
dedf97f
24f9776
ba8c675
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,6 +116,7 @@ def INSTALLED_APPS(self): # noqa | |
if donate: | ||
apps.append('django_countries') | ||
apps.append('readthedocsext.donate') | ||
apps.append('readthedocsext.search') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this under There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I fixed that here, actually: https://github.com/rtfd/readthedocs.org/pull/3356/files#diff-5973fe59a4d52278d55f884d145bd5d7R11 :) Waiting on it to get merged. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Merged #3356, this can be rebased |
||
return apps | ||
|
||
TEMPLATE_LOADERS = ( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,8 +87,13 @@ | |
if 'readthedocsext.donate' in settings.INSTALLED_APPS: | ||
# Include donation URL's | ||
groups.append([ | ||
url(r'^sustainability/', include('readthedocsext.donate.urls')), | ||
url(r'^sustainability/', include('readthedocsext.donate.urls')) | ||
]) | ||
if 'readthedocsext.search' in settings.INSTALLED_APPS: | ||
for num, _url in enumerate(rtd_urls): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same question again. This is only if the donate app is installed, why? I don't find the relationship between donate app and search app. |
||
if _url and hasattr(_url, 'name') and _url.name == 'search': | ||
rtd_urls[num] = \ | ||
url(r'^search/', 'readthedocsext.search.mainsearch.elastic_search', name='search') | ||
if not getattr(settings, 'USE_SUBDOMAIN', False) or settings.DEBUG: | ||
groups.insert(0, docs_urls) | ||
if getattr(settings, 'ALLOW_ADMIN', True): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is not
id
isinteger
orlong
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the new ES doesn't let these vary types, or something. I was getting an error, and it doesn't really need to be an ID, so we will just use it as a string like the others.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ericholscher Seems like they support it
https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html
Without ID, what can be here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does seem strange that we're coercing to string here, but I'm not familiar enough with ES to say why token/string is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not that it's better, it just doesn't work otherwise. I don't fully understand it either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It throws this error:
RequestError: TransportError(400, u'illegal_argument_exception', u'mapper [id] cannot be changed from type [long] to [keyword]')