Closed btbonval closed 9 years ago
This is the only place INDEXDEN_INDEX
env var is referred to in code:
https://github.com/FinalsClub/karmaworld/blob/aa3b27296dff8b7707645e0bbbfcc8c708222841/karmaworld/apps/notes/search.py#L23-L24
It would seem that the code does not currently consider IndexDen to be optional, though I would prefer it be optional.
Can the search be easily modified to skip IndexDen if not available? If yes, make that change. If not, update documentation.
It looks like each function has MOCK_MODE
constant checked. If enabled, it appears to skip all search features. This comes from settings.TESTING
, which is set here:
https://github.com/FinalsClub/karmaworld/blob/650d4f06752fcebbd58945eb31c9485b1e580864/karmaworld/settings/common.py#L397
Ironically even if settings.TESTING
is enabled, the env var is still expected or crash. So let's leave settings.TESTING
as it was. If INDEXDEN_INDEX
is missing from env var, then we can also assume MOCK_MODE
is in effect independently of settings.TESTING
.
Putting the code in place to set MOCK_MODE
if INDEXDEN_INDEX
(and others) are missing helped get further in configuration. I won't consider this valid until the site is up and running and the search bar does not crash. The search bar shouldn't do anything ... including should not crash.
Site is up and running locally, search appears to do nothing at all (as desired in this case).
IndexDen is noted as "optional but recommended" in the README.
However, while running through local environment config, the following occurs:
No stacktrace, and it certainly implies that IndexDen is required.