lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Schema model to store additional field metadata
Date Fri, 07 Sep 2012 17:31:39 GMT

I want to create a Solr index of articles. Each article should have a title, content, published
date and an arbitrary number of images attached to. An article could look like this:

title:     An article about Foo and Bar
content:   This is some text about Foo and Bar.
published: 2012.09.07T19:23
image:     2012/09/foo.png
image:     2012/04/images/bar.png
image:     2012/02/abc.png

I want to display the images with html <img>-tags. But despite src I also want to include
an alt attribute to describe each image with additional metadata. For example I want to display
the article like this:

<h3>An article about Foo and Bar</h3>
<p>This is some text about Foo and Bar.</p>
<img src="2012/09/foo.png"        alt="Foo. Waiting for the bus." />
<img src="2012/04/images/bar.png" alt="Bar again" />
<img src="2012/02/abc.png"        alt="Foo and Bar at the beach" />

I know that I can use a multiValued field to store the images. But how should or I can store
the additional src information? I have a problem finding the right schema for my index.

View raw message