[Silva-general] "silva find" in a code source?

Kit BLAKE kitblake at infrae.com
Thu Apr 30 11:02:55 CEST 2009


Thanks for posting a solution!

On 29 Apr 2009, at 15:56, Raoul Schaffner wrote:

> i think i solved it.
>
> the key is to create a "Silva Find" object somewhere and set
> it to search defined content type within a defined path.
>
> next create a code source (or whatever) to call that silva find
> object with a search request like so:
>
> python: engine.searchResultsWithDescription(request)[0];
>
> this will return a list of zope catalog 'mybrain' objects. each
> brain object points to a document version of a silva document,
> which can be accessed like so:
>
> python: brain.getObject().aq_parent;
>
>
> greetings,
> raoul.
>
>
>
>> If all you want to do is filter out duplicates it's probably doable
>> with view code. But not if you want more complex operations. You  
>> might
>> look at the rendering code:
>> https://svn.infrae.com/SilvaFind/trunk/SilvaFind_templates/silvafindview.pt?re
>> vision=33349&view=markup
>>
>> The guy who wrote SilvaFind will be in friday and he should be able  
>> to
>> give you better advice on that level.
>>
>> Kit
>
>
> _______________________________________________
> silva-general mailing list
> silva-general at lists.infrae.com
> https://lists.infrae.com/mailman/listinfo/silva-general




More information about the silva-general mailing list