Details about File Search
The following options can be set in seafevents.conf to control the behaviors of file search. You need to restart seafile and seahub to make them take effect.
Full text search is not enabled by default to save system resources. If you want to enable it, you need to follow the instructions below.
First you have to set the value of option in seafevents.conf
to true
.
cd /data/haiwen/seafile-pro-server-1.7.0/
./seafile.sh restart
You need to delete the existing search index and recreate it.
The search module uses an Elasticsearch server bundled with the Seafile Professional Server. However, you may have an existing Elasticsearch server or cluster running in your company. In this situation, you can change the config file to use your existing ES server or cluster.
This feature was added in Seafile Professional Server 2.0.5.
- Edit
seafevents.conf
, add settings in the section [INDEX FILES] to specify your ES server host and port:
[INDEX FILES]
external_es_server = true
es_host = 192.168.1.101
es_port = 9200
es_host
: The ip address of your ES server- : The listening port of ES server RESTful API. By default it should be
9200
If this does not work, you can try the following steps:
- Stop Seafile
- Remove the old search index
rm -rf pro-data/search
- Restart Seafile
- Wait one minute then run
./pro/pro.py search --update
The search index is updated every 10 minutes by default. So before the first index update is performed, you get nothing no matter what you search.
To be able to search immediately,
- Make sure you have started Seafile Server
- Update the search index manually:
./pro/pro.py search --update
The search functionality is based on elasticsearch, which is a java process. To increase the java heap size, you can use the ES_HEAP_SIZE
environment variable, e.g.: