lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <>
Subject Re: How to add a map of key/value pairs into a solr schema?
Date Tue, 01 Apr 2014 16:35:39 GMT
Not directly. The various workarounds depend on how you intend to access and 
query the values. What are your use cases?

-- Jack Krupansky

-----Original Message----- 
From: Silvia Suárez
Sent: Tuesday, April 1, 2014 12:29 PM
Subject: How to add a map of key/value pairs into a solr schema?

Dear all,

I'm trying to add a map of key/value pairs into the solr schema, and I just
wordering if it is possible.

For instance:

This is my schema.xml :

<field name="c_noticia" type="string" indexed="true" stored="true"
required="true" multiValued="false" />
<field name="c_tipo" type="int" indexed="true" stored="true"
<field name="c_perfil" type="int" indexed="true" stored="true"
<field name="tipo_red" type="int" indexed="true" stored="true"
<field name="descriptores" type="map?" indexed="true" stored="true"
multiValued="true" />

Is it possible to define a type= map (see the example above in the schema)
into the solr xchema?, for example something like this:

map: 2252 / 23
         3789 / 12
         3790 / 21
         3794 / 19

And get a result like this:

    <str name="c_noticia">62906367</str>
    <arr name="c_perfil">
      <map? name="descriptores">
      <?>2252 / 23</?>
      <?>3789 / 54</?>
      <?>3790 / 21</?>
      <?>3794 / 12</?>

I mean, is it possible introduce a map into one document?

Thanks in advance for some help,


View raw message