<?xml version="1.0" encoding="UTF-8"?>
<indexer id="index.lucene" label="CONF_MESSAGE[Lucene Search Engine]" description="CONF_MESSAGE[Zend_Search_Lucene implementation to index all files and search a whole repository quickly.]"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd">
	<class_definition filename="plugins/index.lucene/LuceneIndexer.php" classname="Pydio\Access\Indexer\Implementation\LuceneIndexer"/>
    <client_settings>
        <resources>
            <i18n namespace="index.lucene" path="plugins/index.lucene/resources/i18n" />
        </resources>
    </client_settings>
    <server_settings>
        <param name="index_content" type="boolean" label="CONF_MESSAGE[Index Content]" description="CONF_MESSAGE[Parses the file when possible and index its content (see plugin global options)]" mandatory="true" default="false"/>
        <param name="index_meta_fields" type="string" label="CONF_MESSAGE[Index Meta Fields]" description="CONF_MESSAGE[Which additionnal fields to index and search]" mandatory="false" />
        <param name="repository_specific_keywords" type="string" label="CONF_MESSAGE[Repository keywords]" description="CONF_MESSAGE[If your repository path is defined dynamically by specific keywords like AJXP_USER, or your own, mention them here.]" mandatory="false"/>
        <global_param name="PARSE_CONTENT_MAX_SIZE" type="string" label="CONF_MESSAGE[Parse Content Until]" description="CONF_MESSAGE[Skip content parsing and indexation for files bigger than this size (must be in Bytes)]" mandatory="true" default="500000"/>
        <global_param name="PARSE_CONTENT_HTML" type="string" label="CONF_MESSAGE[HTML files]" description="CONF_MESSAGE[List of extensions to consider as HTML file and parse content]" mandatory="true" default="html,htm"/>
        <global_param name="PARSE_CONTENT_TXT" type="string" label="CONF_MESSAGE[Text files]" description="CONF_MESSAGE[List of extensions to consider as Text file and parse content]" mandatory="true" default="txt"/>
		<global_param name="UNOCONV" type="string" label="CONF_MESSAGE[Unoconv Path]" description="CONF_MESSAGE[Full path on the server to the 'unoconv' binary]" default="" mandatory="false"/>
		<global_param name="PDFTOTEXT" type="string" label="CONF_MESSAGE[PdftoText Path]" description="CONF_MESSAGE[Full path on the server to the 'pdftotext' binary]" default="" mandatory="false"/>
        <global_param name="QUERY_ANALYSER" type="select" choices="utf8num_insensitive|UTF8 Text/Num (case insensitive),utf8num_sensitive|UTF8 Text/Num (case sensitive),utf8_insensitive|UTF8 Text (case insensitive),utf8_sensitive|UTF8 Text (case sensitive),textnum_insensitive|Text/Num (case insensitive),textnum_sensitive|Text/Num (case sensitive),text_insensitive|Text (case insensitive),text_sensitive|Text (case sensitive)" label="CONF_MESSAGE[Query Analyzer]" description="CONF_MESSAGE[Analyzer used by Zend to parse the queries. Warning, the UTF8 analyzers require the php mbstring extension.]" default="textnum_insensitive" mandatory="false"/>
        <global_param name="APPLY_ASCII_TRANSLIT" type="boolean" label="CONF_MESSAGE[Transform search term to ASCII]" description="CONF_MESSAGE[In some configuration, it may be useful to always automatically transform search input term to pure ASCII.]" default="false"/>
        <global_param name="WILDCARD_LIMITATION" type="integer" label="CONF_MESSAGE[Wildcard limitation]" description="CONF_MESSAGE[For the sake of performances, it is not recommanded to use wildcard as a very first character of a query string. Lucene recommends asking the user minimum 3 characters before wildcard. Still, you can set it to 0 if necessary for your usecases.]" default="3" mandatory="false"/>
        <global_param name="AUTO_WILDCARD" type="boolean" label="CONF_MESSAGE[Auto-Wildcard]" description="CONF_MESSAGE[Automatically append a * after the user query to make the search broader]" default="false" mandatory="false"/>
        <global_param name="HIDE_MYSHARES_SECTION" type="boolean" label="CONF_MESSAGE[Hide 'My Shares']" description="CONF_MESSAGE[Hide My Shares section in the Orbit theme GUI.]" default="false" mandatory="false"/>
    </server_settings>
	<registry_contributions>
		<hooks>
			<serverCallback hookName="node.change" methodName="updateNodeIndex" defer="true"/>
			<serverCallback hookName="node.meta_change" methodName="updateNodeIndexMeta" defer="true"/>
            <serverCallback hookName="node.index.recursive.start" methodName="indexationStarts"/>
            <serverCallback hookName="node.index.recursive.end" methodName="indexationEnds"/>
            <serverCallback hookName="node.index" methodName="indexationIndexNode"/>
            <serverCallback hookName="workspace.share_metasources" methodName="updateSharedChildOptions"/>
		</hooks>
		<actions>
			<action name="search">
				<rightsContext noUser="true" userLogged="only" read="true"
					write="false" adminOnly="false">
				</rightsContext>
				<processing>
					<serverCallback methodName="applyAction" restParams="/query" sdkMethodName="search" developerComment="Search the Lucene index">
                        <input_param description="Query term" name="query" type="string"/>
					</serverCallback>
				</processing>
			</action>
			<action name="search_by_keyword">
				<rightsContext noUser="true" userLogged="only" read="true"
					write="false" adminOnly="false">
				</rightsContext>
				<processing>
					<serverCallback methodName="applyAction" restParams="/field/query" sdkMethodName="searchByKeyword" developerComment="Search the Lucene on a specific document field">
                        <input_param description="Lucene Keyword to search on" name="field" type="string"/>
                        <input_param description="Query term" name="query" type="string"/>
					</serverCallback>
				</processing>
			</action>
		</actions>
        <client_configs>
            <component_config component="AjxpReactComponent::left_navigator">
                <additional_content
                        id="navigation_bookmarks"
                        position="1"
                        type="ListProvider"
                        options='{"title":"147", "titleClassName":"colorcode-bookmark", "fit":"content","silentLoading":true, "nodeProviderProperties":{"get_action":"search", "query":"keyword:ajxp_bookmarked"},"reloadOnServerMessage":"tree/reload_bookmarks", "connexion_discrete":true, "containerDroppableAction":"bookmark", "emptyChildrenMessage":515}'/>
            </component_config>
            <component_config component="AjxpReactComponent::left_navigator">
                <additional_content
                        id="navigation_shared"
                        position="2"
                        type="ListProvider"
                        options='{"title":"share_center.98", "titleClassName":"colorcode-shared", "fit":"content","silentLoading":true, "nodeProviderProperties":{"get_action":"search", "query":"keyword:ajxp_shared", "connexion_discrete":true}, "emptyChildrenMessage":"share_center.131","containerDroppableAction":"share-file-minisite","clearSelectionOnBlur":true,"reloadOnServerMessage":"tree/reload_shared_elements"}'/>
            </component_config>
        </client_configs>
	</registry_contributions>
    <dependencies>
        <!-- Stream Wrapper Access -->
        <activePlugin pluginName="access.AJXP_STREAM_PROVIDER"/>
    </dependencies>
</indexer>
