Skip to content

Disabling Query Rewrites

Eliza Margaretha edited this page Nov 4, 2021 · 1 revision

Kustvakt full version includes some query rewrites that may not be relevant for systems other than KorAP. The query rewrites can be disabled in the spring configuration file, which is located at: /Kustvakt-full/src/main/resources/default-config.xml

Go to the lines populating the query rewrites as shown below.

<!-- Rewrite -->
<bean id="foundryRewrite" class="de.ids_mannheim.korap.rewrite.FoundryRewrite"/>
<bean id="collectionRewrite" class="de.ids_mannheim.korap.rewrite.CollectionRewrite"/>
<bean id="virtualCorpusRewrite" class="de.ids_mannheim.korap.rewrite.VirtualCorpusRewrite"/>
<bean id="queryReferenceRewrite" class="de.ids_mannheim.korap.rewrite.QueryReferenceRewrite"/>
	
<util:list id="rewriteTasks" value-type="de.ids_mannheim.korap.rewrite.RewriteTask">
  <ref bean="foundryRewrite" />
  <ref bean="collectionRewrite" />
  <ref bean="virtualCorpusRewrite" />
  <ref bean="queryReferenceRewrite" />
</util:list>

Comment the bean and the reference of the query rewrite to disable. For instance, to disable collectionRewrite, the bean with id="collectionRewrite" and ref bean="collectionRewrite" should be commented.

Collection rewrite manages rewrites on virtual corpora by using availability regex in kustvakt.conf, which should also be commented.

## availability regex
## only support |
# availability.regex.free = CC-BY.*
# availability.regex.public = ACA.*|QAO.NC
# availability.regex.all = QAO.*

Advanced Setting

Developer Setting

Search services

Metadata services

Authentication and Authorization services

Client services

Super client services

Plugin services

User services

User group services

Virtual corpus services

Virtual corpus access services

Administrative services

Description services

Clone this wiki locally