This package implements an FCS 2.0 SRU endpoint front end for a CQI Server. CQL queries are translated into CQP and sent to the CQI server, then the result is written in an SRU/FCS specific format.
If you previously deployed the CQI-Bridge in version 1.2, take a look at UPGRADING.md for migrating to FCS 2.0 (version 2.0).
Limitations:
- Currently only one corpus is supported! For multiple corpora take a look at the fcs-korp-endpoint example implementation.
- only supports BASIC search (Hits DataView) via CQL (basically full-text search)
More Information about
- CQI: http://cwb.sourceforge.net/cqi.php
- CWB: http://cwb.sourceforge.net/
- FCS: https://www.clarin.eu/content/content-search
Modify sru-server-config.xml and endpoint-description.xml to have information about your corpora.
In addition you'll have to modify web.xml to contain the configuration of your CQI server, in particular the following params must be present:
cqi.serverHost- the host name of your CQI servercqi.serverPort- the port of your CQI servercqi.serverUsername- the user name on your CQI servercqi.serverPassword- the password for the above usercqi.defaultCorpus- a corpus which will be used for all the queriescqi.defaultCorpusPID- the PID of the corpus abovecqi.defaultCorpusRef- the Ref of the corpus above
You may need to change the CQI CONTEXT_STRUCTURAL_ATTRIBUTE = "s" if your corpus is structured differently.
By default, this endpoint will wrap results with the FCS Hits Data View. If you need to support the legacy FCS KWIC Data View (which is deprecated) but was the only Data View supported by the previous version of the endpoint implementation, you can re-enable it by setting the eu.clarin.sru.cqibridge.supportLegacyKWIC parameter in the web.xml to true. Both the Hits and KWIC Data Views will then be sent.
Note, however, that in some cases clients will aggregate results from both Data Views (to support legacy endpoints) so that results may appear twice.
To build the application run:
mvn clean packageThe application war file (sru-cqibridge-2.0.war) can be found in the folder target/.
Place and link it into the webapps folder of your Jetty or Tomcat ... server for deployment.
- Java 8+
- Some
warwebapps deployment server like Jetty or Tomcat - a locally reachable CQI/CQP-Server to connect and send queries to