[opencms-dev] Solr and limited rows
Le Nouveau
opencms at lenouveau.fr
Tue Sep 17 16:01:06 CEST 2013
Hi everyone,
I'm having a little problem to define the number of results, with Solr.
Every time I specify "rows=XXX", there is "rows=250" in my parsed query
(according to logs)(XXX could be any number)
If I don't specify the number of rows, in logs, I have "rows=50".
Here is part of my code :
// Request to build
StringBuilder query = new StringBuilder();
// Defining requested types
query.append("fq=type:(typeAlpha OR typeBeta)");
// Defining rows limit
query.append("&rows=999999");
// Defining parent folder
query.append("&fq=parent-folders:(" +
getCmsObject().getRequestContext().getSiteRoot() + area.getPath() +
".content/)");
// Let's search
CmsSearchManager searchManager = OpenCms.getSearchManager();
CmsSolrResultList results = null;
results = searchManager.getIndexSolr("Solr Online").search(cms,
query.toString());
He is what I get in logs
[Solr Online] webapp=null path=/select
params={q=*:*&fl=*,score&qt=edismax&rows=250&fq=type:(typeAlpha OR
typeBeta)&fq=parent-folders:(/sites/default/bla/.content/)&start=0} hits=29
status=0 QTime=1
For the moment, I know I'm under the limit, but what would happen once I
get 250+ results ? Would the limit grow up alone ? (would be fun ^^)
Thanks for help !
Regards,
Le Nouveau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20130917/a2d3a547/attachment.htm>
More information about the opencms-dev
mailing list