<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Andreas,<div><br></div><div>what I'm trying to do is indexing in a Catalog some Folder objects manipulating some properties.</div><div><br></div><div>If I assign to the request the new key value everything works as expected.</div><div>For instance:</div><div>req=context.REQUEST</div><div><br></div><div>for obj in context.objectValues('Folder'):</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>req.set('city', obj.city+' '+obj.province)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>req.set('id',&nbsp;('/').join(obj.getPhysicalPath()))</div><div>&nbsp; &nbsp; &nbsp; &nbsp; container.MyCatalog.catalog_object(req,req['id'])</div><div><br></div><div>I was just wondering why I am not able to get the same results (<font class="Apple-style-span" color="#fa1512">only the id get indexed but not the city</font>) building and indexing dictionaries in the following way:</div><div><br></div><div>for obj in context.objectValues('Folder'):</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>D={}</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>D['id'] =&nbsp;&nbsp;('/').join(obj.getPhysicalPath())</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>D['city'] =&nbsp;obj.city+' '+obj.province</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>container.MyCatalog.catalog_object(D,D['id'])</div><div><br></div><div>And yes, the indexes name are the same and they are listed in the catalog.</div><div><br></div><div>P.S. I know i can assign multiple&nbsp;attributes&nbsp;to an index in the catalog, still I wonder why the above code doesn't work.</div><div><br></div><div>Thanks for your help,</div><div><br></div><div><br></div><div>G.</div><div><br><div><div>On Aug 6, 2012, at 07:24 31, Andreas Jung wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>-----BEGIN PGP SIGNED MESSAGE-----<br>Hash: SHA1<br><br><br><br>Giampiero Benvenuti wrote:<br><blockquote type="cite">Hello!<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">can you please give me some hints on how to catalog a list of<br></blockquote><blockquote type="cite">dictionaries? Is it possible?<br></blockquote><br>What have you tried? What exactly is not working?<br><blockquote type="cite"><br></blockquote><blockquote type="cite">L= [{'id':'1','lastName':'Rossi','firstName':'Mario'}, {...), etc..]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">for d in L: context.Mycatalog.catalog_object( d, d['id'])<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote>Are you use that you created the related indexes that you are using for<br>indexes?<br><br>Please provide a reasonable description of the problem (if you have one).<br><br>- -aj<br>-----BEGIN PGP SIGNATURE-----<br>Version: GnuPG v1.4.11 (Darwin)<br>Comment: Using GnuPG with Mozilla - <a href="http://enigmail.mozdev.org/">http://enigmail.mozdev.org/</a><br><br>iQGUBAEBAgAGBQJQH1UOAAoJEADcfz7u4AZjbbwLwIj/kqgzC8DazRlomyO4Auv0<br>B751yKOSYWo+v6j1Ren8SFfuImie3d98oaOp5w2RHL7TyqDU9iEbfDFhTjKmFE9t<br>KeihBckCkBcsquE04Uih5vnKNVh1IOZhD6VB0yebtr4776bm7HBXi4b8ZVfWjH1Z<br>NV8HBMRku+0f4M0X8MyWGETSat5wCBO8WnnoYCsHGxpE2VNvgYAIk8LcXGdZsExa<br>HGEFmmXJy1Z8NAMrGPMQurw9JfBrC7LWDd4feEmXMw6az06kkZWNnp42Zp9YLzcR<br>tBMwigyZLMNOO9Tt+s+orGKWbKzKxoGqU1/uxGngpR+8/n4bYgFv86/46QwvMFqF<br>ScInrrYwufvqQUo9jks4HDv+BoRg6v1tUkKipu50ICXk7f1nwRsSy0OGDGmSegN+<br>JeGcFvUCJb2y0t6/ruBNTiM8Gf1cKr50Z6M5I+lG09Hoyl0iyYwdJu0s8RoGMTOQ<br>WAYeUXCbzu/CKevZIcXvU6qP/mx5Bfc=<br>=XvKh<br>-----END PGP SIGNATURE-----<br><span>&lt;lists.vcf&gt;</span></div></blockquote></div><br></div></body></html>