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    /** The ids of the ancestors of the page */
032    public static final String PAGE_ANCESTOR_IDS = "page-ancestorIds";
033    /** The id of the parent of the page */
034    public static final String PAGE_PARENT_ID = "page-parentId";
035    /** Site name. */
036    public static final String SITE_NAME = "site";
037    /** Site type. */
038    public static final String SITE_TYPE = "siteType";
039    /** Solr specific : Site map name. */
040    public static final String SITEMAP_NAME = "sitemap";
041    /** Page title field name. */
042    public static final String PAGE_TITLE = "page-title";
043    /** Page title field name. */
044    public static final String PAGE_LONG_TITLE = "page-longTitle";
045    /** Page template. */
046    public static final String TEMPLATE = "template";
047    /** Page template. */
048    public static final String PAGE_TYPE = "pageType";
049    /** The depth of the page in the sitemap. */
050    public static final String PAGE_DEPTH = "pageDepth";
051    /** The contained content ids. */
052    public static final String CONTENT_IDS = "contentIds_s_dv"; // suffixed by _s_dv to handle {!ametys join} syntax
053    /** The contained content types. */
054    public static final String PAGE_CONTENT_TYPES = "page-content-types";
055    /** Service ids field name. */
056    public static final String SERVICE_IDS = "serviceIds";
057    /** The ids of the outgoing references to resources or folders of resources (displayed in this page by a service, attachments of this page...) */
058    public static final String PAGE_OUTGOING_REFEERENCES_RESOURCE_IDS = "page-outgoingResourceRefIds";
059    /** The ids of visible page attachments */
060    public static final String PAGE_VISIBLE_ATTACHMENT_RESOURCE_IDS = "page-visibleAttachmentIds";
061    /** Page document type. */
062    public static final String TYPE_PAGE = "page";
063    
064    /** Document type for a resource of a page (page attachment) */
065    public static final String TYPE_PAGE_RESOURCE = "pageResource";
066    
067    /** Title of the ancestor page with the section tag */
068    public static final String SECTION_PAGE_TITLE = "section-page-title";
069    
070    //// Date facet
071    /** Date facet field. */
072    public static final String DATES_FACET = "dates-facet";
073    /** Date sorting */
074    public static final String DATE_FOR_SORTING = "date-for-sorting";
075    
076    /** Lastname sorting */
077    public static final String LASTNAME_FOR_SORTING = "lastname-for-sorting";
078
079    /** The id of the page for an attachment */
080    public static final String ATTACHMENT_PAGE_ID = "attachedPageId";
081    
082}