Hello all,

I did the following while adding a new site

        sm = site.getSiteManager()
        intids = IntIds()
        sm['intids'] = intids
        sm.registerUtility(intids, IIntIds)
        cat = Catalog()
        sm['catalog'] = cat
        sm.registerUtility(cat, ICatalog)
        cat[u'client_name'] = TextIndex('name', IClient)
I ran into the debug shell prompt and checked the length of sm['initid']
after adding 'Client' objects via browser interface. It did reflected
the number of items added. But when I ran a search query in the shell
prompt there were no results

        >>> len(sm['intids'])
        >>> list(cat.apply({'client_name': 'xyz*'}))
But when I updated the indexes, it gave out results.

        >>> cat.updateIndexes()
        >>> list(cat.apply({'client_name': 'xyz*'}))
I guess that I don't have to manually update the indexes each time when
an object is added/modified. Am I missing something? 
Joshua Immanuel
HiPro IT Solutions Private Limited

Attachment: signature.asc
Description: This is a digitally signed message part

Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope )

Reply via email to