[Grok-dev] Assertion error when quering TextIndex

Sebastian Ware sebastian at urbantalk.se
Tue Jun 26 12:23:20 EDT 2007


I can't find an example in the DocTest that performs a TextIndex  
search. It only has FieldIndex, SetIndex and ValueIndex (hurry.query. 
0.9.2). I try to mimic the FieldIndex search (that works) but I get  
an assertion error.

I can see the "text_body' index in the Zope 3 management screens, and  
it would shows 3 documents and 53 words indexed.

This is the traceback:

   File "/Users/sebastianware/GrokProjects/ProtonCMS/src/protoncms/ 
app.py", line 32, in content_list
     result = Query().searchResults(query.Eq(('proton_catalog',  
'text_body'), search_term))
   File "/Users/sebastianware/GrokProjects/ProtonCMS/eggs/ 
hurry.query-0.9.2-py2.4.egg/hurry/query/query.py", line 20, in  
searchResults
     results = query.apply()
   File "/Users/sebastianware/GrokProjects/ProtonCMS/eggs/ 
hurry.query-0.9.2-py2.4.egg/hurry/query/query.py", line 144, in apply
     return self.getIndex().apply((self.value, self.value))
   File "/Users/sebastianware/GrokProjects/ProtonCMS/eggs/ 
hurry.query-0.9.2-py2.4.egg/hurry/query/query.py", line 134, in getIndex
     assert IFieldIndex.providedBy(index)
AssertionError

Mvh Sebastian





More information about the Grok-dev mailing list