- Go 76.9%
- JavaScript 13.8%
- TypeScript 8.3%
- Dockerfile 0.9%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| js_fetcher | ||
| src/github.com/matrix-org/matrix-search | ||
| vendor | ||
| .gitignore | ||
| config.sample.json | ||
| DESIGN.md | ||
| Dockerfile | ||
| README.md | ||
| run.sh | ||
matrix-search
matrix-search will be a Full Text Search engine for Matrix, providing improved query searching, performance and ability to be ran locally, with E2E capabilities.
This project uses gb.
Volatility
This project is in rapid-development so things may change entirely day-to-day. This is not something that is usable yet.
Local Daemon
The project is in a working (not user friendly) state.
Both processes require fs access to a common json config file [RO]
and [RW] access to a common data directory to write databases to.
For these instructions these will both be in the current working directory
as config.json and data respectively.
To get started:
- ensure you have
nodenpm/yarngo>=1.7gbgitinstalled and working. - clone this repository, and enter it
- create a config file, either based on the sample or using the included utility
gen-config(gen-config -his your friend) - build the Go portion by running
gb build - execute the created executable in the background or in another terminal; e.g
./bin/matrix-search-local --config=config.json --data=data & - navigate to the go portion using
pushd js_fetcher - install dependencies using
npm ioryarn - navigate back using
popd - run Node script in the background or in another terminal; e.g
node js_fetcher/index.js --config=config.json --data=data &
You will need to run a modified Matrix client which sends /search requests to localhost:8000
riot-web supports these modifications using the matrix-search branches on matrix-js-sdk and matrix-react-sdk and specifying the Search URL using custom_search_url in config.json
To run in a docker container
You'll need to copy config.sample.json to config.json (and replace with
appropriate homeserver url, user id, device id and access token or generate
using gen-config).
Then you can build and run the docker image like so:
$ docker build -t matrix-search .
$ docker run -v data:/node/js_fetcher/data -t -i -p 8000:8000 matrix-search