-
Notifications
You must be signed in to change notification settings - Fork 36
Solr Query Parser
rdelbru edited this page Sep 14, 2011
·
9 revisions
This document explains how to register the SIREn query parser within Solr and describes its features.
The SIREn query parser provides a common interface for issuing keyword queries, NTriple queries, filter queries, or a combination of them over a SIREn's field. It provides a set of parameters to change its behaviour.
The SIREn query parser must be register in the solrconfig.xml file like this:
<!-- Example of Registration of the siren query parser. -->
<queryParser name="siren" class="org.sindice.siren.solr.SirenQParserPlugin"/>
In this example, this query parser is named siren
and will be accessible by the SIREn request handler that we will define next.
Next, you can define a Solr request handler, which will be named siren
, for the SIREn query parser like this:
<requestHandler name="siren" class="solr.StandardRequestHandler">
<!-- default values for query parameters -->
<lst name="defaults">
<str name="defType">siren</str>
<str name="echoParams">explicit</str>
<!-- Disable field query in keyword parser -->
<str name="disableField">true</str>
<str name="qf">
ntriple^1.0 url^1.2
</str>
<str name="nqf">
ntriple^1.0
</str>
<!-- the NTriple query multi-field operator:
- disjunction: the query should match in at least one of the fields
- scattered: each NTriple query pattern should match in at least one of the fields
-->
<str name="nqfo">scattered</str>
<str name="fl">id</str>
</lst>
</requestHandler>