solr查询参数设置

SolrQuery solrQuery = new SolrQuery();
solrQuery.set("q", "*:*");
solrQuery.set("fq", "age:[20 TO 30]","grade:[70 TO *]");//filter query
solrQuery.set("fl", "age,grade");//field list
solrQuery.set("sort", "grade desc");//sort
solrQuery.set("start", "0");
solrQuery.set("rows", "10");//分页参数
solrQuery.set("timeAllowed", "30000");//查询时间限制
solrQuery.set("omitHeader", "true");//隐藏查询头信息

你可能感兴趣的:(solr查询参数设置)