[opencms-dev] OpenCms 8.5.1 - Solr query on collector.date

Rüdiger Kurz r.kurz at alkacon.com
Tue Jun 4 11:33:19 CEST 2013


Hi,

Overwriting the method:
org.opencms.file.collectors.CmsSolrCollector#getResults

declared in:
org.opencms.file.collectors.I_CmsResourceCollector#getResults(org.opencms.file.CmsObject, 
java.lang.String, java.lang.String)

and replacing the line 136 at:
https://github.com/alkacon/opencms-core/blob/branch_8_5_x/src/org/opencms/file/collectors/CmsSolrCollector.java#L136

with:
return new ArrayList<CmsResource>(index.search(cms, q, true));

will do the trick and no changes in the core are needed.

This is not a bug. For performance reason OpenCms tries to avoid 
expensive DB-based permission checks: Checking 150000000 resources will 
cost a lot of time!

Maybe someone has time to improve the Solr collector for OpenCms in a 
way that it is able to return some more info about the Solr response and 
enabling it for Solr pagination mechanism. In the meanwhile I would 
suggest to use the HTTP endpoint of the Solr request handler and write 
some AJAX like UI.

regards
Rüdiger

Am 04.06.2013 10:57, schrieb Cavva:
> Hi all,
>
> I'm trying to query with solr on the collector.date_exact field. It seems
> not to work.
> the query I'm requesting with the contentload is:
>
> core=Solr Offline&fq=parent-folders:/sites/default/&q=colletor.date_exact:[
> 1359241200000 TO * ]&rows=150000000
>
> I do not receive any results although I have elements that are into.
>
> What's the problem?
>
> Regards,
>
> Davide

-- 
Rüdiger Kurz

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

Alkacon Software GmbH - The OpenCms Experts

http://www.alkacon.com
http://www.opencms.org

Geschäftsführer: Alexander Kandzior, Amtsgericht Köln, HRB 54613



More information about the opencms-dev mailing list