Index: gs3-extensions/solr/trunk/src/build.xml
===================================================================
--- gs3-extensions/solr/trunk/src/build.xml	(revision 29417)
+++ gs3-extensions/solr/trunk/src/build.xml	(revision 29542)
@@ -83,6 +83,6 @@
     SolrQueryResult.java"/>  		   
   
- <!-- <property name="property-files" 
-    value=""/>  -->
+ <property name="property-files" 
+    value="GS2SolrSearch.properties"/>  
 
 			
@@ -116,11 +116,9 @@
   <target name="copy-files" description="Helper-target: copy files across for add-service target">
   	
-    <!-- May want this back if we add in Solr .properties files-->
-<!--	<echo/>
+    <echo/>
 	<echo>Adding to gsdl3 properties area: properties/${property-files}</echo>
-	<copy todir="${classesdir}">
+	<copy todir="${web.classesdir}">
           <filelist id="prop-files" dir="properties" files="${property-files}"/>
 	</copy>
--->
 	<echo/>
 	<echo>Adding to gsdl3 web jar lib directory: ${basedir}/lib/java's ${jars}</echo>
@@ -177,11 +175,11 @@
 	
 
-<!--	
+
 	<echo/>
 	<echo>Removing from  gsdl3 properties area: properties/${property-files}</echo>
 	<delete failonerror="false">
-          <filelist dir="${classesdir}" files="${property-files}"/>
+          <filelist dir="${web.classesdir}" files="${property-files}"/>
 	</delete>
--->
+
 	<echo/>
 	<echo>Removing from gsdl3 web jar lib directory: ${basedir}/lib/java's ${jars} gs3-solr.jar</echo>
Index: gs3-extensions/solr/trunk/src/properties/GS2SolrSearch.properties
===================================================================
--- gs3-extensions/solr/trunk/src/properties/GS2SolrSearch.properties	(revision 29542)
+++ gs3-extensions/solr/trunk/src/properties/GS2SolrSearch.properties	(revision 29542)
@@ -0,0 +1,3 @@
+param.sortOrder=Sort order
+param.sortOrder.0=ascending
+param.sortOrder.1=descending
Index: gs3-extensions/solr/trunk/src/src/java/org/greenstone/gsdl3/service/GS2SolrSearch.java
===================================================================
--- gs3-extensions/solr/trunk/src/src/java/org/greenstone/gsdl3/service/GS2SolrSearch.java	(revision 29417)
+++ gs3-extensions/solr/trunk/src/src/java/org/greenstone/gsdl3/service/GS2SolrSearch.java	(revision 29542)
@@ -49,4 +49,9 @@
 public class GS2SolrSearch extends SharedSoleneGS2FieldSearch
 {
+
+  protected static final String SORT_ORDER_PARAM = "sortOrder";
+  protected static final String SORT_ORDER_DESCENDING = "1";
+  protected static final String SORT_ORDER_ASCENDING = "0";
+
 	static Logger logger = Logger.getLogger(org.greenstone.gsdl3.service.GS2SolrSearch.class.getName());
 
@@ -60,4 +65,5 @@
 	public GS2SolrSearch()
 	{
+                paramDefaults.put(SORT_ORDER_PARAM, SORT_ORDER_DESCENDING);
 		does_faceting = true;
 		// Used to store the solr cores that match the required 'level' 
@@ -243,4 +249,42 @@
 	}
 
+	/** add in the SOLR specific params to TextQuery */
+	protected void addCustomQueryParams(Element param_list, String lang)
+	{
+		super.addCustomQueryParams(param_list, lang);
+		/** Add in the sort order asc/desc param */
+		createParameter(SORT_ORDER_PARAM, param_list, lang);
+	}
+  /** add in SOLR specific params for AdvancedFieldQuery */
+  protected void addCustomQueryParamsAdvField(Element param_list, String lang)
+	{
+		super.addCustomQueryParamsAdvField(param_list, lang);
+		createParameter(SORT_ORDER_PARAM, param_list, lang);
+		
+	}
+	/** create a param and add to the list */
+  protected void createParameter(String name, Element param_list, String lang)
+  {
+    Document doc = param_list.getOwnerDocument();
+    Element param = null;
+    String param_default = paramDefaults.get(name);
+    if (name.equals(SORT_ORDER_PARAM)) {
+        String[] vals = { SORT_ORDER_ASCENDING, SORT_ORDER_DESCENDING }; 
+	String[] vals_texts = { getTextString("param." + SORT_ORDER_PARAM + "." + SORT_ORDER_ASCENDING, lang), getTextString("param." + SORT_ORDER_PARAM + "." + SORT_ORDER_DESCENDING, lang) }; 	    
+	
+	param = GSXML.createParameterDescription(doc, SORT_ORDER_PARAM, getTextString("param." + SORT_ORDER_PARAM, lang), GSXML.PARAM_TYPE_ENUM_SINGLE, param_default, vals, vals_texts);
+    }
+
+    if (param != null)
+      {
+	param_list.appendChild(param);
+      }
+    else
+      {
+	super.createParameter(name, param_list, lang);
+      }
+    
+  }
+  
 	/** methods to handle actually doing the query */
 
