[opencms-dev] Solr and limited rows

Rüdiger Kurz r.kurz at alkacon.com
Wed Oct 9 16:19:06 CEST 2013


Hi,


The ignoreMaxRows is not interpreted as HTTP parameter, it can only be 
passes as argument to the Java-API.

Try an API call like:

String query = "?fq=con_locales:*&fq=parent-folders:*&fl=path&rows=99999";
CmsSolrQuery squery = new CmsSolrQuery(null, 
CmsRequestUtil.createParameterMap(query));
CmsSolrIndex index = 
OpenCms.getSearchManager().getIndexSolr(AllTests.SOLR_ONLINE);
int found = index.search(getCmsObject(), squery, true).size();

and let us know the value of 'found'.

regards
Rüdiger

Am 09.10.2013 13:45, schrieb Matthias Griselle:
> In fact, I said victory too fast... ^^'
>
> I added ignoreMaxRows=true, but I still have 50 results at the end.
> I'm using OpenCMS 8.5.2, so ignoreMaxRows should be set to true by default.
>
> logs :
> 08 oct. 2013 14:57:43,222 ERROR [box.action.GetAllModulesAction: 138]
> Query : fq=type:(article OR articlebox OR servicebox OR
> widget)&rows=9999&ignoreMaxRows=true&fq=parent-folders:(/sites/default/agent/)
> 08 oct. 2013 14:57:43,225  INFO [      org.jboss.logging.Logger: 296]
> [Solr Online] webapp=null path=/select
> params={q=*:*&fl=*,score&qt=edismax&rows=250&ignoreMaxRows=true&fq=type:(article
> OR articlebox OR servicebox OR
> widget)&fq=parent-folders:(/sites/default/agent/)&start=0} hits=50
> status=0 QTime=1
> 08 oct. 2013 14:57:43,503 ERROR [box.action.GetAllModulesAction: 149] 50
> results available
>
> Do anyone have an idea ?
>
> Regards,
> Matthias Griselle
>
>
>
> 2013/10/3 Matthias Griselle <mgriselle at gmail.com
> <mailto:mgriselle at gmail.com>>
>
>     I found the answer :
>     http://opencms.996256.n3.nabble.com/Solr-and-limited-rows-td23611.html
>
>
>     2013/10/3 Matthias Griselle <mgriselle at gmail.com
>     <mailto:mgriselle at gmail.com>>
>
>         Hi all,
>
>         When I'm requesting some Solr query, the row limit does not
>         match what I want.
>         If I do not precise any limit, by default it's 50. (it is normal)
>         When I precise any range in my query, the value is always 250. I
>         can ask something higher or lower, I always have 250.
>         My aim is to get (almost) no limit.
>
>         Do you have any idea ?
>
>
>         My call in java :
>         CmsSearchManager searchManager = OpenCms.getSearchManager();
>         CmsSolrResultList results = null;
>         results = searchManager.getIndexSolr("Solr Online").search(cms,
>         query.toString());
>
>         The value of query :
>         fq=type:(article OR articlebox OR service OR servicebox OR
>         widget OR rssreader OR
>         boxflexible)&rows=100&fq=parent-folders:(/sites/default/test-beta/)
>
>         What I get in logs :
>         [Solr Online] webapp=null path=/select
>         params={q=*:*&fl=*,score&qt=edismax&rows=250&fq=type:(article OR
>         articlebox OR service OR servicebox OR widget OR rssreader OR
>         boxflexible)&fq=parent-folders:(/sites/default/test-beta/)&start=0}
>         hits=3 status=0 QTime=111
>
>         Thanks for help.
>
>         Regards,
>         Matthias Griselle

-- 
Kind Regards,
Rüdiger.

-------------------

Rüdiger Kurz

Alkacon Software GmbH  - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org



More information about the opencms-dev mailing list