[opencms-dev] Solr and limited rows

Matthias Griselle mgriselle at gmail.com
Thu Oct 10 10:17:43 CEST 2013


Perfect !

I never noticed it was possible to precise index.search(getCmsObject(),
squery, *true*).
Thank you very much !

Regards,
Matthias Griselle


2013/10/9 Rüdiger Kurz <r.kurz at alkacon.com>

> 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<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
> ______________________________**_________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-**bin/mailman/listinfo/opencms-**dev<http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20131010/5c285e99/attachment.htm>


More information about the opencms-dev mailing list