我有以下代码适用于带有字符串字段的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);