lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sy...@web.de
Subject Re: Re: Schema model to store additional field metadata
Date Fri, 07 Sep 2012 19:03:18 GMT
> Why would you store the actual images in SOLR?

No, the images are files on the filesystem. Only the path to the image should be stored in
Solr.

> And you are most likely looking at dynamic fields as the solution
> 
> 1) Define *_Path, *_Size, *_Alt as a dynamic field with appropriate types
> 2) During indexing, write those properties as Image_1_Path,
> Image_1_Size, Image_1_Alt or some such
> 3) Make sure that whatever search algorithm you have looks at those or
> do a copyField to aggregate them into AllImage_Alt, etc.

I was also thinking of a solution with dynamic fields, but I am very new to Solr and I am
not sure if it is a good solution to solve this modelling issue. For example I thought about
introducing two multiValued dynamic fields (image_src_*, image_alt_*) and store image data
like file path on disc and alt-attribute like this:

title:     An article about Foo and Bar
content:   This is some text about Foo and Bar.
published: 2012.09.07T19:23
image_src_1: 2012/09/foo.png
image_alt_1: Foo. Waiting for the bus.
image_src_2: 2012/04/images/bar.png
image_src_3: 2012/02/abc.png
image_alt_3: Foo and Bar at the beach

Of course a alt attribute for some images could be missing. I don't know if this is a good
or better solution for this. It feels clumsy to me, like a workaround. But maybe this is the
way to model this data, I don't know?

Mime
View raw message