001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.search;
016    
017    import com.liferay.portal.kernel.search.filter.BooleanFilter;
018    
019    import java.util.Locale;
020    
021    /**
022     * @author Ryan Park
023     */
024    public interface IndexerPostProcessor {
025    
026            public void postProcessContextBooleanFilter(
027                            BooleanFilter booleanFilter, SearchContext searchContext)
028                    throws Exception;
029    
030            /**
031             * @deprecated As of 7.0.0, replaced by {@link #postProcessContextBooleanFilter(
032             *             BooleanFilter, SearchContext)}
033             */
034            @Deprecated
035            public void postProcessContextQuery(
036                            BooleanQuery contextQuery, SearchContext searchContext)
037                    throws Exception;
038    
039            public void postProcessDocument(Document document, Object obj)
040                    throws Exception;
041    
042            public void postProcessFullQuery(
043                            BooleanQuery fullQuery, SearchContext searchContext)
044                    throws Exception;
045    
046            public void postProcessSearchQuery(
047                            BooleanQuery searchQuery, BooleanFilter booleanFilter,
048                            SearchContext searchContext)
049                    throws Exception;
050    
051            /**
052             * @deprecated As of 7.0.0, replaced by {@link #postProcessSearchQuery(
053             *             BooleanQuery, BooleanFilter, SearchContext)}
054             */
055            @Deprecated
056            public void postProcessSearchQuery(
057                            BooleanQuery searchQuery, SearchContext searchContext)
058                    throws Exception;
059    
060            public void postProcessSummary(
061                    Summary summary, Document document, Locale locale, String snippet);
062    
063    }