[CPS-devel] Lucene Path *Index* with depth

Anahide Tchertchian at at nuxeo.com
Tue Aug 8 11:35:18 CEST 2006


Hi,

Julien Anguenot a écrit :
> Hi,
> 
> Christian Klinger wrote:
> 
>>is it possible to enable a depth parameter in a path query?
>>
>>Example
>>
>>/Portal
>>/Portal/AA
>>/Portal/AA/BB
>>/Portal/CC
>>
>>
>>if i search with
>>
>> {'path':'/Portal','depth'=1}
>>
>>results are:  Portal, Portal/AA, PortalBB
>>
>>and if i search with:
>>
>>   {'path':'/Portal','depth'=2}
>>
>>results are: Portal, Portal/AA, Portal/AA/BB, Portal/AA/CC
> 
> 
> nope this feature it's not implemented yet.
> 
> Can you open a ticket within the Trac please ?
> (See : http://www.cps-project.org/sections/development for instructions)
> 
> Cheers,

Note that the CPSLuceneCatalog re-definition of the 
IndexableObjectWrapper object holds a method named relative_path_depth 
that does what you want, see:
https://svn.nuxeo.org/trac/pub/browser/CPS3/products/CPSLuceneCatalog/trunk/wrapper.py

If you add an index with that name (relative_path_depth), it will be 
indexed, provided you add the method on the IndexableObjectWrapper you 
are using (if I'm not wrong, you're not using CPSLuceneCatalog, right?).

Regards,

-- 
Anahide Tchertchian, Nuxeo
Mail: at at nuxeo.com - Tel: +33 (0)1 40 33 71 60
http://www.nuxeo.com - http://www.cps-project.org


More information about the cps-devel mailing list

This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.