multiple values encountered for non multiValued field keywords

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

multiple values encountered for non multiValued field keywords

Ryan Suarez
Greetings,

I am trying to configure Nutch v1.15 and Solr v7.40 to index meta tags:
https://wiki.apache.org/nutch/IndexMetatags

However, I'm getting the following error:

java.lang.Exception: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8983/solr/nutch: ERROR: [doc=https://mysite.domain.ca/<https://www.sheridancollege.ca/>] multiple values encountered for non multiValued field keywords: [somevalue1,somevalue2,somevalue3,etc]

I've included the following entry in $SOLR_HOME/server/solr/configsets/nutch/conf/schema.xml

<!-- fields for the metatags plugin -->
<field name="metatag.description" type="text" stored="true" indexed="true" multiValued="true" />
<field name="metatag.keywords" type="text" stored="true" indexed="true" multiValued="true" />
<field name="description" type="text" stored="true" indexed="true" multiValued="true" />
<field name="keywords" type="text" stored="true" indexed="true" multiValued="true" />

It contains multiValued="true" and I did restart SOLR but the problem persists. I'm stuck at this point. Any ideas?

regards,
Ryan
Reply | Threaded
Open this post in threaded view
|

Re: multiple values encountered for non multiValued field keywords

Sebastian Nagel-2
Hi Ryan,

could be caused by the managed schema. Note for Solr 7.x updating the schema.xml
alone may be not sufficient, see
  https://wiki.apache.org/nutch/NutchTutorial#Setup_Solr_for_search

Let us know whether this works. Thanks!

And we'll update the wiki page, resp. in the new wiki:
  https://cwiki.apache.org/confluence/display/NUTCH/IndexMetatags
(migration is ongoing)

Best,
Sebastian

On 7/17/19 9:52 PM, Ryan Suarez wrote:

> Greetings,
>
> I am trying to configure Nutch v1.15 and Solr v7.40 to index meta tags:
> https://wiki.apache.org/nutch/IndexMetatags
>
> However, I'm getting the following error:
>
> java.lang.Exception: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8983/solr/nutch: ERROR: [doc=https://mysite.domain.ca/<https://www.sheridancollege.ca/>] multiple values encountered for non multiValued field keywords: [somevalue1,somevalue2,somevalue3,etc]
>
> I've included the following entry in $SOLR_HOME/server/solr/configsets/nutch/conf/schema.xml
>
> <!-- fields for the metatags plugin -->
> <field name="metatag.description" type="text" stored="true" indexed="true" multiValued="true" />
> <field name="metatag.keywords" type="text" stored="true" indexed="true" multiValued="true" />
> <field name="description" type="text" stored="true" indexed="true" multiValued="true" />
> <field name="keywords" type="text" stored="true" indexed="true" multiValued="true" />
>
> It contains multiValued="true" and I did restart SOLR but the problem persists. I'm stuck at this point. Any ideas?
>
> regards,
> Ryan
>

Reply | Threaded
Open this post in threaded view
|

Re: multiple values encountered for non multiValued field keywords

Ryan Suarez
Hi Sebastian,

I've got it working now. I had to remove the following entries in schema.xml:

<!-- fields for the metatags plugin -->
<field name="metatag.description" type="text" stored="true" indexed="true" multiValued="true" />
<field name="metatag.keywords" type="text" stored="true" indexed="true" multiValued="true" />
<field name="description" type="text" stored="true" indexed="true" multiValued="true" />
<field name="keywords" type="text" stored="true" indexed="true" multiValued="true" />

...and add multivalued to managed-schema using API, no restart required:

# curl -X POST -H 'Content-type:application/json' --data-binary '{"replace-field":{"name":"keywords","type":"text_general","stored":"true","indexed":"true","multiValued":"true"}}' http://localhost:8983/solr/nutch/schema
# curl -X POST -H 'Content-type:application/json' --data-binary '{"replace-field":{"name":"description","type":"text_general","stored":"true","indexed":"true","multiValued":"true"}}' http://localhost:8983/solr/nutch/schema
# curl -X POST -H 'Content-type:application/json' --data-binary '{"replace-dynamic-field":{"name":"*_str","type":"string", "stored":"true","indexed":"true","multiValued":"true"}}' http://localhost:8983/solr/nutch/schema

Now I'm not sure why solr is using keywords and description, instead of metatag.keywords and metatag.description but at least it shows up in the results. Thanks for pointing me in the right direction.

regards,
Ryan

On Wed, 2019-07-17 at 22:10 +0200, Sebastian Nagel wrote:
Hi Ryan,

could be caused by the managed schema. Note for Solr 7.x updating the schema.xml
alone may be not sufficient, see
  https://wiki.apache.org/nutch/NutchTutorial#Setup_Solr_for_search

Let us know whether this works. Thanks!

And we'll update the wiki page, resp. in the new wiki:
  https://cwiki.apache.org/confluence/display/NUTCH/IndexMetatags
(migration is ongoing)

Best,
Sebastian

On 7/17/19 9:52 PM, Ryan Suarez wrote:
Greetings,

I am trying to configure Nutch v1.15 and Solr v7.40 to index meta tags:
https://wiki.apache.org/nutch/IndexMetatags

However, I'm getting the following error:

java.lang.Exception: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8983/solr/nutch: ERROR: [doc=https://mysite.domain.ca/<https://www.sheridancollege.ca/>;] multiple values encountered for non multiValued field keywords: [somevalue1,somevalue2,somevalue3,etc]

I've included the following entry in $SOLR_HOME/server/solr/configsets/nutch/conf/schema.xml

<!-- fields for the metatags plugin -->
<field name="metatag.description" type="text" stored="true" indexed="true" multiValued="true" />
<field name="metatag.keywords" type="text" stored="true" indexed="true" multiValued="true" />
<field name="description" type="text" stored="true" indexed="true" multiValued="true" />
<field name="keywords" type="text" stored="true" indexed="true" multiValued="true" />

It contains multiValued="true" and I did restart SOLR but the problem persists. I'm stuck at this point. Any ideas?

regards,
Ryan