Revision: 14749
http://gate.svn.sourceforge.net/gate/?rev=14749&view=rev
Author: valyt
Date: 2011-12-12 17:06:17 +0000 (Mon, 12 Dec 2011)
Log Message:
-----------
Set the scorer on each access (to catch any config changes that may have
occurred in the interim).
Ranking now works for Local and Remote indexes.
Modified Paths:
--------------
mimir/trunk/mimir-web/grails-app/services/gate/mimir/web/LocalIndexService.groovy
Modified:
mimir/trunk/mimir-web/grails-app/services/gate/mimir/web/LocalIndexService.groovy
===================================================================
---
mimir/trunk/mimir-web/grails-app/services/gate/mimir/web/LocalIndexService.groovy
2011-12-12 15:59:51 UTC (rev 14748)
+++
mimir/trunk/mimir-web/grails-app/services/gate/mimir/web/LocalIndexService.groovy
2011-12-12 17:06:17 UTC (rev 14749)
@@ -172,11 +172,14 @@
engine = new QueryEngine(new File(index.indexDirectory))
engine.queryTokeniser = queryTokeniser
engine.executor = searchThreadPool
- if(index.scorer) {
-
engine.setScorerSource(grailsApplication.config.gate.mimir.scorers[index.scorer]
as Callable<MimirScorer>)
- }
queryEngines[index.id] = engine
}
+ // the scorer may have changed, so we update it every time
+ if(index.scorer) {
+
engine.setScorerSource(grailsApplication.config.gate.mimir.scorers[index.scorer]
as Callable<MimirScorer>)
+ } else {
+ engine.setScorerSource(null)
+ }
return engine
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn Windows Azure Live! Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for
developers. It will provide a great way to learn Windows Azure and what it
provides. You can attend the event by watching it streamed LIVE online.
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs