001/*
002 *  Copyright 2015 Anyware Services
003 *
004 *  Licensed under the Apache License, Version 2.0 (the "License");
005 *  you may not use this file except in compliance with the License.
006 *  You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *  Unless required by applicable law or agreed to in writing, software
011 *  distributed under the License is distributed on an "AS IS" BASIS,
012 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *  See the License for the specific language governing permissions and
014 *  limitations under the License.
015 */
016package org.ametys.web.indexing.solr;
017
018import org.ametys.cms.content.indexing.solr.SolrFieldNames;
019
020/**
021 * Constants for Solr field names related to indexation of contents / pages...
022 */
023public interface SolrWebFieldNames extends SolrFieldNames
024{
025    /** Content interesting dates (creation or start date etc...) */
026    public static final String CONTENT_INTERESTING_DATES = "content-interesting-dates";
027    
028    /** Prefix for facetable content field */
029    public static final String FACETABLE_CONTENT_FIELD_PREFIX = "contentfacet_";
030    
031    /** Page Id field name for resources or contents. */
032    public static final String PAGE_IDS = "pageIds";
033    /** The ids of the ancestors of the page */
034    public static final String PAGE_ANCESTOR_IDS = "page-ancestorIds";
035    /** The id of the parent of the page */
036    public static final String PAGE_PARENT_ID = "page-parentId";
037    /** Site name. */
038    public static final String SITE_NAME = "site";
039    /** Site type. */
040    public static final String SITE_TYPE = "siteType";
041    /** Solr specific : Site map name. */
042    public static final String SITEMAP_NAME = "sitemap";
043    /** Orphan field name. */
044    public static final String ORPHAN = "orphan";
045    /** Shared field name. */
046    public static final String SHARED = "shared";
047    /** Content privacy field name. */
048    public static final String PRIVACY = "privacy";
049    /** Page title field name. */
050    public static final String PAGE_TITLE = "page-title";
051    /** Page title field name. */
052    public static final String PAGE_LONG_TITLE = "page-longTitle";
053    /** Page template. */
054    public static final String TEMPLATE = "template";
055    /** Page template. */
056    public static final String PAGE_TYPE = "pageType";
057    /** The depth of the page in the sitemap. */
058    public static final String PAGE_DEPTH = "pageDepth";
059    /** The contained content ids. */
060    public static final String CONTENT_IDS = "contentIds_s_dv"; // suffixed by _s_dv to handle {!ametys join} syntax
061    /** The contained content types. */
062    public static final String PAGE_CONTENT_TYPES = "page-content-types";
063    /** Service ids field name. */
064    public static final String SERVICE_IDS = "serviceIds";
065    /** The ids of the outgoing references to resources or folders of resources (displayed in this page by a service, attachments of this page...) */
066    public static final String PAGE_OUTGOING_REFEERENCES_RESOURCE_IDS = "page-outgoingResourceRefIds";
067    /** The ids of visible page attachments */
068    public static final String PAGE_VISIBLE_ATTACHMENT_RESOURCE_IDS = "page-visibleAttachmentIds";
069    /** Page document type. */
070    public static final String TYPE_PAGE = "page";
071    
072    /** Document type for a resource of a page (page attachment) */
073    public static final String TYPE_PAGE_RESOURCE = "pageResource";
074    
075    /** Title of the ancestor page with the section tag */
076    public static final String SECTION_PAGE_TITLE = "section-page-title";
077    
078    //// Date facet
079    /** Date facet field. */
080    public static final String DATES_FACET = "dates-facet";
081    /** Date sorting */
082    public static final String DATE_FOR_SORTING = "date-for-sorting";
083    
084    /** Lastname sorting */
085    public static final String LASTNAME_FOR_SORTING = "lastname-for-sorting";
086
087    /** The id of the page for an attachment */
088    public static final String ATTACHMENT_PAGE_ID = "attachedPageId";
089    
090}