You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Mark Roberts <ma...@red-gate.com> on 2010/03/02 18:07:24 UTC

How can I get Solr-Cell to extract to multi-valued fields?

Hi,

I have a schema with a multivalued field like so:

<field name="product" type="string" indexed="true" stored="true" multiValued="true"/>

I am uploading html documents to the Solr extraction handler which contain meta in the head, like so:

<meta name="product" content="firstproduct" />
<meta name="product" content="anotherproduct" />
<meta name="product" content="andanotherproduct" />

I want the extraction handler to map each of these pieces of meta onto the product field, however, there seems to be a problem - only the last item "andanotherproduct" is mapped, the first seem to be ignored.

It does work, however, if I pass the values as literals in the query string (e.g. literal.product=firstproduct&literal.product=anotherproduct&literal.product=andanotherproduct)

I've tried the release version 1.4 of solr and a recent nightly build of 1.5 and neither work.

Is this a bug in Solr-cell or am I doing something wrong?

Many thanks,
Mark.

Re: How can I get Solr-Cell to extract to multi-valued fields?

Posted by Lance Norskog <go...@gmail.com>.
It is a bug. I just filed this. It is just a unit test that displays
the behavior.

http://issues.apache.org/jira/browse/SOLR-1803

On Tue, Mar 2, 2010 at 9:07 AM, Mark Roberts <ma...@red-gate.com> wrote:
> Hi,
>
> I have a schema with a multivalued field like so:
>
> <field name="product" type="string" indexed="true" stored="true" multiValued="true"/>
>
> I am uploading html documents to the Solr extraction handler which contain meta in the head, like so:
>
> <meta name="product" content="firstproduct" />
> <meta name="product" content="anotherproduct" />
> <meta name="product" content="andanotherproduct" />
>
> I want the extraction handler to map each of these pieces of meta onto the product field, however, there seems to be a problem - only the last item "andanotherproduct" is mapped, the first seem to be ignored.
>
> It does work, however, if I pass the values as literals in the query string (e.g. literal.product=firstproduct&literal.product=anotherproduct&literal.product=andanotherproduct)
>
> I've tried the release version 1.4 of solr and a recent nightly build of 1.5 and neither work.
>
> Is this a bug in Solr-cell or am I doing something wrong?
>
> Many thanks,
> Mark.
>



-- 
Lance Norskog
goksron@gmail.com