lucene 4: convert script term to string

This commit is contained in:
Igor Motov 2012-11-04 23:27:32 -05:00 committed by Shay Banon
parent 74464f9f99
commit cfbd17992a
2 changed files with 4 additions and 2 deletions

View File

@ -200,7 +200,8 @@ public class FieldsTermsStringFacetCollector extends AbstractFacetCollector {
}
if (script != null) {
script.setNextDocId(docId);
script.setNextVar("term", value);
// LUCENE 4 UPGRADE: needs optimization
script.setNextVar("term", value.utf8ToString());
Object scriptValue = script.run();
if (scriptValue == null) {
return;

View File

@ -203,7 +203,8 @@ public class TermsStringFacetCollector extends AbstractFacetCollector {
}
if (script != null) {
script.setNextDocId(docId);
script.setNextVar("term", value);
// LUCENE 4 UPGRADE: needs optimization
script.setNextVar("term", value.utf8ToString());
Object scriptValue = script.run();
if (scriptValue == null) {
return;