[gatewiki-commits] SF.net SVN: gatewiki:[1804] trunk

View: New views
1 Messages — Rating Filter:   Alert me  

[gatewiki-commits] SF.net SVN: gatewiki:[1804] trunk

by nirajaswani :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Revision: 1804
          http://gatewiki.svn.sourceforge.net/gatewiki/?rev=1804&view=rev
Author:   nirajaswani
Date:     2009-11-11 13:11:38 +0000 (Wed, 11 Nov 2009)

Log Message:
-----------
sorting results by tstamp - most recently indexed document appears first

Modified Paths:
--------------
    trunk/cow/grails-app/controllers/SearchController.groovy
    trunk/nutch-solr/solr-app/multicore/conf/schema.xml

Modified: trunk/cow/grails-app/controllers/SearchController.groovy
===================================================================
--- trunk/cow/grails-app/controllers/SearchController.groovy 2009-11-11 12:36:13 UTC (rev 1803)
+++ trunk/cow/grails-app/controllers/SearchController.groovy 2009-11-11 13:11:38 UTC (rev 1804)
@@ -215,7 +215,11 @@
     queryString << "rows=" + HITS_TO_RETRIEVE
     // searching in the content field
     queryString << "q=" + URLEncoder.encode(params.searchBox)
-
+    
+    // sort results by tstamp
+    // space between tstamp and desc is must
+    queryString << "sort=" + URLEncoder.encode("tstamp desc")
+    
     // address for the solr search
     def address = conf.gate.cow.solr.baseUrl +
          conf.gate.cow.solr.context + "/core" + params.id + "/select"

Modified: trunk/nutch-solr/solr-app/multicore/conf/schema.xml
===================================================================
--- trunk/nutch-solr/solr-app/multicore/conf/schema.xml 2009-11-11 12:36:13 UTC (rev 1803)
+++ trunk/nutch-solr/solr-app/multicore/conf/schema.xml 2009-11-11 13:11:38 UTC (rev 1804)
@@ -61,7 +61,7 @@
     <field name="site" type="string" indexed="true" stored="false"/>
     <field name="anchor" type="string" indexed="true" stored="false" multiValued="true"/>
     <field name="title" type="text" indexed="true" stored="true"/>
-    <field name="tstamp" type="slong" indexed="false" stored="true"/>
+    <field name="tstamp" type="slong" indexed="true" stored="true"/>
     <field name="text" type="text" indexed="true" stored="false" multiValued="true"/>
     <field name="core0"   type="string"   indexed="true"  stored="true" multiValued="false" />
   </fields>


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gatewiki-commits mailing list
gatewiki-commits@...
https://lists.sourceforge.net/lists/listinfo/gatewiki-commits