In the end lucene stores stuff as strings. Even if you do store your data as map FieldType , Solr May not be able to treat it like a map. So it is fine to put is the map as one single string
On Mon, Dec 1, 2008 at 10:07 PM, Stephane Bailliez <[EMAIL PROTECTED]> wrote: > Hi all, > > > I'm looking for ideas about how to best deal with a situation where I need > to deal with storing key/values pairs in the index for consumption in the > client. > > > Typical example would be to have a document with multiple genres where for > simplicity reasons i'd like to send both the 'id' and the 'human readable > label' (might not be the best example since one would immediatly say 'what > about localization', but in that case assume it's an entity such as company > name or a person name). > > So say I have > > field1 = { 'key1':'this is value1', 'key2':'this is value2' } > > > I was thinking the easiest (not the prettiest) solution would be to store it > as effectively a string 'key:this is the value' and then have the client > deal with this 'format' and then parse it based on '<key>:<value>' pattern > > Another alternative I was thinking may have been to use a custom field that > effectively would make the field value as a map key/value for the writer but > I'm not so sure it can really be done, haven't investigated that one deeply. > > Any feedback would be welcome, solution might even be simpler and cleaner > than what I'm mentioning above, but my brain is mushy in the last couple of > weeks. > > -- stephane > > -- --Noble Paul