Skip to content
rdelbru edited this page Sep 14, 2011 · 9 revisions

SIREn Query Parser

This document explains how to register the SIREn query parser within Solr and describes its features.

Introduction

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.

Registration of the SIREn Query Parser

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"/>

Create a SIREn Request Handler

Next, you can define a Solr request handler for the SIREn query parser:

  <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 patterns should match in at least on of the fields
       -->  
       <str name="nqfo">scattered</str>
			 <str name="fl">
         id
       </str>
     </lst>
  </requestHandler>