I don't think there is any built-in way of doing this, the problem is 
essentially that for your particular use case you want the value of the meta 
tag to be an array instead of only one value, this means that you'll need to 
either change the parse-metatags plugin (or index-metadata) to accomplish the 
desired goal. 

I'm guessing that you want to store as a multivalued field in Solr just to get 
the stored value as an array instead of a comma separated list right? because 
for search purposes the StandardTokenizerFactory will emit a stream of 
separated tokens for search, and you will be able to search for any of the 
language codes specified in the ORIGIN meta. 

Regards,

----- Original Message -----
From: "Peter Kraume" <[email protected]>
To: [email protected]
Sent: Monday, June 22, 2015 6:51:32 PM
Subject: [MASSMAIL]Split content of metatag to multi value field

Hi everybody,

I have a meta tag with a comma separated list of values. Is it possible to put 
that as multi value field to a Solr index?

The meta tag looks like this:
<meta name="ORIGIN" content="de,us,be,in,il,it" />

Currently the whole content of ORIGIN is saved in Solr as single value:
"countries_stringM": [
        "de,us,be,in,il,it"
],

My nutch-site.xml looks like this:
<property>
  <name>metatags.names</name>
  <value>origin</value>
</property>

<property>
  <name>index.parse.md</name>
  <value>metatag.origin</value>
</property>

In solrindex-mapping.xml I've added this mapping:
<field source="metatag.origin" dest="countries_stringM" />

I’m really thankful for any hints!

Cheers
Peter

Reply via email to