-
Notifications
You must be signed in to change notification settings - Fork 0
How to Build Search Index
W. Bomar edited this page Dec 9, 2021
·
7 revisions
Site search requires an index of content available to search.
- At least one page in CMS (see above).
- At least 15% of free disk space.
- For Mac/Windows
- At least 4GB of RAM allocated to Docker (see Docker Desktop > Preferences > Resources > Advanced).
- For Linux (Locally)
- Run
sudo sysctl -w vm.max_map_count=2146999999
(The minimum required by ES is 262144 but it doesn't seem to work). - Run
sudo sysctl -w vm.overcommit_memory=1
. - Run
sudo sysctl -p
(In order to persist in/etc/sysctl.conf
).
- Run
-
Completely shut down all of your containers and restart them.
-
Login to docker shell:
docker exec -it core_portal_django /bin/bash
-
Enter python shell:
python manage.py shell
-
Index all searchable content:
from portal.libs.elasticsearch.indexes import setup_files_index, setup_projects_index, setup_allocations_index setup_files_index() setup_projects_index() setup_allocations_index()
- Larger picture, related to Projects a.k.a. Shared Workspaces, "step 3 should ideally be done before any projects are created."
See Core-CMS/wiki: How to Build Search Index, but use core_portal_cms
for the docker service name.
- Source: instructions in Slack and clarification in Slack
TACC ACI WMA Core-Portal Project Documentation