index/reindex/unindex the object itself
Do not defer to p.a.discussion own tool. That's needed so that collective.indexing can patch comments, so in turn can be indexed by Solr.
This commit is contained in:
		
							parent
							
								
									986be1c6e1
								
							
						
					
					
						commit
						f217a42932
					
				@ -5,12 +5,10 @@ from Products.CMFCore.utils import getToolByName
 | 
				
			|||||||
def index_object(obj, event):
 | 
					def index_object(obj, event):
 | 
				
			||||||
    """Index the object when it is added/modified to the conversation.
 | 
					    """Index the object when it is added/modified to the conversation.
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
    catalog = getToolByName(obj, 'portal_catalog')
 | 
					    obj.indexObject()
 | 
				
			||||||
    return catalog.reindexObject(obj)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def unindex_object(obj, event):
 | 
					def unindex_object(obj, event):
 | 
				
			||||||
    """Unindex the object when it is removed from the conversation.
 | 
					    """Unindex the object when it is removed from the conversation.
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
    catalog = getToolByName(obj, 'portal_catalog')
 | 
					    obj.unindexObject()
 | 
				
			||||||
    return catalog.unindexObject(obj)
 | 
					 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user