【发布时间】:2009-06-02 17:32:29
【问题描述】:
public class StateQueryFilter extends FieldQueryFilter {
// private static final Log LOG = LogFactory.getLog(RecommendedParser.class.getName());
public StateQueryFilter() {
super("state", 5f);
super("city", 5f);
super("notdirectory", 5f);
//LOG.info("Added a state query");
}
}
它会报告:
Constructor call must be the first statement in a constructor
有没有办法让它工作?
【问题讨论】:
-
您想要完成什么?
-
提升字段:"state","city","notdirectory"
-
如果可能的话,我认为您必须使用多个过滤器。即使编译了这段代码,它仍然只会提升“notdirectory”而不是“state”或“city”。