[Product-Developers] collective.solr - indexing external source and merging results with Plone results
Tom Gross
itconsense at gmail.com
Tue Mar 20 15:55:28 UTC 2012
Hi Radim
Am 20.03.2012 13:24, schrieb Radim Novotny:
> Hi all,
>
> I'm testing collective.solr and it works nice with default Plone even
> with custom Dexterity based types.
cool :)
> I'd like to implement merged search results from Plone and from some SQL
> database. I already configured multicore SOLR server and
> DataImportHandler which imports the data to separate SOLR core than
> Plone items.
>
> I'd like to ask people who knows SOLR and c.solr if it is possible to
> 1) put DIH and Plone results to the same core (I think it should be
> possible, but I must not use "full-import" which cleans the index,
> right? What about c.solr reindex or sync ?
you can use "full-import" but you must use a preImportDeleteQuery (this
is a solr query not an SQL one and defaults to *:*) in your config. See
http://wiki.apache.org/solr/DataImportHandler#Schema_for_the_data_config
>
> 2) process the results in Plone and display them as one set of results.
> I suppose some flag in SOLR result set which marks item as coming from
> Plone/SQL and use of IFlare interface, but I don't understand how to
> write additional adapter. Am I supposed to override PloneFlare adapter ?
This probably depends on your setup. I have a similar one but didn't
have to override IFlare. I get mixed (solr & catalog) results right
away. I had to extend the list of portal_types for the solr queries
because this is set to the available portal_types if not specified.
:Tom
>
> Thanks,
> Radim
More information about the Product-Developers
mailing list