我有以下代码,这些代码适用于带字符串字段的andy Term查询但不适用于数字字段。它不会为int,tint,long,tlong字段返回任何内容!它不应该像字符串一样工作吗?
myClass extends SearchHandler {
@Override
public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) {
SolrIndexSearcher search = req.getSearcher();
SolrIndexSearcher.QueryCommand cmd = new QueryCommand();
SolrIndexSearcher.QueryResult result = new QueryResult();
cmd.setQuery(q);
cmd.setOffset(0);
cmd.setLen(10)
result = search.search(result, cmd);