[CPS-devel] lucene field with bool-type

Christian Klinger cklinger at novareto.de
Wed Jan 3 10:09:51 CET 2007


Hello,

i try to add a field in the lucene catalog, which stores a bool type 
(True, False).

I have configured these field like this example:

   <field
       name="exclude_from_nav"
       attr="exclude_from_nav"
       type="Keyword"
       analyzer="Standard"
       />


If i try to get the results the values are string types.

Do you have an idea how i get a boolean type from a field?

Christian


###############################
     .> 
/opt/luc/Products/plonelucenecatalog/tests/test_lucenecatalog.py(76)testExpires()
-> print obj
(Pdb) exclude_from_nav = obj[0].exclude_from_nav
(Pdb) exclude_from_nav
'False'
(Pdb) exclude_from_nav.__doc__
'str(object) -> string\n\nReturn a nice string representation of the 
object.\nIf the argument is a string, the return value is the same object.'
(Pdb)




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