<?xml version="1.0"?>
<!--
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category    Mage
 * @package     Mage_CatalogSearch
 * @copyright   Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
-->
<config>
    <modules>
        <Mage_CatalogSearch>
            <version>0.7.7</version>
        </Mage_CatalogSearch>
    </modules>
    <global>
        <models>
            <catalogsearch>
                <class>Mage_CatalogSearch_Model</class>
                <resourceModel>catalogsearch_mysql4</resourceModel>
            </catalogsearch>

            <catalogsearch_mysql4>
                <class>Mage_CatalogSearch_Model_Mysql4</class>
                <entities>
                    <search_query>
                        <table>catalogsearch_query</table>
                    </search_query>
                    <result>
                        <table>catalogsearch_result</table>
                    </result>
                    <fulltext>
                        <table>catalogsearch_fulltext</table>
                    </fulltext>
                </entities>
            </catalogsearch_mysql4>
        </models>
        <helpers>
            <catalogsearch>
                <class>Mage_CatalogSearch_Helper</class>
            </catalogsearch>
        </helpers>
        <resources>
            <catalogsearch_setup>
                <setup>
                    <module>Mage_CatalogSearch</module>
                </setup>
            </catalogsearch_setup>
        </resources>
        <events>
            <!-- catalog_product_save_after>
                <observers>
                    <catalogsearch>
                        <class>catalogsearch/fulltext_observer</class>
                        <method>refreshProductIndex</method>
                    </catalogsearch>
                </observers>
            </catalog_product_save_after>
            <catalog_product_delete_after>
                <observers>
                    <catalogsearch>
                        <class>catalogsearch/fulltext_observer</class>
                        <method>cleanProductIndex</method>
                    </catalogsearch>
                </observers>
            </catalog_product_delete_after>
            <catalog_entity_attribute_save_after>
                <observers>
                    <catalogsearch>
                        <class>catalogsearch/fulltext_observer</class>
                        <method>eavAttributeChange</method>
                    </catalogsearch>
                </observers>
            </catalog_entity_attribute_save_after>
            <catalog_entity_attribute_delete_after>
                <observers>
                    <catalogsearch>
                        <class>catalogsearch/fulltext_observer</class>
                        <method>eavAttributeChange</method>
                    </catalogsearch>
                </observers>
            </catalog_entity_attribute_delete_after>
            <catalog_product_import_after>
                <observers>
                    <catalogsearch>
                        <class>catalogsearch/fulltext_observer</class>
                        <method>refreshIndexAfterImport</method>
                    </catalogsearch>
                </observers>
            </catalog_product_import_after>
            <store_add>
                <observers>
                    <catalogsearch>
                        <class>catalogsearch/fulltext_observer</class>
                        <method>refreshStoreIndex</method>
                    </catalogsearch>
                </observers>
            </store_add>
            <store_delete>
                <observers>
                    <catalogsearch>
                        <class>catalogsearch/fulltext_observer</class>
                        <method>cleanStoreIndex</method>
                    </catalogsearch>
                </observers>
            </store_delete>
            <catalog_product_website_update>
                <observers>
                    <catalogsearch>
                        <class>catalogsearch/fulltext_observer</class>
                        <method>catalogProductWebsiteUpdate</method>
                    </catalogsearch>
                </observers>
            </catalog_product_website_update -->
        </events>
        <blocks>
            <catalogsearch><class>Mage_CatalogSearch_Block</class></catalogsearch>
        </blocks>
        <index>
            <indexer>
                <catalogsearch_fulltext>
                    <model>catalogsearch/indexer_fulltext</model>
                </catalogsearch_fulltext>
            </indexer>
        </index>
    </global>
    <frontend>
        <routers>
            <catalogsearch>
                <use>standard</use>
                <args>
                    <module>Mage_CatalogSearch</module>
                    <frontName>catalogsearch</frontName>
                </args>
            </catalogsearch>
        </routers>
        <translate>
            <modules>
                <Mage_CatalogSearch>
                     <files>
                          <default>Mage_CatalogSearch.csv</default>
                     </files>
                </Mage_CatalogSearch>
            </modules>
        </translate>
        <layout>
             <updates>
                  <catalogsearch>
                        <file>catalogsearch.xml</file>
                  </catalogsearch>
             </updates>
        </layout>
    </frontend>
    <adminhtml>
        <translate>
            <modules>
                <Mage_CatalogSearch>
                     <files>
                          <default>Mage_CatalogSearch.csv</default>
                     </files>
                </Mage_CatalogSearch>
            </modules>
        </translate>
        <layout>
            <updates>
                <catalogsearch>
                    <file>search.xml</file>
                </catalogsearch>
            </updates>
        </layout>
    </adminhtml>

    <default>
        <catalog>
            <seo>
                <search_terms>1</search_terms>
                <site_map>1</site_map>
            </seo>
            <search>
                <min_query_length>1</min_query_length>
                <max_query_length>128</max_query_length>
                <max_query_words>10</max_query_words>
                <search_type>1</search_type>
                <use_layered_navigation_count>2000</use_layered_navigation_count>
            </search>
        </catalog>
    </default>
</config>
