<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $Id: search_fields.xml,v 1.73.2.15 2016-11-21 14:10:49 ngantier Exp $ -->
<pmbfields>
	<!-- Zone fixedFields :
		Liste des champs de recherche possibles de la base de données
		Chaque champ est modélisé par le tag <field> :
		<field @att=id,title,notdisplaycol,unimarcfield,memoryEngineForbidden>
			-unimarcfield : code du champ unimarc associé : Expl: 200$a -> titre propre
			-id : numéro unique arbitraire
			-title : Texte qui sera affiché dans l'écran de recherche
			-notdisplaycol : liste des colonnes à ne pas afficher en recherche multi-critères pour un champ
			-expl : notdisplaycol="3,4" : Masque la colonne avec le libellé et celle avec l'opérateur
			-memoryEngineForbidden : "yes" interdit l'utilisation du moteur memory pour la création des tables temporaires
			<field> contient les sous tags :
				<input @att=type,filtering,> : type de saisie
					-filtering: (yes) Filtrer les résultats en fonction des droits d'accès
					-type (text|list|marc_list|query_list) : 
						@type=list (dans le cas d'une saisie par liste), input contient les sous champs :
						 	<queryList> : requete pour récupérer les values de la liste. La requete doit avoir 2 colonnes
										  -la première donne le code à retourner
										  -la deuxième donne le libellé dans la liste
										  
				<query> : requete associée au champ et à l'opérateur
				<query @att=for,multipleWords,regDiacrit>
					-for : nom de l'opérateur auquel correspond la requete 
					 (les opérateurs non listés ne seront pas pris en compte), 
					-multipleWords (yes|no) : la requete tient compte de plusieurs termes saisis avec des espaces
					-regDiacrit (yes|no) : les termes sont passés par la fonction de nettoyage des mots vides et des accents
			 		<query> contient les sous tags :
						<main> : Corps principal de la requete, 
							-!!p!! sera remplacé dans la requete par le texte saisi pour la recherche, 
							-!!multiple_term!! (uniquement si multipleWords="yes") sera remplacé par la série 
							 de tests de la clause where pour chaque mot saisi
						
						<multipleTerm> : terme de condition utilisé pour remplacer !!multiple_term!!
						<multipleOperator> : opérateur utilisé entre les termes de conditions 
						<class @att=fields > : Libellé de la classe à utiliser pour la nouvelle recherche booléen (voir searcher.class.php)
							-fields : Champs, sous champs à prendre en compte pour cette recherche (séparer les champs avec , et les sous champs d'un champ avec ; (voir champs_base.xml)
	-->
	<memoryEngineAllowed>yes</memoryEngineAllowed>
	<fixedFields>
		<field title="msg:title_search" id="1" separator="msg:champs_principaux_query" >
			<var name="opac_modules_search_title" visibility="yes">
				<value visibility="no">-1</value>
			</var>
			<input type="text"/>
			<query for="BOOLEAN" wordSearch="yes">
				<class>searcher_title</class>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (index_sew like ' !!p!!%')]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (index_sew like '%!!p!! ')]]></main>
			</query>
			<query for="EXACT" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (index_sew=' !!p!! ')]]></main>
			</query>
		</field>
		<field title="msg:global_search" id="42">
			<var name="opac_modules_search_all" visibility="yes">
				<value visibility="no">-1</value>
			</var>
			<input type="text"/>
			<variable name="opac_indexation_docnum_allfields" type="global" />
			<variable name="ck_affiche" type="input">
				<var name="pmb_indexation_docnum" visibility="yes" hidden="no">
					<value visibility="no">0</value>
				</var>
				<default type="value">0</default>
				<input type="hidden">
					<value>1</value>
				</input> 
			</variable>
			<variable name= "is_num" type="input" comment="msg:docnum">
				<var name="pmb_indexation_docnum" visibility="yes" hidden="no">
					<value visibility="no">0</value>
				</var>
				<default type="var">opac_indexation_docnum_allfields</default>
				<input type="checkbox" default_on="ck_affiche" class="search_all_docnum">
					<value>1</value>
					<comments>
						<label value="1">oui</label>
						<label value="0">non</label>
					</comments>
				</input>
			</variable>
			<query for="BOOLEAN" wordSearch="yes">
				<class>searcher_all_fields</class>
			</query>
		</field>
		<field title="msg:author_search" id="2">
			<var name="opac_modules_search_author" visibility="yes">
				<value visibility="no">-1</value>
			</var>
			<input type="authoritie" ajax="authors" selector="auteur" p1="param1" p2="param2"/>
			<query for="BOOLEAN" wordSearch="yes" stemming="no">
				<class>searcher_authors</class>
			</query>
			<query for="STARTWITH" regDiacrit="yes" Keep_EmptyWord="yes">
				<main><![CDATA[select distinct responsability_notice as notice_id from responsability, authors where index_author like ' !!p!!%' and responsability_author=author_id]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes" Keep_EmptyWord="yes">
				<main><![CDATA[select distinct responsability_notice as notice_id from responsability, authors where index_author like '%!!p!! ' and responsability_author=author_id]]></main>
			</query>
			<query for="EXACT" regDiacrit="yes" Keep_EmptyWord="yes">
				<main><![CDATA[select distinct responsability_notice as notice_id from responsability, authors where index_author=' !!p!! ' and responsability_author=author_id]]></main>
			</query>
			<query for="AUTHORITY">
				<main><![CDATA[select distinct responsability_notice as notice_id from responsability,authors where responsability_author=' !!p!! ' and responsability_author=author_id]]></main>
			</query>
			<query for='ISEMPTY'>
				<main><![CDATA[SELECT distinct notice_id from notices left join responsability on responsability_notice = notice_id where responsability_author is null]]></main>
			</query>
			<query for='ISNOTEMPTY'>
				<main><![CDATA[SELECT distinct responsability_notice as notice_id from responsability]]></main>
			</query>
		</field>
		<field title="msg:recherche_type_auteur" id="25">
			<input type="list">
				<options>
					<option value="70">msg:personnes_physiques_search</option>
					<option value="71">msg:collectivites_search</option>
					<option value="72">msg:congres_search</option>
				</options>	
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct responsability_notice as notice_id from responsability, authors where responsability_author=author_id and author_type='!!p!!']]></main>
			</query>
		</field>	
		<field title="msg:publisher_search" id="3">
			<var name="opac_modules_search_publisher" visibility="yes">
				<value visibility="no">-1</value>
			</var>
			<input type="authoritie" ajax="publishers" selector="editeur" p1="p1" p2="p2"/>
			<query for="BOOLEAN" wordSearch="yes" stemming="no">
				<class>searcher_publishers</class>
			</query>
			<query for="STARTWITH" regDiacrit="yes" Keep_EmptyWord="yes">
				<main><![CDATA[select distinct notice_id from notices, publishers where (index_publisher like ' !!p!!%') and (ed_id=ed1_id or ed_id=ed2_id)]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes" Keep_EmptyWord="yes">
				<main><![CDATA[select distinct notice_id from notices, publishers where (index_publisher like '%!!p!! ') and (ed_id=ed1_id or ed_id=ed2_id)]]></main>
			</query>
			<query for="EXACT" regDiacrit="no">
				<main><![CDATA[select distinct notice_id from notices, publishers where (ed_name like '!!p!!') and (ed_id=ed1_id or ed_id=ed2_id)]]></main>
			</query>
			<query for="AUTHORITY">
				<main><![CDATA[select distinct notice_id from notices where (ed1_id=!!p!! or ed2_id=!!p!!)]]></main>
			</query>
			<query for='ISEMPTY'>
				<main><![CDATA[select distinct notice_id from notices where ed1_id = 0 and ed2_id = 0]]></main>
			</query>
			<query for='ISNOTEMPTY'>
				<main><![CDATA[select distinct notice_id from notices where (ed1_id != 0 or ed2_id != 0)]]></main>
			</query>	
		</field>
		<field title="msg:date_publication_or_annee_edition" id="23">
			<input type="text" placeholder="msg:format_date_input_text_placeholder" />
			<query for="EQ" detectDate="__">
				<main><![CDATA[select distinct notice_id from notices where date_parution like '!!p!!']]></main>
			</query>
			<query for="LT" detectDate="min">
				<main><![CDATA[select distinct notice_id from notices where (date_parution<'!!p!!' and date_parution>'0000-00-00')]]></main>
			</query>
			<query for="GT" detectDate="max">
				<main><![CDATA[select distinct notice_id from notices where date_parution>'!!p!!']]></main>
			</query>
			<query for="LTEQ" detectDate="max">
				<main><![CDATA[select distinct notice_id from notices where (date_parution<='!!p!!' and date_parution>'0000-00-00')]]></main>
			</query>
			<query for="GTEQ" detectDate="min">
				<main><![CDATA[select distinct notice_id from notices where date_parution>='!!p!!']]></main>
			</query>
			<query for="ISEMPTY" detectDate="01">
				<main><![CDATA[select distinct notice_id from notices where date_parution like '0000-00-00']]></main>
			</query>
			<query for="ISNOTEMPTY" detectDate="01">
				<main><![CDATA[select distinct notice_id from notices where date_parution not like '0000-00-00']]></main>
			</query>
			<query for="CONTAINS_AT_LEAST" multipleWords="yes" regdiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (!!multiple_term!!)]]></main>
				<multipleTerm>year like '%!!p!!%'</multipleTerm>
				<multipleOperator>or</multipleOperator>
			</query>
			<query for="CONTAINS_ALL" multipleWords="yes" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (!!multiple_term!!)]]></main>
				<multipleTerm>year like '%!!p!!%'</multipleTerm>
				<multipleOperator>and</multipleOperator>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (year like '!!p!!%')]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (year like '%!!p!!')]]></main>
			</query>
			<query for="EXACT" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (year='!!p!!')]]></main>
			</query>
		</field>
		<field title="msg:coll_search" id="4">
			<var name="opac_modules_search_collection" visibility="yes">
				<value visibility="no">-1</value>
			</var>
			<input type="authoritie" ajax="collections" selector="collection" p1="p1" p2="p2"/>
			<query for="BOOLEAN" wordSearch="yes" stemming="no">
				<class>searcher_collection</class>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices, collections where (index_coll like ' !!p!!%') and (coll_id=collection_id)]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices, collections where (collection_name like '%!!p!!') and (coll_id=collection_id)]]></main>
			</query>
			<query for="EXACT" regDiacrit="no">
				<main><![CDATA[select distinct notice_id from notices, collections where (collection_name like '!!p!!') and (coll_id=collection_id)]]></main>
			</query>
			<query for="AUTHORITY">
				<main><![CDATA[select distinct notice_id from notices, collections where collection_id=!!p!! and coll_id=collection_id]]></main>
			</query>
			<query for='ISEMPTY'>
				<main><![CDATA[select distinct notice_id from notices where coll_id = 0]]></main>
			</query>
			<query for='ISNOTEMPTY'>
				<main><![CDATA[select distinct notice_id from notices where coll_id != 0]]></main>
			</query>
		</field>
		<field title="msg:subcoll_search" id="5">
			<var name="opac_modules_search_subcollection" visibility="yes">
				<value visibility="no">-1</value>
			</var>
			<input type="authoritie" ajax="subcollections" selector="subcollection" p1="p1" p2="p2"/>
			<query for="BOOLEAN" wordSearch="yes" stemming="no">
				<class>searcher_subcollection</class>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices, sub_collections where (index_sub_coll like ' !!p!!%') and (subcoll_id=sub_coll_id)]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices, sub_collections where (sub_coll_name like '%!!p!!') and (subcoll_id=sub_coll_id)]]></main>
			</query>
			<query for="EXACT" regDiacrit="no">
				<main><![CDATA[select distinct notice_id from notices, sub_collections where (sub_coll_name like '!!p!!') and (subcoll_id=sub_coll_id)]]></main>
			</query>
			<query for="AUTHORITY">
				<main><![CDATA[select distinct notice_id from notices where subcoll_id=!!p!!]]></main>
			</query>
			<query for='ISEMPTY'>
				<main><![CDATA[select distinct notice_id from notices where subcoll_id = 0]]></main>
			</query>
			<query for='ISNOTEMPTY'>
				<main><![CDATA[select distinct notice_id from notices where subcoll_id != 0]]></main>
			</query>
		</field>
		<field title="msg:serie_query" id="6">
			<input type="authoritie" ajax="serie" selector="serie" p1="param1" p2="param2"/>
			<query for="BOOLEAN" wordSearch="yes" stemming="no">
				<class>searcher_serie</class>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices, series where (serie_index like ' !!p!!%') and (tparent_id=serie_id)]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices, series where (serie_index like '%!!p!! ') and (tparent_id=serie_id)]]></main>
			</query>
			<query for="EXACT" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices, series where (serie_index=' !!p!! ') and (tparent_id=serie_id)]]></main>
			</query>
			<query for="AUTHORITY">
				<main><![CDATA[select distinct notice_id from notices where tparent_id='!!p!!']]></main>
			</query>
			<query for='ISEMPTY'>
				<main><![CDATA[select distinct notice_id from notices where tparent_id = 0]]></main>
			</query>
			<query for='ISNOTEMPTY'>
				<main><![CDATA[select distinct notice_id from notices where tparent_id != 0]]></main>
			</query>
		</field>
		<field title="msg:isbn_query" id="22">
			<input type="text"/>
			<query for="STARTWITH" isbnSearch="yes">
				<main><![CDATA[SELECT distinct notice_id from notices where !!multiple_term!!]]></main>
				<multipleTerm>code like '!!p!!%'</multipleTerm>
				<multipleOperator>or</multipleOperator>
			</query>
			<query for="ISEMPTY">
				<main><![CDATA[SELECT distinct notice_id from notices where code ='' or code is null]]></main>
			</query>
			<query for="ISNOTEMPTY">
				<main><![CDATA[SELECT distinct notice_id from notices where code!='' and code is not null]]></main>
			</query>
		</field>
		<field title="msg:titre_uniforme_search" id="51">
			<var name="opac_modules_search_titre_uniforme" visibility="yes">
				<value visibility="no">-1</value>
			</var>
			<input type="authoritie" ajax="titres_uniformes" selector="titres_uniformes" p1="p1" p2="p2"/>
			<query for="BOOLEAN" wordSearch="yes">
				<class>searcher_uniform_title</class>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct ntu_num_notice as notice_id from  notices_titres_uniformes, titres_uniformes where index_tu like ' !!p!!%' and ntu_num_tu=tu_id]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct ntu_num_notice as notice_id from  notices_titres_uniformes, titres_uniformes where index_tu like '%!!p!! ' and ntu_num_tu=tu_id]]></main>
			</query>
			<query for="EXACT" regDiacrit="no">
				<main><![CDATA[select distinct ntu_num_notice as notice_id from  notices_titres_uniformes, titres_uniformes where tu_name like '!!p!!' and ntu_num_tu=tu_id]]></main>
			</query>
			<query for="AUTHORITY">
				<main><![CDATA[select distinct ntu_num_notice as notice_id from notices_titres_uniformes, titres_uniformes where ntu_num_tu='!!p!!' and ntu_num_tu=tu_id]]></main>
			</query>
			<query for='ISEMPTY'>
				<main><![CDATA[select distinct notice_id from notices left join notices_titres_uniformes on notice_id = ntu_num_notice where ntu_num_notice is null]]></main>
			</query>
			<query for='ISNOTEMPTY'>
				<main><![CDATA[select distinct ntu_num_notice as notice_id from notices_titres_uniformes join titres_uniformes on ntu_num_tu=tu_id]]></main>
			</query>
		</field>
		<field title="msg:docnum_indexation_contenu" id="72">
			<input type="text"/>
			<query for="BOOLEAN" booleanSearch="yes">
				<main><![CDATA[select distinct uni.notice_id, pert from (
				select notice_id, !!pert_term!! as pert from notices, explnum 
				where (!!where_term!!) and explnum_notice=notice_id
				UNION
				select notice_id, !!pert_term!! as pert from notices, explnum, bulletins
				where (!!where_term!!) and (explnum_bulletin=bulletin_id and bulletin_notice=notice_id)
				UNION
				select notice_id, !!pert_term!! as pert from notices, explnum, bulletins
				where (!!where_term!!) and (explnum_bulletin=bulletin_id and num_notice=notice_id)
				) as uni join notices n on uni.notice_id=n.notice_id
				]]></main>
				<table>explnum</table>
				<index_l>explnum_index_wew</index_l>
				<index_i>explnum_index_sew</index_i>
				<id_field>explnum_notice</id_field>
				<fulltext>yes</fulltext>
			</query>
		</field>		
		<field title="msg:elink_notice" id="45">
			<input type="text"/>
			<query for="CONTAINS">
				<main>select distinct notice_id from notices where lien like concat('%',replace('!!p!!','*','%'),'%') and lien!=''</main>
			</query>
		</field>
		<field title="msg:recherche_format_electronique" id="46">
			<input type="text"/>
			<query for="CONTAINS_AT_LEAST" multipleWords="yes" regdiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (!!multiple_term!!)]]></main>
				<multipleTerm>eformat like '%!!p!!%'</multipleTerm>
				<multipleOperator>or</multipleOperator>
			</query>
			<query for="CONTAINS_ALL" multipleWords="yes" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (!!multiple_term!!)]]></main>
				<multipleTerm>eformat like '%!!p!!%'</multipleTerm>
				<multipleOperator>and</multipleOperator>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (eformat like '!!p!!%')]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (eformat like '%!!p!!')]]></main>
			</query>
			<query for="EXACT" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (eformat='!!p!!')]]></main>
			</query>
		</field>
		<field title="msg:explnum" id="44">
			<input type="query_list">
				<query>select distinct if(if(explnum_url,'URL',explnum_mimetype)!='',if(explnum_url,'URL',explnum_mimetype),''),if(if(explnum_url,'URL',explnum_mimetype)!='',if(explnum_url,'URL',explnum_mimetype),'Undefined') from explnum</query>
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct IF(explnum_notice!=0,explnum_notice,bulletin_notice) AS notice_id
					FROM explnum
					LEFT JOIN bulletins ON explnum_bulletin = bulletins.bulletin_id 
					WHERE if('!!p!!'='URL',explnum_url!='',explnum_mimetype='!!p!!')
					UNION
					SELECT DISTINCT num_notice AS notice_id
					FROM explnum
					JOIN bulletins ON explnum_bulletin = bulletins.bulletin_id AND explnum_notice=0
					WHERE num_notice!=0 AND if('!!p!!'='URL',explnum_url!='',explnum_mimetype='!!p!!')]]></main>
			</query>
		</field>	
		<field title="msg:statut_explnum_sort" id="73">
			<input type="query_list">
				<query>select id_explnum_statut, gestion_libelle from explnum_statut order by gestion_libelle</query>
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN explnum ON ( notice_id = explnum_notice ) 
				WHERE explnum_docnum_statut='!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN explnum ON explnum_bulletin = bulletin_id 
				WHERE explnum_docnum_statut='!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM explnum JOIN analysis ON (explnum_bulletin = analysis_bulletin AND explnum_bulletin !=0) 
				WHERE explnum_docnum_statut='!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM explnum JOIN bulletins ON (explnum_bulletin=bulletins.bulletin_id AND explnum_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE explnum_docnum_statut='!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
		</field>	
		<field title="msg:map_echelle" id="74" separator="msg:map_search">
			<var name="opac_map_activate" visibility="yes">
				<value visibility="no">0</value>
			</var> 
			<input type="query_list">
				<query>select map_echelle_id, map_echelle_name from map_echelles order by map_echelle_name</query>
			</input>
			<query for="EQ">
				<main><![CDATA[select distinct notice_id from notices where map_echelle_num=!!p!! order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:map_projection" id="75">
			<var name="opac_map_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type="query_list">
				<query>select map_projection_id, map_projection_name from map_projections order by map_projection_name</query>
			</input>
			<query for="EQ">
				<main><![CDATA[select distinct notice_id from notices where map_projection_num=!!p!! order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:map_ref" id="76">
			<var name="opac_map_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type="query_list">
				<query>select map_ref_id, map_ref_name from map_refs order by map_ref_name</query>
			</input>
			<query for="EQ">
				<main><![CDATA[select distinct notice_id from notices where map_ref_num=!!p!! order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:map_equinoxe" id="77">
			<var name="opac_map_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type="text"/>
			<query for="BOOLEAN" wordSearch="yes">
				<class>searcher_records_map_equinoxe</class>
			</query>
		</field>
		<field title="msg:map_emprise" id="78">
			<var name="opac_map_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type="map"/>
			<query for="CONTAINS">
				<main>select distinct map_emprise_obj_num as notice_id from map_emprises where map_emprise_type=11 and contains(geomfromtext('!!p!!'),map_emprise_data) = 1 union select distinct notcateg_notice as notice_id from notices_categories join map_emprises on num_noeud = map_emprises.map_emprise_obj_num where map_emprise_type = 2 and contains(geomfromtext('!!p!!'),map_emprise_data) = 1</main>
			</query>
			<query for="AERASUP">
				<main>select distinct map_emprise_obj_num as notice_id from map_emprises where map_emprise_type=11 and Area((map_emprise_data)) &gt; Area(geomfromtext('!!p!!')) union select distinct notcateg_notice as notice_id from notices_categories join map_emprises on num_noeud = map_emprises.map_emprise_obj_num where map_emprise_type = 2 and Area((map_emprise_data)) &gt; Area(geomfromtext('!!p!!'))</main>
			</query>
			<query for="AERAINF">
				<main>select distinct map_emprise_obj_num as notice_id from map_emprises where map_emprise_type=11 and Area((map_emprise_data)) &lt; Area(geomfromtext('!!p!!')) union select distinct notcateg_notice as notice_id from notices_categories join map_emprises on num_noeud = map_emprises.map_emprise_obj_num where map_emprise_type = 2 and Area((map_emprise_data)) &lt; Area(geomfromtext('!!p!!'))</main>
			</query>
			<query for="INTERSECTS">
				<main>select distinct map_emprise_obj_num as notice_id from map_emprises where map_emprise_type=11 and intersects(geomfromtext('!!p!!'),map_emprise_data) = 1 union select distinct notcateg_notice as notice_id from notices_categories join map_emprises on num_noeud = map_emprises.map_emprise_obj_num where map_emprise_type = 2 and intersects(geomfromtext('!!p!!'),map_emprise_data)</main>
			</query>
			<query for="ISEMPTY">
				<main>select notice_id from notices where notice_id not in (select distinct map_emprise_obj_num as notice_id from map_emprises where map_emprise_type=11) and notice_id not in (select distinct notcateg_notice as notice_id from notices_categories join map_emprises on num_noeud = map_emprises.map_emprise_obj_num where map_emprise_type = 2)</main>
			</query>
			<query for="ISNOTEMPTY">
				<main>select distinct map_emprise_obj_num as notice_id from map_emprises where map_emprise_type=11 union select distinct notcateg_notice as notice_id from notices_categories join map_emprises on num_noeud = map_emprises.map_emprise_obj_num where map_emprise_type = 2</main>
			</query>
		</field>
		<field title="msg:note_generale_search" id="7" separator="msg:notes_search">
			<var name="opac_modules_search_abstract" visibility="yes">
				<value visibility="no">-1</value>
			</var>
			<input type="text"/>
			<query for="BOOLEAN" wordSearch="yes">
				<class>searcher_general_note</class>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (n_gen like '!!p!!%')]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (n_gen like '%!!p!!')]]></main>
			</query>
			<query for="EXACT" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (n_gen like '!!p!!')]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where n_gen like '']]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where n_gen not like '']]></main>
			</query>
		</field>
		<field title="msg:note_contenu_search" id="8">
			<var name="opac_modules_search_abstract" visibility="yes">
				<value visibility="no">-1</value>
			</var>
			<input type="text"/>
			<query for="BOOLEAN" wordSearch="yes">
				<class>searcher_contents_note</class>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (n_contenu like '!!p!!%')]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (n_contenu like '%!!p!!')]]></main>
			</query>
			<query for="EXACT" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (n_contenu like '!!p!!')]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where n_contenu like '']]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where n_contenu not like '']]></main>
			</query>
		</field>
		<field title="msg:note_resume_query" id="9">
			<var name="opac_modules_search_abstract" visibility="yes">
				<value visibility="no">-1</value>
			</var>
			<input type="text"/>
			<query for="BOOLEAN" wordSearch="yes">
				<class>searcher_abstract</class>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (n_resume like '!!p!!%')]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (n_resume like '%!!p!!')]]></main>
			</query>
			<query for="EXACT" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (n_resume like '!!p!!')]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where n_resume like '']]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where n_resume not like '']]></main>
			</query>
		</field>
		<field title="msg:toutes_notes_query" id="10">
			<var name="opac_modules_search_abstract" visibility="yes">
				<value visibility="no">-1</value>
			</var>
			<input type="text"/>
			<query for="BOOLEAN" wordSearch="yes">
				<class>searcher_notes</class>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (concat(index_n_gen,index_n_contenu,index_n_resume) like ' !!p!!%')]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (concat(index_n_gen,index_n_contenu,index_n_resume) like '%!!p!! ')]]></main>
			</query>
			<query for="EXACT" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (concat(index_n_gen,index_n_contenu,index_n_resume) like ' !!p!! ')]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where concat(index_n_gen,index_n_contenu,index_n_resume) like '']]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where concat(index_n_gen,index_n_contenu,index_n_resume) not like '']]></main>
			</query>
		</field>
		<field title="msg:categories_search" id="11" separator="msg:indexations_query">
			<var name="opac_modules_search_category" visibility="yes">
				<value visibility="no">-1</value>
			</var>
			<input type="authoritie" ajax="categories" selector="categorie" p1="p1" p2="p2"/>
			<variable name="lang" type="global"/>
			<variable name="opac_thesaurus_defaut" type="global"/>
			<variable name="id_thesaurus" type="input" comment="msg:thes_libelle" span="thes_libelle">
				<var name="opac_thesaurus" visibility="yes">
					<value visibility="no">0</value>
				</var>
				<default type="var">opac_thesaurus_defaut</default>
				<input type="query_list">
					<query allChoice="yes" titleAllChoice="msg:thes_all">select id_thesaurus, libelle_thesaurus from thesaurus order by libelle_thesaurus</query>
				</input>
			</variable>
			<variable name="langue_defaut" type="calculated">
				<calc type="value_from_query">
					<query>select group_concat(langue_defaut SEPARATOR "','") as langue_defaut, 1 from thesaurus where id_thesaurus in (!!id_thesaurus!!) group by 2</query>
				</calc>
			</variable>
			<query for="BOOLEAN" multiple="yes">
				<part>
					<main>drop table if exists catdef</main>
				</part>
				<part>
					<main>create temporary table catdef as select num_noeud,libelle_categorie,index_categorie from noeuds, categories where categories.langue in ('!!langue_defaut!!') and noeuds.num_thesaurus in (!!id_thesaurus!!) and noeuds.id_noeud = categories.num_noeud</main>
				</part>
				<part>
					<main>alter table catdef add key (num_noeud)</main>
				</part>
				<part>
					<main>drop table if exists catlg</main>
				</part>
				<part>
					<main>create temporary table catlg as select num_noeud,libelle_categorie, index_categorie from noeuds, categories where categories.langue in ('!!lang!!') and noeuds.num_thesaurus  in (!!id_thesaurus!!) and noeuds.id_noeud = categories.num_noeud</main>
				</part>
				<part>
					<main>alter table catlg add key (num_noeud)</main>
				</part>
				<part booleanSearch="yes">
					<main>select notcateg_notice as notice_id,if(catlg.num_noeud is null, !!pert_term_2!!, !!pert_term_1!!) as pert from catdef left join catlg on catdef.num_noeud = catlg.num_noeud, notices_categories where notices_categories.num_noeud=catdef.num_noeud and ((!!where_term_1!!) or (catlg.num_noeud is null and !!where_term_2!!)) group by notice_id order by pert desc</main>
					<boolean>
						<table>catlg.categories</table>
						<index_l>catlg.libelle_categorie</index_l>
						<index_i>catlg.index_categorie</index_i>
						<id_field>catlg.num_noeud</id_field>
					</boolean>
					<boolean>
						<table>catdef.categories</table>
						<index_l>catdef.libelle_categorie</index_l>
						<index_i>catdef.index_categorie</index_i>
						<id_field>catdef.num_noeud</id_field>
					</boolean>
				</part>
			</query>
			<query for="STARTWITH" multiple="yes">
				<part>
					<main>drop table if exists catdef</main>
				</part>
				<part>
					<main>create temporary table catdef as select num_noeud,libelle_categorie,index_categorie from noeuds, categories where categories.langue in ('!!langue_defaut!!') and noeuds.num_thesaurus in (!!id_thesaurus!!) and noeuds.id_noeud = categories.num_noeud</main>
				</part>
				<part>
					<main>alter table catdef add key (num_noeud)</main>
				</part>
				<part>
					<main>drop table if exists catlg</main>
				</part>
				<part>
					<main>create temporary table catlg as select num_noeud,libelle_categorie, index_categorie from noeuds, categories where categories.langue in ('!!lang!!') and noeuds.num_thesaurus  in (!!id_thesaurus!!) and noeuds.id_noeud = categories.num_noeud</main>
				</part>
				<part>
					<main>alter table catlg add key (num_noeud)</main>
				</part>
				<part>
					<main>select notcateg_notice as notice_id from catdef left join catlg on catdef.num_noeud = catlg.num_noeud, notices_categories where notices_categories.num_noeud=catdef.num_noeud and ((catlg.libelle_categorie like '!!p!!%') or (catlg.num_noeud is null and catdef.libelle_categorie like '!!p!!%')) group by notice_id</main>
				</part>
			</query>
			<query for="ENDWITH" multiple="yes">
				<part>
					<main>drop table if exists catdef</main>
				</part>
				<part>
					<main>create temporary table catdef as select num_noeud,libelle_categorie,index_categorie from noeuds, categories where categories.langue in ('!!langue_defaut!!') and noeuds.num_thesaurus  in (!!id_thesaurus!!) and noeuds.id_noeud = categories.num_noeud</main>
				</part>
				<part>
					<main>alter table catdef add key (num_noeud)</main>
				</part>
				<part>
					<main>drop table if exists catlg</main>
				</part>
				<part>
					<main>create temporary table catlg as select num_noeud,libelle_categorie, index_categorie from noeuds, categories where categories.langue in ('!!lang!!') and noeuds.num_thesaurus  in (!!id_thesaurus!!) and noeuds.id_noeud = categories.num_noeud</main>
				</part>
				<part>
					<main>alter table catlg add key (num_noeud)</main>
				</part>
				<part>
					<main>select notcateg_notice as notice_id from catdef left join catlg on catdef.num_noeud = catlg.num_noeud, notices_categories where notices_categories.num_noeud=catdef.num_noeud and ((catlg.libelle_categorie like '%!!p!!') or (catlg.num_noeud is null and catdef.libelle_categorie like '%!!p!!')) group by notice_id</main>
				</part>
			</query>
			<query for="EXACT" multiple="yes">
				<part>
					<main>drop table if exists catdef</main>
				</part>
				<part>
					<main>create temporary table catdef as select num_noeud,libelle_categorie,index_categorie from noeuds, categories where categories.langue in('!!langue_defaut!!') and noeuds.num_thesaurus  in (!!id_thesaurus!!) and noeuds.id_noeud = categories.num_noeud</main>
				</part>
				<part>
					<main>alter table catdef add key (num_noeud)</main>
				</part>
				<part>
					<main>drop table if exists catlg</main>
				</part>
				<part>
					<main>create temporary table catlg as select num_noeud,libelle_categorie, index_categorie from noeuds, categories where categories.langue in('!!lang!!') and noeuds.num_thesaurus  in (!!id_thesaurus!!) and noeuds.id_noeud = categories.num_noeud</main>
				</part>
				<part>
					<main>alter table catlg add key (num_noeud)</main>
				</part>
				<part>
					<main>select notcateg_notice as notice_id from catdef left join catlg on catdef.num_noeud = catlg.num_noeud, notices_categories where notices_categories.num_noeud=catdef.num_noeud and ((catlg.libelle_categorie='!!p!!') or (catlg.num_noeud is null and catdef.libelle_categorie='!!p!!')) group by notice_id</main>
				</part>
			</query>
			<query for="AUTHORITY">
				<main><![CDATA[select distinct notcateg_notice as notice_id from notices_categories where notices_categories.num_noeud = !!p!!]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices left join notices_categories on notcateg_notice = notice_id where notices_categories.num_noeud is null]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notcateg_notice as notice_id from notices_categories]]></main>
			</query>
		</field>
		<field title="msg:concepts_search" id="1000">
			<var name="opac_modules_search_concept" visibility="yes">
				<value visibility="no">-1</value>
			</var>
			<input type="authoritie" ajax="concepts" selector="ontology" p1="p1" p2="p2"/>
			<query for="BOOLEAN" wordSearch="yes">
				<class>searcher_concept</class>
			</query>
			<query for="STARTWITH">
				<main>select distinct num_object as notice_id from index_concept join skos_fields_global_index on num_concept = id_item and code_champ = 1 where type_object = 1 and value like '!!p!!%'</main>
			</query>
			<query for="ENDWITH">
				<main>select distinct num_object as notice_id from index_concept join skos_fields_global_index on num_concept = id_item and code_champ = 1 where type_object = 1 and value like '%!!p!!'</main>
			</query>
			<query for="EXACT">
				<main>select distinct num_object as notice_id from index_concept join skos_fields_global_index on num_concept = id_item and code_champ = 1 where type_object = 1 and value like '!!p!!'</main>
			</query>
			<query for="AUTHORITY">
				<main><![CDATA[select distinct num_object as notice_id from index_concept where type_object = 1 and num_concept = !!p!!]]></main>
			</query>
			<query for="ISEMPTY">
				<main><![CDATA[select distinct notice_id from notices where notice_id not in (select distinct num_object as notice_id from index_concept where type_object = 1)]]></main>
			</query>
			<query for="ISNOTEMPTY">
				<main><![CDATA[select distinct num_object as notice_id from index_concept where type_object = 1]]></main>
			</query>
		</field>
		<field title="msg:search_autopostage_multicritere" id="54">
			<var name="thesaurus_auto_postage_search" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type="authoritie" ajax="categories_mul" selector="categorie" p1="p1" p2="p2"/>
			<variable name="lang" type="global"/>
			<variable name="opac_thesaurus_defaut" type="global"/>
			<variable name="id_thesaurus" type="input" comment="Thésaurus">
				<var name="thesaurus_mode_pmb" visibility="yes">
					<value visibility="no">0</value>
				</var>
				<default type="var">opac_thesaurus_defaut</default>
				<input type="query_list">
					<query allChoice="yes" titleAllChoice="msg:thes_all">select id_thesaurus, libelle_thesaurus from thesaurus order by libelle_thesaurus</query>
				</input>
			</variable>
			<variable name="langue_defaut" type="calculated">
				<calc type="value_from_query">
					<query>select group_concat(langue_defaut SEPARATOR "','") as langue_defaut, 1 from thesaurus where id_thesaurus in (!!id_thesaurus!!) group by 2</query>
				</calc>
			</variable>
			<!-- variables pour la recherche autorité... -->
			<variable name="limit_montant" type="calculated">
				<calc type="value_from_query">
					<query>select case valeur_param when '0' then '{0,0}' when '*' then '*' else concat('{0,',valeur_param,'}') end  as limit_montant from parametres where sstype_param='auto_postage_search_nb_montant' and type_param='thesaurus'</query>
				</calc>			
			</variable>
			<variable name="limit_descendant" type="calculated">
				<calc type="value_from_query">
					<query>select case valeur_param when '0' then '{0,0}' when '*' then '*' else concat('{0,',valeur_param,'}') end  as limit_montant from parametres where sstype_param='auto_postage_search_nb_descendant' and type_param='thesaurus'</query>
				</calc>			
			</variable>
			<query for="BOOLEAN" multiple="yes">
				<part>
					<main>drop table if exists catdef</main>
				</part>
				<part>
					<main>create temporary table catdef as select num_noeud,path_word_categ,index_path_word_categ from noeuds, categories where categories.langue in ('!!langue_defaut!!') and noeuds.num_thesaurus in (!!id_thesaurus!!) and noeuds.id_noeud = categories.num_noeud</main>
				</part>
				<part>
					<main>alter table catdef add key (num_noeud)</main>
				</part>
				<part>
					<main>drop table if exists catlg</main>
				</part>
				<part>
					<main>create temporary table catlg as select num_noeud,path_word_categ, index_path_word_categ from noeuds, categories where categories.langue in ('!!lang!!') and noeuds.num_thesaurus  in (!!id_thesaurus!!) and noeuds.id_noeud = categories.num_noeud</main>
				</part>
				<part>
					<main>alter table catlg add key (num_noeud)</main>
				</part>
				<part booleanSearch="yes">
					<main>select notcateg_notice as notice_id,if(catlg.num_noeud is null, !!pert_term_2!!, !!pert_term_1!!) as pert from catdef left join catlg on catdef.num_noeud = catlg.num_noeud, notices_categories where notices_categories.num_noeud=catdef.num_noeud and ((!!where_term_1!!) or (catlg.num_noeud is null and !!where_term_2!!)) group by notice_id</main>
					<boolean>
						<table>catlg.categories</table>
						<index_l>catlg.path_word_categ</index_l>
						<index_i>catlg.index_path_word_categ</index_i>
						<id_field>catlg.num_noeud</id_field>
					</boolean>
					<boolean>
						<table>catdef.categories</table>
						<index_l>catdef.path_word_categ</index_l>
						<index_i>catdef.index_path_word_categ</index_i>
						<id_field>catdef.num_noeud</id_field>
					</boolean>
				</part>
			</query>
			<query for="AUTHORITY" multiple="yes">
				<part>
					<main>drop table if exists catdef</main>
				</part>	
				<part>
					<main>create temporary table catdef as select uni.* from (select n.id_noeud,n.path from noeuds as n join noeuds as term on n.path like concat(term.path,'%') where n.path regexp concat('^',term.path,'(\/[0-9]+)!!limit_descendant!!$') and term.id_noeud = !!p!! union select n.id_noeud,n.path from noeuds as n join noeuds as term on term.path like concat(n.path,'%') where n.path != 0 and term.path regexp concat('^',n.path,'(\/[0-9]+)!!limit_montant!!$') and term.id_noeud = !!p!!)as uni</main>
				</part>		
				<part>
					<main>select distinct notcateg_notice as notice_id from catdef join notices_categories on catdef.id_noeud = notices_categories.num_noeud</main>
				</part>	
			</query>
		</field>
		<field title="msg:indexint_search" id="12">
			<var name="opac_modules_search_indexint" visibility="yes">
				<value visibility="no">-1</value>
			</var>
			<input type="authoritie" ajax="indexint" selector="indexint" p1="param1" p2="param2"/>
			<query for="BOOLEAN" wordSearch="yes">
				<class>searcher_indexint</class>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices, indexint where (index_indexint like ' !!p!!%') and (indexint=indexint_id)]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices, indexint where (index_indexint like '%!!p!! ') and (indexint=indexint_id)]]></main>
			</query>
			<query for="EXACT" regDiacrit="yes" >
				<main><![CDATA[select distinct notice_id from notices, indexint where ((index_indexint=' !!p!! ') or (indexint_name='!!p!!')) and (indexint=indexint_id)]]></main>
			</query>
			<query for="AUTHORITY">
				<main><![CDATA[select distinct notice_id from notices, indexint where (indexint='!!p!!') and (indexint=indexint_id)]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where indexint=0]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where indexint!=0]]></main>
			</query>
		</field>
		<field title="msg:keyword_search" id="13">
			<var name="opac_modules_search_keywords" visibility="yes">
				<value visibility="no">-1</value>
			</var>
			<input type="text"/>
			<query for="BOOLEAN" wordSearch="yes">
				<class>searcher_keywords</class>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (index_l like '!!p!!%')]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (index_l like '%!!p!!')]]></main>
			</query>
			<query for="EXACT" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (index_l like '!!p!!')]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (index_l like '')]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (index_l not like '')]]></main>
			</query>
		</field>
		<field title="msg:langue_publication_query" id="20" separator='msg:537'>
			<input type="marc_list">
				<name>lang</name>
				<restrictquery>SELECT group_concat(distinct code_langue SEPARATOR ',') as all_languages from notices_langues where type_langue=0</restrictquery>
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id from notices, notices_langues where code_langue='!!p!!' and type_langue=0 and notice_id=num_notice]]></main>
			</query>
			<query for="ISEMPTY">
				<main><![CDATA[select distinct notice_id from notices left join notices_langues on type_langue=0 and num_notice = notice_id where code_langue is null]]></main>
			</query>
			<query for="ISNOTEMPTY">
				<main><![CDATA[select distinct num_notice as notice_id from notices_langues where type_langue=0]]></main>
			</query>
		</field>
		<field title="msg:langue_originale_query" id="21">
			<input type="marc_list">
				<name>lang</name>
				<restrictquery>SELECT group_concat(distinct code_langue SEPARATOR ',') as all_languages from notices_langues where type_langue=1</restrictquery>
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id from notices, notices_langues where code_langue='!!p!!' and type_langue=1 and notice_id=num_notice]]></main>
			</query>
	 		<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices left join notices_langues on type_langue=1 and num_notice = notice_id where code_langue is null]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct num_notice as notice_id from notices_langues where type_langue=1]]></main>
			</query>
		</field>
		<field title="msg:doc_perio_art_query" id="14" separator="msg:types_query">
			<input type="list">
				<options>
					<option value="m">msg:documents_query</option>
					<option value="s">msg:serials_query</option>
					<option value="b">msg:bulletin_query</option>
					<option value="a">msg:articles_query</option>
				</options>	
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id from notices where niveau_biblio='!!p!!']]></main>
			</query>
		</field>
		<field title="msg:type_doc_sort" id="15">
			<input type="marc_list">
				<name>doctype</name>
				<restrictquery>SELECT group_concat(distinct typdoc SEPARATOR ',') as all_typdoc from notices</restrictquery>
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id from notices where typdoc='!!p!!']]></main>
			</query>
		</field>
		<field title="msg:localisation_sort" id="16" separator="msg:exemplaires_query">
			<var name="opac_show_exemplaires" visibility="yes">
				<value visibility="no">-1</value>
			</var>
			<input type="query_list">
				<query>select idlocation,location_libelle from docs_location where location_visible_opac=1 order by location_libelle</query>	
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice ) WHERE expl_location = '!!p!!' GROUP BY notice_id) UNION  (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id WHERE expl_location = '!!p!!' GROUP BY notice_id) UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) WHERE expl_location = '!!p!!' GROUP BY notice_id) UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) WHERE expl_location = '!!p!!' GROUP BY notice_id)) AS sub1]]></main>
			</query>
		</field>
		<field title="msg:sur_location_sort" id="55" >
			<var name="pmb_sur_location_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>	
			<input type="query_list">
				<query>select surloc_id,surloc_libelle from sur_location where surloc_visible_opac=1 order by surloc_libelle</query>	
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice ) 
				WHERE expl_location in(select idlocation from docs_location where surloc_num='!!p!!') GROUP BY notice_id) 
				UNION  (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_location in(select idlocation from docs_location where surloc_num='!!p!!') GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_location in(select idlocation from docs_location where surloc_num='!!p!!') GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_location in(select idlocation from docs_location where surloc_num='!!p!!') GROUP BY notice_id)) AS sub1]]></main>
			</query>
		</field>	
		<field title="msg:section" id="17">
			<var name="opac_show_exemplaires" visibility="yes">
				<value visibility="no">-1</value>
			</var>
			<input type="query_list">
				<query>select idsection,section_libelle from docs_section where section_visible_opac=1 order by section_libelle</query>	
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice ) 
				WHERE expl_section = '!!p!!' GROUP BY notice_id) 
				UNION  (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_section = '!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_section = '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_section = '!!p!!' GROUP BY notice_id)) AS sub1]]></main>
			</query>
		</field>
		<field title="msg:proprietary_search" id="18">
			<var name="opac_show_exemplaires" visibility="yes">
				<value visibility="no">-1</value>
			</var>
			<input type="query_list">
				<query>select idlender,lender_libelle from lenders order by lender_libelle</query>	
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice ) 
				WHERE expl_owner = '!!p!!' GROUP BY notice_id) 
				UNION  (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_owner = '!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_owner = '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_owner = '!!p!!' GROUP BY notice_id)) AS sub1]]></main>
			</query>
		</field>
		<field title="msg:support_search" id="19">
			<var name="opac_show_exemplaires" visibility="yes">
				<value visibility="no">-1</value>
			</var>
			<input type="query_list">
				<query>select idtyp_doc,tdoc_libelle from docs_type order by tdoc_libelle</query>	
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice ) 
				WHERE expl_typdoc = '!!p!!' GROUP BY notice_id) 
				UNION  (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_typdoc = '!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_typdoc = '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_typdoc = '!!p!!' GROUP BY notice_id)) AS sub1]]></main>
			</query>
		</field>
		<field title="msg:cote_search" id="24">
			<var name="opac_show_exemplaires" visibility="yes">
				<value visibility="no">-1</value>
			</var>
			<input type="text"/>
			<query for="STARTWITH">
				<main><![CDATA[select notice_id,expl_cote from exemplaires join notices on expl_notice=notice_id where expl_cote like '!!p!!%' 
					union select if(notice_b.notice_id is null, notice_s.notice_id,notice_b.notice_id) ,expl_cote
					from exemplaires join bulletins on expl_bulletin=bulletin_id left join notices as notice_b on num_notice=notice_b.notice_id left join notices as notice_s on notice_s.notice_id=bulletin_notice
					where expl_cote like '!!p!!%']]>
				</main>
			</query>
			<query for="CONTAINS">
				<main><![CDATA[select notice_id,expl_cote from exemplaires join notices on expl_notice=notice_id where expl_cote like '%!!p!!%' 
					union select if(notice_b.notice_id is null, notice_s.notice_id,notice_b.notice_id) ,expl_cote
					from exemplaires join bulletins on expl_bulletin=bulletin_id left join notices as notice_b on num_notice=notice_b.notice_id left join notices as notice_s on notice_s.notice_id=bulletin_notice
					where expl_cote like '%!!p!!%']]>
				</main>			
			</query>
			<query for="EXACT">
				<main><![CDATA[select notice_id,expl_cote from exemplaires join notices on expl_notice=notice_id where expl_cote like '!!p!!' 
					union select if(notice_b.notice_id is null, notice_s.notice_id,notice_b.notice_id) ,expl_cote
					from exemplaires join bulletins on expl_bulletin=bulletin_id left join notices as notice_b on num_notice=notice_b.notice_id left join notices as notice_s on notice_s.notice_id=bulletin_notice
					where expl_cote like '!!p!!']]>
				</main>				
			</query>
			<query for="ENDWITH">
			<main><![CDATA[select notice_id,expl_cote from exemplaires join notices on expl_notice=notice_id where expl_cote like '%!!p!!'
					union select if(notice_b.notice_id is null, notice_s.notice_id,notice_b.notice_id) ,expl_cote
					from exemplaires join bulletins on expl_bulletin=bulletin_id left join notices as notice_b on num_notice=notice_b.notice_id left join notices as notice_s on notice_s.notice_id=bulletin_notice
					where expl_cote like '%!!p!!']]>
				</main>
			</query>
		</field>
		<field title="msg:codestat" id="32">
			<input type="query_list">
				<query>select idcode,codestat_libelle from docs_codestat order by codestat_libelle</query>	
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice ) 
				WHERE expl_codestat = '!!p!!' GROUP BY notice_id) 
				UNION  (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_codestat = '!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_codestat = '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_codestat = '!!p!!' GROUP BY notice_id)) AS sub1]]></main>
			</query>
		</field>
		<field title="msg:date_parution_bulletin_query" id="28" separator="msg:serials_query_separator">
			<input type="date" placeholder="msg:format_date_input_placeholder"/>
			<query for="GT">
				<main><![CDATA[(select distinct notice_id from bulletins join analysis on analysis_bulletin=bulletin_id join notices nota on analysis_notice=nota.notice_id where date_date>'!!p!!') union (select distinct notice_id from bulletins join notices notb on num_notice=notb.notice_id where date_date>'!!p!!')]]></main>
			</query>
			<query for="GTEQ">
				<main><![CDATA[(select distinct notice_id from bulletins join analysis on analysis_bulletin=bulletin_id join notices nota on analysis_notice=nota.notice_id where date_date>='!!p!!') union (select distinct notice_id from bulletins join notices notb on num_notice=notb.notice_id where date_date>='!!p!!')]]></main>
			</query>
			<query for="EQ">
				<main><![CDATA[(select distinct notice_id from bulletins join analysis on analysis_bulletin=bulletin_id join notices nota on analysis_notice=nota.notice_id where date_date='!!p!!') union (select distinct notice_id from bulletins join notices notb on num_notice=notb.notice_id where date_date='!!p!!')]]></main>
			</query>
			<query for="LTEQ">
				<main><![CDATA[(select distinct notice_id from bulletins join analysis on analysis_bulletin=bulletin_id join notices nota on analysis_notice=nota.notice_id where date_date<='!!p!!') union (select distinct notice_id from bulletins join notices notb on num_notice=notb.notice_id where date_date<='!!p!!')]]></main>
			</query>
			<query for="LT">
				<main><![CDATA[(select distinct notice_id from bulletins join analysis on analysis_bulletin=bulletin_id join notices nota on analysis_notice=nota.notice_id where date_date<'!!p!!') union (select distinct notice_id from bulletins join notices notb on num_notice=notb.notice_id where date_date<'!!p!!')]]></main>
			</query>
		</field>
		<field title="msg:titre_perio_query" id="34">
			<input type="query_list" filtering="yes">
				<query>select notice_id, tit1 from notices !!acces_j!! !!statut_j!! where niveau_biblio='s' !!statut_r!! order by tit1, index_sew</query>
			</input>
			<query for="EQ">
				<main><![CDATA[ 
				select distinct uni.notice_id from (
					select distinct n_s.notice_id from notices n_s where n_s.niveau_biblio='s' and n_s.notice_id=!!p!!
					union 
					select distinct notice_id from bulletins join analysis on analysis_bulletin=bulletin_id join notices on analysis_notice=notice_id  where  bulletin_notice in (!!p!!) 
					union 
					select distinct notice_id from bulletins join notices on notice_id=num_notice and bulletin_notice in (!!p!!)
				) as uni join notices n on n.notice_id=uni.notice_id]]></main>
			</query>
		</field>
		<field title="msg:num_bull_query" id="35">
			<input type="text"/>
			<query for="CONTAINS">
				<main><![CDATA[select distinct notice_id from bulletins, analysis, notices where analysis_bulletin=bulletin_id and bulletin_numero like '%!!p!!%' and analysis_notice=notice_id]]></main>
			</query>
		</field>
		<field title="msg:collection_state_search_loc" id="56">
			<input type="query_list">
				<query>select idlocation,location_libelle from docs_location where location_visible_opac=1 order by location_libelle</query>	
			</input>
			<query for="EQ">
				<main><![CDATA[select distinct notice_id from notices join collections_state on (notice_id=id_serial) where location_id=!!p!!]]></main>
			</query>
		</field>
		<field title="msg:collection_state_search_surloc" id="57">
			<var name="pmb_sur_location_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type="query_list">
				<query>select surloc_id,surloc_libelle from sur_location where surloc_visible_opac=1 order by surloc_libelle</query>	
			</input>
			<query for="EQ">
				<main><![CDATA[select distinct notice_id from notices join collections_state on (notice_id=id_serial) join docs_location on (location_id=idlocation and surloc_num=!!p!!)]]></main>
			</query>
		</field>
	</fixedFields>
	
	<authpersoFields>
		<field dataType="all_fields" id="1" >
				<query for="BOOLEAN">
					<class>searcher_authperso</class>
				</query>				    
		</field>	    
	</authpersoFields>
	    
	<!-- Zone dynamicFields :
		Liste des champs personalisés par type de données
			<field @att=id,dataType,notdisplaycol,memoryEngineForbidden> 
			-id : numéro unique arbitraire
			-dataType : type de données du champ personalisé
			-notdisplaycol : liste des colonnes à ne pas afficher en recherche multi-critères pour un champ
			-expl : notdisplaycol="3,4" : Masque la colonne avec le libellé et celle avec l'opérateur
			-memoryEngineForbidden : "yes" interdit l'utilisation du moteur memory pour la création des tables temporaires
			<field> contient les sous tags :
			
				<query> : requete associée au champ et à l'opérateur
				<query @att=for,multipleWords,regDiacrit>
					-for : nom de l'opérateur auquel correspond la requete 
					 (les opérateurs non listés ne seront pas pris en compte), 
					-multipleWords (yes|no) : la requete tient compte de plusieurs termes saisis avec des espaces
					-regDiacrit (yes|no) : les termes sont passés par la fonction de nettoyage des mots vides et des accents
			 		<query> contient les sous tags :
					
						<main> : Corps principal de la requete, 
							-!!p!! sera remplacé dans la requete par le texte saisi pour la recherche, 
							-!!multiple_term!! (uniquement si multipleWords="yes") sera remplacé par la série  
							 de tests de la clause where pour chaque mot saisi
							-!!field!! sera remplacé par le numéro de champ personalisé
						
						<multipleTerm> : terme de condition utilisé pour remplacer !!multiple_term!!
						<multipleOperator> : opérateur utilisé entre les termes de conditions 
	-->
	<dynamicFields>
		<option order="" />
		<fieldType type="notices" prefix="d">
			<field dataType="small_text" id="1" >
				<query for="BOOLEAN" wordSearch="yes" searchableOnly="yes" notAllowedFor="list,query_list,date,external,resolve,marclist,query_auth">
					<class>searcher_pfield</class>
				</query>			
				<query for="CONTAINS_AT_LEAST" multipleWords="yes" regDiacrit="yes" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where !!multiple_term!!]]></main>
					<multipleTerm>notices_custom_champ=!!field!! and notices_custom_small_text like '%!!p!!%'</multipleTerm>
					<multipleOperator>or</multipleOperator>
				</query>
				<query for="CONTAINS_ALL" multipleWords="yes" regDiacrit="yes" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where !!multiple_term!!]]></main>
					<multipleTerm>notices_custom_champ=!!field!! and notices_custom_small_text like '%!!p!!%'</multipleTerm>
					<multipleOperator>and</multipleOperator>
				</query>
				<query for="STARTWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_small_text like '!!p!!%']]></main>
				</query>
				<query for="ENDWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_small_text like '%!!p!!']]></main>
				</query>
				<query for="EXACT" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_small_text='!!p!!']]></main>
				</query>
				<query for="EQ">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_small_text='!!p!!']]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[select distinct notice_id from notices left join notices_custom_values on notices_custom_origine=notice_id and notices_custom_champ=!!field!! where (notices_custom_small_text='' or notices_custom_small_text is null)]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_small_text!='']]></main>
				</query>
			</field>
			<field dataType="text" id="2">
				<query for="BOOLEAN" wordSearch="yes" searchableOnly="yes" notAllowedFor="list,query_list,date,external,resolve,marclist,query_auth">
					<class>searcher_pfield</class>
				</query>				
				<query for="CONTAINS_AT_LEAST" multipleWords="yes" regDiacrit="yes" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where !!multiple_term!!]]></main>
					<multipleTerm>notices_custom_champ=!!field!! and notices_custom_text like '%!!p!!%'</multipleTerm>
					<multipleOperator>or</multipleOperator>
				</query>
				<query for="CONTAINS_ALL" multipleWords="yes" regDiacrit="yes" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where !!multiple_term!!]]></main>
					<multipleTerm>notices_custom_champ=!!field!! and notices_custom_text like '%!!p!!%'</multipleTerm>
					<multipleOperator>and</multipleOperator>
				</query>
				<query for="STARTWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_text like '!!p!!%']]></main>
				</query>
				<query for="ENDWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_text like '%!!p!!']]></main>
				</query>
				<query for="EXACT" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_text='!!p!!']]></main>
				</query>
				<query for="EQ">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_text='!!p!!']]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[select distinct notice_id from notices left join notices_custom_values on notices_custom_origine=notice_id and notices_custom_champ=!!field!! where (notices_custom_text='' or notices_custom_text is null)]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_text!='']]></main>
				</query>
			</field>
			<field dataType="integer" id="3"  >
				<query for="EQ">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_integer='!!p!!']]></main>
				</query>
				<query for="LT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_integer<'!!p!!']]></main>
				</query>
				<query for="GT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_integer>'!!p!!']]></main>
				</query>
				<query for="LTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_integer<='!!p!!']]></main>
				</query>
				<query for="GTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_integer>='!!p!!']]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[select distinct notice_id from notices left join notices_custom_values on notices_custom_origine=notice_id and notices_custom_champ=!!field!! where (notices_custom_integer='' or notices_custom_integer is null)]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_integer!='']]></main>
				</query>
			</field>
			<field dataType="float" id="4">
				<query for="EQ">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and round(notices_custom_float,LENGTH(SUBSTRING_INDEX('!!p!!','.',-1)))='!!p!!']]></main>
				</query>
				<query for="LT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and round(notices_custom_float,LENGTH(SUBSTRING_INDEX('!!p!!','.',-1)))<'!!p!!']]></main>
				</query>
				<query for="GT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and round(notices_custom_float,LENGTH(SUBSTRING_INDEX('!!p!!','.',-1)))>'!!p!!']]></main>
				</query>
				<query for="LTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and round(notices_custom_float,LENGTH(SUBSTRING_INDEX('!!p!!','.',-1)))<='!!p!!']]></main>
				</query>
				<query for="GTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and round(notices_custom_float,LENGTH(SUBSTRING_INDEX('!!p!!','.',-1)))>='!!p!!']]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[select distinct notice_id from notices left join notices_custom_values on notices_custom_origine=notice_id and notices_custom_champ=!!field!! where (notices_custom_float='' or notices_custom_float is null)]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_float!='']]></main>
				</query>
			</field>
			<field dataType="date" id="5">
				<query for="EQ">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_date='!!p!!']]></main>
				</query>
				<query for="LT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_date<'!!p!!']]></main>
				</query>
				<query for="GT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_date>'!!p!!']]></main>
				</query>
				<query for="LTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_date<='!!p!!']]></main>
				</query>
				<query for="GTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_date>='!!p!!']]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[select distinct notice_id from notices left join notices_custom_values on notices_custom_origine=notice_id and notices_custom_champ=!!field!! where (notices_custom_date='' or notices_custom_date='0000-00-00' or notices_custom_date is null)]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[select distinct notices_custom_origine as notice_id from notices_custom_values where notices_custom_champ=!!field!! and notices_custom_date!='' and notices_custom_date!=0]]></main>
				</query>
			</field>
		</fieldType>
		
		<fieldType type="authperso" prefix="a">
			<field dataType="all_fields" id="10">
				<query for="STARTWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[SELECT DISTINCT notice_authperso_notice_num as notice_id FROM authperso_authorities JOIN notices_authperso ON notice_authperso_authority_num = id_authperso_authority WHERE authperso_index_infos_global like ' !!p!!%' AND authperso_authority_authperso_num = !!autperso_type_num!!]]></main>
				</query>
				<query for="ENDWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[SELECT DISTINCT notice_authperso_notice_num as notice_id FROM authperso_authorities JOIN notices_authperso ON notice_authperso_authority_num = id_authperso_authority WHERE authperso_index_infos_global like '%!!p!! ' AND authperso_authority_authperso_num = !!autperso_type_num!!]]></main>
				</query>
				<query for="EXACT" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[SELECT DISTINCT notice_authperso_notice_num as notice_id FROM authperso_authorities JOIN notices_authperso ON notice_authperso_authority_num = id_authperso_authority WHERE authperso_index_infos_global like ' !!p!! ' AND authperso_authority_authperso_num = !!autperso_type_num!!]]></main>
				</query>
				<query for="CONTAINS" regDiacrit="no">
					<main><![CDATA[SELECT DISTINCT notice_authperso_notice_num as notice_id FROM authperso_authorities JOIN notices_authperso ON notice_authperso_authority_num = id_authperso_authority WHERE authperso_index_infos_global like '%!!p!!%' AND authperso_authority_authperso_num = !!autperso_type_num!!]]></main>
				</query>
				<query for="CONTAINS_AT_LEAST" multipleWords="yes" regDiacrit="yes">
					<main><![CDATA[SELECT DISTINCT notice_authperso_notice_num as notice_id FROM authperso_authorities JOIN notices_authperso ON notice_authperso_authority_num = id_authperso_authority WHERE !!multiple_term!! AND authperso_authority_authperso_num = !!autperso_type_num!!]]></main>
					<multipleTerm>authperso_index_infos_global LIKE '%!!p!!%'</multipleTerm>
					<multipleOperator>or</multipleOperator>
				</query>
				<query for="CONTAINS_ALL" multipleWords="yes" regDiacrit="no">
					<main><![CDATA[SELECT DISTINCT notice_authperso_notice_num as notice_id FROM authperso_authorities JOIN notices_authperso ON notice_authperso_authority_num = id_authperso_authority WHERE !!multiple_term!! AND authperso_authority_authperso_num = !!autperso_type_num!!]]></main>
					<multipleTerm>authperso_index_infos_global LIKE '%!!p!!%'</multipleTerm>
					<multipleOperator>and</multipleOperator>
				</query>
				<query for="ISEMPTY" regDiacrit="yes">
					<main><![CDATA[SELECT DISTINCT notice_id FROM notices WHERE notice_id NOT IN (SELECT DISTINCT notice_authperso_notice_num as notice_id FROM authperso_authorities JOIN notices_authperso ON notice_authperso_authority_num = authperso_authority_authperso_num WHERE authperso_index_infos_global NOT like '' AND authperso_authority_authperso_num = !!autperso_type_num!!)]]></main>
				</query>
				<query for="ISNOTEMPTY" regDiacrit="yes">
					<main><![CDATA[SELECT DISTINCT notice_authperso_notice_num as notice_id FROM authperso_authorities JOIN notices_authperso ON notice_authperso_authority_num = authperso_authority_authperso_num WHERE authperso_index_infos_global NOT like '' AND authperso_authority_authperso_num = !!autperso_type_num!!]]></main>
				</query>				
				<query for="AUTHORITY">
					<main><![CDATA[SELECT DISTINCT notice_authperso_notice_num as notice_id FROM notices_authperso WHERE notice_authperso_authority_num = '!!p!!']]></main>
				</query>
			</field>
			<field dataType="small_text" id="1">			    
				<query for="CONTAINS_AT_LEAST" multipleWords="yes" regDiacrit="yes" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where !!multiple_term!! order by index_serie, tnvol, index_sew]]></main>
					<multipleTerm>notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_small_text like '%!!p!!%'</multipleTerm>
					<multipleOperator>or</multipleOperator>
				</query>
				<query for="CONTAINS_ALL" multipleWords="yes" regDiacrit="yes" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where !!multiple_term!! order by index_serie, tnvol, index_sew]]></main>
					<multipleTerm>notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_small_text like '%!!p!!%'</multipleTerm>
					<multipleOperator>and</multipleOperator>
				</query>				
				<query for="STARTWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_small_text like '!!p!!%' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ENDWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_small_text like '%!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="EXACT" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
				    <main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_small_text = '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				 </query>				
				<query for="EQ">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_small_text = '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and (authperso_custom_small_text='' or authperso_custom_small_text is null) order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_small_text != '' order by index_serie, tnvol, index_sew]]></main>					  
				</query>
			</field>
			<field dataType="text" id="2">			    			    
				<query for="CONTAINS_AT_LEAST" multipleWords="yes" regDiacrit="yes" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where !!multiple_term!! order by index_serie, tnvol, index_sew]]></main>
					<multipleTerm>notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_text like '%!!p!!%'</multipleTerm>
					<multipleOperator>or</multipleOperator>
				</query>
				<query for="CONTAINS_ALL" multipleWords="yes" regDiacrit="yes" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where !!multiple_term!! order by index_serie, tnvol, index_sew]]></main>
					<multipleTerm>notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_text like '%!!p!!%'</multipleTerm>
					<multipleOperator>and</multipleOperator>
				</query>				
				<query for="STARTWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_text like '!!p!!%' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ENDWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_text like '%!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="EXACT" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
				    <main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_text = '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				 </query>				
				<query for="EQ">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_text = '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and (authperso_custom_text='' or authperso_custom_text is null) order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_text != '' order by index_serie, tnvol, index_sew]]></main>					  
				</query>
			</field>			
			<field dataType="integer" id="3">
				<query for="EQ">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_integer = '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="LT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_integer < '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="GT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_integer > '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="LTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_integer <= '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="GTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_integer >= '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and (authperso_custom_integer='' or authperso_custom_integer is null) order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_integer != '' order by index_serie, tnvol, index_sew]]></main>
				</query>
			</field>
			<field dataType="float" id="4">
				<query for="EQ">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_float = '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="LT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_float < '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="GT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_float > '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="LTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_float <= '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="GTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_float >= '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and (authperso_custom_float='' or authperso_custom_float is null) order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_float != '' order by index_serie, tnvol, index_sew]]></main>
				</query>
			</field>
			<field dataType="date" id="5">
				<query for="EQ">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_date = '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="LT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_date < '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="GT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_date > '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="LTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_date <= '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="GTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_date >= '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and (authperso_custom_date='' or authperso_custom_date is null) order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_date != '' order by index_serie, tnvol, index_sew]]></main>
				</query>
			</field>
		</fieldType>
	</dynamicFields>
	
	<specialFields>
		<field type="combine" title="msg:histo_title" id="1" separator="msg:recherches_query"/>
		<field type="openurl" title="msg:search_openurl" id="2" opacVisibility="no" visible="no"/>
		<field type="facette" title="msg:search_facette" id="3" opacVisibility="no"/>
		<field type="simple_search" title="msg:search_persopac_table_humanquery" id="4" opacVisibility="no" visible="no"/>		
		<field type="navigation_section" title="msg:search_navigation_section" id="5" opacVisibility="no" visible="no"/>		
		<field type="navigation_categ" title="msg:search_navigation_categ" id="6" opacVisibility="no" visible="no"/>		
		<field type="permalink" title="msg:search_permalink" id="9" opacVisibility="no" visible="no"/>	
	</specialFields>
	
	<!-- Zone operators :
		Liste des opérateurs de recherche possibles
		Chaque opérateur est modélisé par le tag <operator> :
		<operator @att=name,emptyAllowed> : libellé de l'opérateur
			- name : nom de l'opérateur
			- emptyAllowed : (yes/no) si pas renseigné c'est no par défaut : Le contenue du champ associé à cet opérateur peut être vide
	-->
	<operators>
		<operator name="BOOLEAN">msg:expr_bool_query</operator>
		<operator name="CONTAINS">msg:contient_search</operator>
		<operator name="CONTAINS_ALL">msg:contient_tous_mots_query</operator>
		<operator name="CONTAINS_AT_LEAST">msg:contient_plus_un_mot_query</operator>
		<operator name="STARTWITH">msg:commence_par_query</operator>
		<operator name="ENDWITH">msg:finit_par_query</operator>
		<operator name="EXACT">msg:exactement_comme_query</operator>
		<operator name="EQ">=</operator>
		<operator name="GT">&gt;</operator>
		<operator name="LT">&lt;</operator>
		<operator name="GTEQ">&gt;=</operator>
		<operator name="LTEQ">&lt;=</operator>
		<operator name="ISEMPTY" emptyAllowed="yes">msg:est_vide_query</operator>
		<operator name="ISNOTEMPTY" emptyAllowed="yes">msg:pas_vide_query</operator>
		<operator name="AUTHORITY">msg:authority_query</operator>
		<operator name="AERASUP">msg:map_multisearch_aerasup</operator>
		<operator name="AERAINF">msg:map_multisearch_aerainf</operator>
		<operator name="INTERSECTS">msg:map_multisearch_intersects</operator>
	</operators>
</pmbfields>