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 "Netz, Steffen" <st...@ipms.fraunhofer.de> on 2016/01/26 10:40:59 UTC

Windows post.jar Can't unambiguously select between fixed arity signatures

Hi,

I'm just downloaded solr and playing around.
So far I started the Server and created a core:

bin\solr start
bin\solr create -c files -d example\files\conf

now, I'm trying to post some files:
java -Dauto  -Dc=files -jar example\exampledocs\post.jar example\exampledocs\books.csv

and get the following error:
org.apache.solr.common.SolrException: Unable to invoke function processAdd in script: update-script.js: Can't unambiguously select between fixed arity signatures [(java.lang.String, java.lang.String), (java.lang.String, java.io.Reader)] of the method org.apache.solr.analysis.TokenizerChain.tokenStream for argument types [java.lang.String, null]
                at org.apache.solr.update.processor.StatelessScriptUpdateProcessorFactory$ScriptUpdateProcessor.invokeFunction(StatelessScriptUpdateProcessorFactory.java:433)
...
Caused by: java.lang.NoSuchMethodException: Can't unambiguously select between fixed arity signatures [(java.lang.String, java.lang.String), (java.lang.String, java.io.Reader)] of the method org.apache.solr.analysis.TokenizerChain.tokenStream for argument types [java.lang.String, null]
                at jdk.internal.dynalink.beans.OverloadedMethod.throwAmbiguousMethod(OverloadedMethod.java:225)


Any hint?
Steffen

My Solr: 5.4.1
My Java : java version "1.8.0_71"



Re: Windows post.jar Can't unambiguously select between fixed arity signatures

Posted by Erik Hatcher <er...@gmail.com>.
I haven't seen this error before but there is some crazy JavaScript in the example/files update processing.  If you're indexing CSV where each row is a separate document, example/files may not be the config you want to start with anyway.  Try creating your collection without that -d. 

Oh, I see the issue - example/files script looks for a "content" field (to extract email addresses and URLs from) and there isn't one (see "null" below). Again, example/files isn't designed for non-"content" documents.  I'll make a note to fix this issue (by ignoring the extraction part when no content) though. 

   Erik

> On Jan 26, 2016, at 04:40, Netz, Steffen <st...@ipms.fraunhofer.de> wrote:
> 
> Hi,
> 
> I'm just downloaded solr and playing around.
> So far I started the Server and created a core:
> 
> bin\solr start
> bin\solr create -c files -d example\files\conf
> 
> now, I'm trying to post some files:
> java -Dauto  -Dc=files -jar example\exampledocs\post.jar example\exampledocs\books.csv
> 
> and get the following error:
> org.apache.solr.common.SolrException: Unable to invoke function processAdd in script: update-script.js: Can't unambiguously select between fixed arity signatures [(java.lang.String, java.lang.String), (java.lang.String, java.io.Reader)] of the method org.apache.solr.analysis.TokenizerChain.tokenStream for argument types [java.lang.String, null]
>                at org.apache.solr.update.processor.StatelessScriptUpdateProcessorFactory$ScriptUpdateProcessor.invokeFunction(StatelessScriptUpdateProcessorFactory.java:433)
> ...
> Caused by: java.lang.NoSuchMethodException: Can't unambiguously select between fixed arity signatures [(java.lang.String, java.lang.String), (java.lang.String, java.io.Reader)] of the method org.apache.solr.analysis.TokenizerChain.tokenStream for argument types [java.lang.String, null]
>                at jdk.internal.dynalink.beans.OverloadedMethod.throwAmbiguousMethod(OverloadedMethod.java:225)
> 
> 
> Any hint?
> Steffen
> 
> My Solr: 5.4.1
> My Java : java version "1.8.0_71"
> 
> 

Re: Windows post.jar Can't unambiguously select between fixed arity signatures

Posted by Erik Hatcher <er...@gmail.com>.
> On Jan 26, 2016, at 10:25 AM, Netz, Steffen <st...@ipms.fraunhofer.de> wrote:
> 2 related beginner questions:
> 	Is there a good tutorial for filesystem search ( with howto config-files)?

I’d humbly like to submit that example/files is this.  It’s a work in progress, with potential but plenty of rough edges (and I’ve got fixes for the below and some other things soon to be uploaded as a patch on SOLR-8590 soon), but it’s designed to work with anything with “content”, even image files that might have kinda junk or empty content.  Anything that /update/extract (via Tika) can handle.  

So in that case, 'bin/solr create -c files -d example/files; bin/post -c files some_files/; open http://localhost:8983/solr/files/browse' is the way to go.   Let’s work to make it better!   Suggestions welcome on that JIRA ticket.

	Erik



AW: Windows post.jar Can't unambiguously select between fixed arity signatures

Posted by "Netz, Steffen" <st...@ipms.fraunhofer.de>.
Hi
thanks so much,
It works now, without -d switch!

2 related beginner questions:
	Is there a good tutorial for filesystem search ( with howto config-files)?
	Is there a search in the mailing list, I don't find it.

Wow, I just looked at the webinar! Great! I've to learn:)

regards
Steffen

-----Ursprüngliche Nachricht-----
Von: Erik Hatcher [mailto:erik.hatcher@gmail.com] 
Gesendet: Dienstag, 26. Januar 2016 16:15
An: solr-user@lucene.apache.org
Betreff: Re: Windows post.jar Can't unambiguously select between fixed arity signatures

Steffan - I added a note to fix this in this JIRA ticket - https://issues.apache.org/jira/browse/SOLR-8590 <https://issues.apache.org/jira/browse/SOLR-8590>

Some options for you, don’t use -d example/files (you can actually omit the “\conf” part of that parameter, nicely!) for books.csv.    Only use example/files for true rich document “files” (such as PDF, Word, HTML, plain text, etc).  If for some reason example/files (yay!  there’s some good tricks in there, and I’m about to hit publish on a blog post on it just before the webinar about it tomorrow*!) adds some value for your needs, tinker with conf/update-script.js to avoid the use of the “content” field.  

	Erik

* webinar: https://programs.lucidworks.com/Webinar-Solr-example-files.html?utm_source=hp <https://programs.lucidworks.com/Webinar-Solr-example-files.html?utm_source=hp> and blog post series that will have the final in that series published soon too: https://lucidworks.com/blog/2015/12/08/browse-new-improved-solr-5/ <https://lucidworks.com/blog/2015/12/08/browse-new-improved-solr-5/>



> On Jan 26, 2016, at 4:40 AM, Netz, Steffen <st...@ipms.fraunhofer.de> wrote:
> 
> Hi,
> 
> I'm just downloaded solr and playing around.
> So far I started the Server and created a core:
> 
> bin\solr start
> bin\solr create -c files -d example\files\conf
> 
> now, I'm trying to post some files:
> java -Dauto  -Dc=files -jar example\exampledocs\post.jar example\exampledocs\books.csv
> 
> and get the following error:
> org.apache.solr.common.SolrException: Unable to invoke function processAdd in script: update-script.js: Can't unambiguously select between fixed arity signatures [(java.lang.String, java.lang.String), (java.lang.String, java.io.Reader)] of the method org.apache.solr.analysis.TokenizerChain.tokenStream for argument types [java.lang.String, null]
>                at org.apache.solr.update.processor.StatelessScriptUpdateProcessorFactory$ScriptUpdateProcessor.invokeFunction(StatelessScriptUpdateProcessorFactory.java:433)
> ...
> Caused by: java.lang.NoSuchMethodException: Can't unambiguously select between fixed arity signatures [(java.lang.String, java.lang.String), (java.lang.String, java.io.Reader)] of the method org.apache.solr.analysis.TokenizerChain.tokenStream for argument types [java.lang.String, null]
>                at jdk.internal.dynalink.beans.OverloadedMethod.throwAmbiguousMethod(OverloadedMethod.java:225)
> 
> 
> Any hint?
> Steffen
> 
> My Solr: 5.4.1
> My Java : java version "1.8.0_71"
> 
> 


Re: Windows post.jar Can't unambiguously select between fixed arity signatures

Posted by Erik Hatcher <er...@gmail.com>.
Steffan - I added a note to fix this in this JIRA ticket - https://issues.apache.org/jira/browse/SOLR-8590 <https://issues.apache.org/jira/browse/SOLR-8590>

Some options for you, don’t use -d example/files (you can actually omit the “\conf” part of that parameter, nicely!) for books.csv.    Only use example/files for true rich document “files” (such as PDF, Word, HTML, plain text, etc).  If for some reason example/files (yay!  there’s some good tricks in there, and I’m about to hit publish on a blog post on it just before the webinar about it tomorrow*!) adds some value for your needs, tinker with conf/update-script.js to avoid the use of the “content” field.  

	Erik

* webinar: https://programs.lucidworks.com/Webinar-Solr-example-files.html?utm_source=hp <https://programs.lucidworks.com/Webinar-Solr-example-files.html?utm_source=hp> and blog post series that will have the final in that series published soon too: https://lucidworks.com/blog/2015/12/08/browse-new-improved-solr-5/ <https://lucidworks.com/blog/2015/12/08/browse-new-improved-solr-5/>



> On Jan 26, 2016, at 4:40 AM, Netz, Steffen <st...@ipms.fraunhofer.de> wrote:
> 
> Hi,
> 
> I'm just downloaded solr and playing around.
> So far I started the Server and created a core:
> 
> bin\solr start
> bin\solr create -c files -d example\files\conf
> 
> now, I'm trying to post some files:
> java -Dauto  -Dc=files -jar example\exampledocs\post.jar example\exampledocs\books.csv
> 
> and get the following error:
> org.apache.solr.common.SolrException: Unable to invoke function processAdd in script: update-script.js: Can't unambiguously select between fixed arity signatures [(java.lang.String, java.lang.String), (java.lang.String, java.io.Reader)] of the method org.apache.solr.analysis.TokenizerChain.tokenStream for argument types [java.lang.String, null]
>                at org.apache.solr.update.processor.StatelessScriptUpdateProcessorFactory$ScriptUpdateProcessor.invokeFunction(StatelessScriptUpdateProcessorFactory.java:433)
> ...
> Caused by: java.lang.NoSuchMethodException: Can't unambiguously select between fixed arity signatures [(java.lang.String, java.lang.String), (java.lang.String, java.io.Reader)] of the method org.apache.solr.analysis.TokenizerChain.tokenStream for argument types [java.lang.String, null]
>                at jdk.internal.dynalink.beans.OverloadedMethod.throwAmbiguousMethod(OverloadedMethod.java:225)
> 
> 
> Any hint?
> Steffen
> 
> My Solr: 5.4.1
> My Java : java version "1.8.0_71"
> 
>