diff --git a/search-services/alfresco-search/src/main/java/org/alfresco/solr/query/AlfrescoDefaultTextFields.java b/search-services/alfresco-search/src/main/java/org/alfresco/solr/query/AlfrescoDefaultTextFields.java new file mode 100644 index 000000000..5cb176bf7 --- /dev/null +++ b/search-services/alfresco-search/src/main/java/org/alfresco/solr/query/AlfrescoDefaultTextFields.java @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2005-2019 Alfresco Software Limited. + * + * This file is part of Alfresco + * + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ +package org.alfresco.solr.query; + +import org.alfresco.model.ContentModel; +import org.alfresco.service.namespace.QName; + + +/** + * @author elia + * + * Default fields for a text search. + */ +public enum AlfrescoDefaultTextFields +{ + + NAME(ContentModel.PROP_NAME), + TITLE(ContentModel.PROP_TITLE), + DESCRIPTION(ContentModel.PROP_DESCRIPTION), + CONTENT(ContentModel.PROP_CONTENT); + + private QName field; + + public String getFieldName() + { + return field.toString(); + } + + AlfrescoDefaultTextFields(QName field) { + this.field = field; + } + +}