hpi-schul-cloud / meta-search-engine

This is a meta search engine to join the forces of several Schul-Cloud search engines
GNU Affero General Public License v3.0
0 stars 2 forks source link

meta-search-engine

Build Status Docker Build Status

This is a meta search engine to join the forces of several Schul-Cloud search engines. The meta-search-engine is part of a greater project to scale up the content search and this issue is the reason why it was created.

This is part of the minimal working prototype. This README file must explain,

Related Work

You can view the issue for the creation of this search engine.

How To Use

You can use this search engine using different means:

You can use Docker to run the search engine. Therefore, you can pass the arguments of which searches to join to the docker command.

As an example, you want to see how your search engine performs when it would be used inside the official Schul-Cloud search. Your search engine runs on http://localhost:8080 and the Schul-Cloud search runs at http://search.schul-cloud.org. You can run the docker-container at port 9999.

docker run -p 9999:80 schulcloud/meta-search-engine http://localhost:8080 http://search.schul-cloud.org

Now, if you request a search for Einstein at http://localhost:9999/v1/search?Q=Einstein, you should see your results along the other results.

Likewise, if you install the seach engine locally, you can edit the search-engines.txt file. Each line contains a search engine.

Query

If you run the search engine, you can also specify which search engines should be requested. If a usual query looks like Q=einstein, a query requesting an additional search engine running under http://localhost:8080/v1/search looks like Q=einstein&Search=http://localhost:8080/v1/search.

You can request several additional search engines by adding a number behind the Search parameter:

Q=einstein
Q=einstein&Search1=http://localhost:8080/v1/search
Q=einstein&Search1=http://localhost:8080/v1/search&Search2=http://localhost:8080/v1/search
...

If you do not like to request the default search engines, you can use the Default=false parameter. Then, only the search engines passed with Search query parameters are requested.

Installation

Docker

You can install docker.

wget -O- https://get.docker.com | sh
sudo usermod -aG docker $USER

To enable that you do not need sudo to run the docker containers, log in and out.

Once you installed docker, you can create a new schulcloud/meta-search-engine container like this:

docker build -t schulcloud/meta-search-engine .

Then, you can run the container and map the http port to port 8000.

docker run --rm -p 8000:80 schulcloud/meta-search-engine

Now, you should be able to request a search:

curl -i 'http://localhost:8000/?Q=einstein'