ZCatalog indexing help request
I need to know how to control what objects are indexed by ZCatalog based on a custom property I have added to files and folders I do not want indexed by ZCatalog. I have added a boolean property named 'noindex' and have set its value as TRUE for files and folders I do not want indexed by ZCatalog. Now, what I need to know is what to enter in the expr: |________________________| textarea form field of the find objects tab of my ZCatalog object in order to index all page templates *except* those that contain a 'noindex' property set to TRUE. Any advice on how to implement (and possibly automate?) this is much appreciated. - Kamal
Kamal Gill wrote:
I need to know how to control what objects are indexed by ZCatalog based on a custom property I have added to files and folders I do not want indexed by ZCatalog. I have added a boolean property named 'noindex' and have set its value as TRUE for files and folders I do not want indexed by ZCatalog.
Now, what I need to know is what to enter in the expr: |________________________| textarea form field of the find objects tab of my ZCatalog object in order to index all page templates *except* those that contain a 'noindex' property set to TRUE.
please try: not this().getProperty('noindex') -mj
not this().getProperty('noindex')
This works for individual page template objects, but I was hoping to ignore collections of objects contained in a folder that contains a 'noindex' property. I've tried selecting both 'Folder' and 'Page Template' and applying the "not this().getProperty('noindex') expression, which works for filtering out page templates with the 'noindex' property but does not filter out folders with the 'noindex' property. Basically what I would like to do is ignore folders of objects at a time using a 'noindex' property set at the particular folder(s). Any ideas? On Monday, December 16, 2002, at 02:18 PM, Maik Jablonski wrote:
Kamal Gill wrote:
I need to know how to control what objects are indexed by ZCatalog based on a custom property I have added to files and folders I do not want indexed by ZCatalog. I have added a boolean property named 'noindex' and have set its value as TRUE for files and folders I do not want indexed by ZCatalog. Now, what I need to know is what to enter in the expr: |________________________| textarea form field of the find objects tab of my ZCatalog object in order to index all page templates *except* those that contain a 'noindex' property set to TRUE.
please try:
not this().getProperty('noindex')
-mj
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Kamal Gill wrote:
not this().getProperty('noindex')
This works for individual page template objects, but I was hoping to ignore collections of objects contained in a folder that contains a 'noindex' property.
Ok, I didn't got your problem. Next try...:) You'll have to use acquisition: not getattr(_.this(),'noindex') this one should do the magic you'll need... -mj
not getattr(_.this(),'noindex')
I'm afraid this did not work for me. There are no error messages returned, but there are no items added to the catalog as there should be. Any other ideas? On Monday, December 16, 2002, at 03:30 PM, Maik Jablonski wrote:
Kamal Gill wrote:
not this().getProperty('noindex') This works for individual page template objects, but I was hoping to ignore collections of objects contained in a folder that contains a 'noindex' property.
Ok, I didn't got your problem. Next try...:) You'll have to use acquisition:
not getattr(_.this(),'noindex')
this one should do the magic you'll need...
-mj
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Did you try: not noindex hth, -Casey On Monday 16 December 2002 07:25 pm, Kamal Gill wrote:
not getattr(_.this(),'noindex')
I'm afraid this did not work for me. There are no error messages returned, but there are no items added to the catalog as there should be. Any other ideas?
On Monday, December 16, 2002, at 03:30 PM, Maik Jablonski wrote:
Kamal Gill wrote:
not this().getProperty('noindex') This works for individual page template objects, but I was hoping to ignore collections of objects contained in a folder that contains a 'noindex' property.
Ok, I didn't got your problem. Next try...:) You'll have to use acquisition:
not getattr(_.this(),'noindex')
this one should do the magic you'll need...
-mj
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Casey, "not noindex" appears to only index objects that have a noindex property set as false. What I need is an expression that will not index objects that have a noindex property set as true. Objects that have the noindex property set as false *and* objects that do not have a noindex property should be indexed. This is the sort of rule I need... Filename Properties Index? file1.html noindex=true no file2.html noindex=false yes file3.html (none) yes - Kamal On Tuesday, December 17, 2002, at 09:42 AM, Casey Duncan wrote:
Did you try:
not noindex
hth,
-Casey
On Monday 16 December 2002 07:25 pm, Kamal Gill wrote:
not getattr(_.this(),'noindex')
I'm afraid this did not work for me. There are no error messages returned, but there are no items added to the catalog as there should be. Any other ideas?
On Monday, December 16, 2002, at 03:30 PM, Maik Jablonski wrote:
Kamal Gill wrote:
not this().getProperty('noindex') This works for individual page template objects, but I was hoping to ignore collections of objects contained in a folder that contains a 'noindex' property.
Ok, I didn't got your problem. Next try...:) You'll have to use acquisition:
not getattr(_.this(),'noindex')
this one should do the magic you'll need...
-mj
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Then: _.has_key('noindex') and not noindex or 0 Alternately you can set a boolean noindex property in the root folder to false and use the previous expression. hth, -Casey On Tuesday 17 December 2002 01:56 pm, Kamal Gill wrote:
Casey,
"not noindex" appears to only index objects that have a noindex property set as false. What I need is an expression that will not index objects that have a noindex property set as true. Objects that have the noindex property set as false *and* objects that do not have a noindex property should be indexed.
This is the sort of rule I need...
Filename Properties Index? file1.html noindex=true no file2.html noindex=false yes file3.html (none) yes
- Kamal
On Tuesday, December 17, 2002, at 09:42 AM, Casey Duncan wrote:
Did you try:
not noindex
hth,
-Casey
On Monday 16 December 2002 07:25 pm, Kamal Gill wrote:
not getattr(_.this(),'noindex')
I'm afraid this did not work for me. There are no error messages returned, but there are no items added to the catalog as there should be. Any other ideas?
On Monday, December 16, 2002, at 03:30 PM, Maik Jablonski wrote:
Kamal Gill wrote:
not this().getProperty('noindex') This works for individual page template objects, but I was hoping to ignore collections of objects contained in a folder that contains a 'noindex' property.
Ok, I didn't got your problem. Next try...:) You'll have to use acquisition:
not getattr(_.this(),'noindex')
this one should do the magic you'll need...
-mj
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Fantastic--that did the trick. Thanks for your help. - Kamal On Tuesday, December 17, 2002, at 11:11 AM, Casey Duncan wrote:
Then:
_.has_key('noindex') and not noindex or 0
Alternately you can set a boolean noindex property in the root folder to false and use the previous expression.
hth,
-Casey
On Tuesday 17 December 2002 01:56 pm, Kamal Gill wrote:
Casey,
"not noindex" appears to only index objects that have a noindex property set as false. What I need is an expression that will not index objects that have a noindex property set as true. Objects that have the noindex property set as false *and* objects that do not have a noindex property should be indexed.
This is the sort of rule I need...
Filename Properties Index? file1.html noindex=true no file2.html noindex=false yes file3.html (none) yes
- Kamal
On Tuesday, December 17, 2002, at 09:42 AM, Casey Duncan wrote:
Did you try:
not noindex
hth,
-Casey
On Monday 16 December 2002 07:25 pm, Kamal Gill wrote:
not getattr(_.this(),'noindex')
I'm afraid this did not work for me. There are no error messages returned, but there are no items added to the catalog as there should be. Any other ideas?
On Monday, December 16, 2002, at 03:30 PM, Maik Jablonski wrote:
Kamal Gill wrote:
> not this().getProperty('noindex') This works for individual page template objects, but I was hoping to ignore collections of objects contained in a folder that contains a 'noindex' property.
Ok, I didn't got your problem. Next try...:) You'll have to use acquisition:
not getattr(_.this(),'noindex')
this one should do the magic you'll need...
-mj
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
Casey Duncan -
Kamal Gill -
Maik Jablonski