From 1c1627b8c0ac048e66347c11ad840ee05df66c4f Mon Sep 17 00:00:00 2001 From: Erik Hatcher Date: Mon, 17 Mar 2008 23:57:59 +0000 Subject: [PATCH] Fix issue caused by SOLR-494 with SolrJ unit tests. git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@638145 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/solr/handler/admin/LukeRequestHandler.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java b/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java index 6192ffff5db..83d85da422e 100644 --- a/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java +++ b/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java @@ -396,14 +396,15 @@ public class LukeRequestHandler extends RequestHandlerBase aninfo.add("tokenizer", tokenizer); TokenFilterFactory[] filtfacs = tchain.getTokenFilterFactories(); - List> filters = new ArrayList>(); - for (TokenFilterFactory filtfac : filtfacs) { + SimpleOrderedMap> filters = new SimpleOrderedMap>(); + for (TokenFilterFactory filtfac : filtfacs) { Map tok = new HashMap(); - tok.put("className", filtfac.getClass().getName()); + String className = filtfac.getClass().getName(); + tok.put("className", className); tok.put("args", filtfac.getArgs()); - filters.add(tok); + filters.add(className.substring(className.lastIndexOf('.')+1), tok); } - if (!filters.isEmpty()) { + if (filters.size() > 0) { aninfo.add("filters", filters); } }