Am 02.06.2010 um 13:13 schrieb Guido A.J. Stevens:
> I'm Cc-ing this discussion back to the list.

Ah, sorry, didn't notice it didn't go to the list.


> On 06/02/2010 09:05 AM, Sven Deichmann wrote:
>> I can not imagine any reason why solr itself would require that path
>> is set.
>
> Correct. See http://localhost:8983/solr/admin/ on a running solr  
> instance. No path there if you do a search.
>
>> It is probably much easier: I would guess there is some code in the
>> current implementation that inserts the path if it is NOT already  
>> there
>> (IIRC I noticed code like that).
>> This is a behaviour you would probably want to configure through the
>> solr controlpanel from within plone.
>
> I've analysed collective.solr and the behaviour you're searching is  
> already parametrized (for search):
>
> skins/solr_site_search/search.pt:                  
> use_navigation_root request/use_navigation_root | python:True;
>
> The actual insertion is done in skins/solr_site_search/ 
> queryCatalog.py:
>
> [...]
> You can insert a false value for use_navigation_root to get a  
> global cross-site search.
>
> [...]
> This means you can replace your custom browser view that enumerates  
> all paths by a simple customization of search.pt that defaults  
> use_navigation_root to False instead of True.
>
> Since you were looking to apply this behaviour also elsewhere, i.e.  
> outside of search for tag enumeration etc., you'd have to check if  
> those entry points use queryCatalog and then either customize the  
> specific entry point to insert use_navigation_root=(nothing) or  
> else customize queryCatalog globally to always search all sites. I  
> can't imagine that the latter can be valid, it'll hose all kinds of  
> functionality that expect a site context I guess and probably  
> create security issues as a bonus. Better play it safe and  
> introduce the global cross-site context on exactly those  
> functionalities that you choose to behave that way.

Well. If you think about making this useful as general approach, you  
would probably do something like configuring kinds of search groups  
if you want to combine multiple sites in one solr that usually don't  
have anything to do with each other. That would also improve the  
recognition of paths that need to be searched since you can't be sure  
that the thing on top of the path is really the name of a plone site  
(e.g. if it is a ZODB-Mountpoint like in our project)

Of course you could simply group sites by giving each a separate solr  
instance, but this will not always be as simple...

But this begins to become complex ;)
I would probably try this in a fork and do it anyway. It has some  
potential to be included into plone. At least as part of a corporate  
buildout we are planning for a while now.

Regards,
Sven Deichmann

=========================================================

Fingerprint E260 82DC A676 7D90 9C25  AFDB 1DA8 C54D CEEC BB0A

  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
     Werkbank Kommunikation  --  http://www.werkbank.com/
  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  Werkbank Multimedia GmbH | Lothringer Str. 36 | 44805 Bochum
  phone: +49 (0)234 - 93 53 86 - 03  |  phax: 93 53 86 - 06
  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  Geschäftsführer: Thorsten Schneider | AG Bochum: HRB 7263
  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --




_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to