lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Toby Cole <toby.c...@semantico.com>
Subject Re: Storing "map" in Field
Date Fri, 13 Mar 2009 14:07:20 GMT
I don't think anything _quite_ like that exists, however you could use  
wildcard fields to achieve pretty much the same thing.

You could use a post like this:
<add>
  <doc>
    <field name="id">SKU001</field>
    <field name="name">A Sample Product</field>
    <field name="price_pricelist1">119.99</field>
    <field name="price_pricelist2">109.99</field>
  </doc>
</add>

if you have a field definition in your schema.xml like:
<dynamicField name="price_*"  type="float"  indexed="true"   
stored="true"/>

Regards, Toby.

On 13 Mar 2009, at 14:01, Jeff Crowder wrote:

> All,
>
> I'm working with the sample schema, and have a scenario where I  
> would like
> to store multiple prices in a "map" of some sort.  This would be  
> used for a
> scenario where a single "product" has different "prices" based on a  
> price
> list.  For instance:
>
> <add>
>  <doc>
>    <field name="id">SKU001</field>
>    <field name="name">A Sample Product</field>
>    <field name="price[pricelist1]">119.99</field>
>    <field name="price[pricelist2]">109.99</field>
>  </doc>
> </add>
>
> Is something like this possible?
>
> Regards,
> -Jeff

Toby Cole
Software Engineer

Semantico
E: toby.cole@semantico.com
W: www.semantico.com


Mime
View raw message