Index: /main/trunk/gli/src/org/greenstone/gatherer/cdm/Facet.java
===================================================================
--- /main/trunk/gli/src/org/greenstone/gatherer/cdm/Facet.java	(revision 36151)
+++ /main/trunk/gli/src/org/greenstone/gatherer/cdm/Facet.java	(revision 36151)
@@ -0,0 +1,67 @@
+/**
+ *#########################################################################
+ *
+ * A component of the Gatherer application, part of the Greenstone digital
+ * library suite from the New Zealand Digital Library Project at the
+ * University of Waikato, New Zealand.
+ *
+ * Copyright (C) 2022 New Zealand Digital Library Project
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *########################################################################
+ */
+package org.greenstone.gatherer.cdm;
+
+import java.util.ArrayList;
+import org.greenstone.gatherer.util.StaticStrings;
+import org.w3c.dom.Element;
+
+/** This class encapsulates a facet field - used by  SOLR
+    It basically is an index, with a different field name */
+
+public class Facet extends Index {
+
+    static final String facet_element = StaticStrings.FACET_ELEMENT;
+    //protected String default_element_name = null; // don't have default at this stage
+
+    public Facet() {
+    }
+
+    public Facet(Element element) {
+	super(element);
+    }
+
+    public Facet(ArrayList sources) {
+	super(sources);
+    }
+
+    protected String getElementName() {
+	return facet_element;
+    }
+
+    protected String getDefaultElementName() {
+	return null; //StaticSTrings.FACET_DEFAULT_ELEMENT;
+    }
+
+    public DOMProxyListEntry create(Element element) {
+	return new Facet(element);
+    }
+
+    public DOMProxyListEntry create(ArrayList sources) {
+	return new Facet(sources);
+    }
+
+    
+}
Index: /main/trunk/gli/src/org/greenstone/gatherer/cdm/Index.java
===================================================================
--- /main/trunk/gli/src/org/greenstone/gatherer/cdm/Index.java	(revision 36150)
+++ /main/trunk/gli/src/org/greenstone/gatherer/cdm/Index.java	(revision 36151)
@@ -49,7 +49,7 @@
     protected Element element = null;
     /** The name for our elements */
-    protected String element_name = StaticStrings.INDEX_ELEMENT;
+    static final String index_element = StaticStrings.INDEX_ELEMENT;
     /** The name for the default element */
-    protected String default_element_name = StaticStrings.INDEX_DEFAULT_ELEMENT;
+    static final String default_index_element = StaticStrings.INDEX_DEFAULT_ELEMENT;
     /** The unique, if cryptic, identifier of an index. */
     protected String id = null;
@@ -68,5 +68,5 @@
 	this.sources = sources;
 	// Create a new element
-	this.element = CollectionConfiguration.createElement(this.element_name);
+	this.element = CollectionConfiguration.createElement(getElementName());
 	// For each source add a content element
 	int size = sources.size();
@@ -87,4 +87,12 @@
     }
 
+    protected String getElementName() {
+	return index_element;
+    }
+
+    protected String getDefaultElementName() {
+	return default_index_element;
+    }
+
     /** Method to compare two indexes.
      * @param object The other index as an <strong>Object</strong>.
@@ -102,4 +110,7 @@
     public DOMProxyListEntry create(Element element) {
 	return new Index(element);
+    }
+    public DOMProxyListEntry create(ArrayList sources) {
+	return new Index(sources);
     }
 
@@ -196,5 +207,5 @@
      */
     public void setSources(ArrayList sources) {
-	if(element != null && element.getNodeName().equals(this.default_element_name)) {
+	if(element != null && element.getNodeName().equals(getDefaultElementName())) {
 	    // Erase old sources
 	    XMLTools.clear(element);
Index: /main/trunk/gli/src/org/greenstone/gatherer/cdm/SortField.java
===================================================================
--- /main/trunk/gli/src/org/greenstone/gatherer/cdm/SortField.java	(revision 36151)
+++ /main/trunk/gli/src/org/greenstone/gatherer/cdm/SortField.java	(revision 36151)
@@ -0,0 +1,64 @@
+/**
+ *#########################################################################
+ *
+ * A component of the Gatherer application, part of the Greenstone digital
+ * library suite from the New Zealand Digital Library Project at the
+ * University of Waikato, New Zealand.
+ *
+ * Copyright (C) 2022 New Zealand Digital Library Project
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *########################################################################
+ */
+package org.greenstone.gatherer.cdm;
+
+import java.util.ArrayList;
+import org.greenstone.gatherer.util.StaticStrings;
+import org.w3c.dom.Element;
+
+/** This class encapsulates a sort field - used by Lucene and SOLR
+    It basically is an index, with a different field name */
+
+public class SortField extends Index {
+
+    static final String sortfield_element = StaticStrings.SORT_ELEMENT;
+    //protected String default_element_name = StaticStrings.SORT_DEFAULT_ELEMENT; // don't have default at this stage
+
+    public SortField() {
+    }
+
+    public SortField(Element element) {
+	super(element);
+    }
+    public SortField(ArrayList sources) {
+	super(sources);
+    }
+
+    protected String getElementName() {
+	return sortfield_element;
+    }
+
+    protected String getDefaultElementName() {
+	return null; //StaticSTrings.SORT_DEFAULT_ELEMENT;
+    }
+
+    public DOMProxyListEntry create(Element element) {
+	return new SortField(element);
+    }
+
+    public DOMProxyListEntry create(ArrayList sources) {
+	return new SortField(sources);
+    }
+}
