II'll look SolrPluginUtils.setReturnFields.

I'm running same query :
http://localhost:8983/solr/select/?qt=cfacet&q=%2BitemTitle:nokia%20%2BcategoryId:130&start=0&limit=3<http://localhost:8983/solr/select/?qt=cfacet&q=%2BitemTitle:nokia%20%2BcategoryId:130&start=0&limit=3&fl=id>
I get none empty result when  filter parameter is null, but when i pass
"inStores" filter parameter to getDocListAndSet i get empty result.

            SolrParams solrParams = req.getParams();
            Query q = QueryParsing.parseQuery(solrParams.get("q"),
req.getSchema());
            Query filter = new TermQuery(new Term("inStores", "true"));
            DocListAndSet results = req.getSearcher().getDocListAndSet(q,
(Query)filter, (Sort)null, solrParams.getInt("start"),
solrParams.getInt("limit"));

Thanks.


On Tue, Jul 7, 2009 at 11:45 PM, Chris Hostetter
<hossman_luc...@fucit.org>wrote:

>
> : But I have a problem like this;  when i call
> :
> http://localhost:8983/solr/select/?qt=cfacet&q=%2BitemTitle:nokia%20%2BcategoryId:130&start=0&limit=3&fl=id
> ,
> : itemTitle
> : i'm getiing all fields instead of only id and itemTitle.
>
> Your custom handler is responsible for checking the fl and setting what
> you want the response fields to be on the response object.
>
> SolrPluginUtils.setReturnFields can be used if you want this to be done in
> the "normal" way.
>
> : Also i'm gettting no result when i give none null filter parameter in
> : getDocListAndSet(...).
>        ...
> :             DocListAndSet results = req.getSearcher().getDocListAndSet(q,
> : (Query)null, (Sort)null, solrParams.getInt("start"),
> : solrParams.getInt("limit"));
>
> ...that should work.  What does your query look like?  what are you
> passing for the "start" and "limit" params (is it possible you are getting
> results, but limit=0 so there aren't any results on the current page of
> pagination?) what does the debug output look like?
>
>
> -Hoss
>
>


-- 
Osman İZBAT

Reply via email to