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 Fenbers <ma...@noaa.gov> on 2015/09/15 17:08:14 UTC
Google didn't help on this one!
I'm working with the spellcheck component of Solr for the first time.
I'm using SolrJ, and when I submit my query, I get a Solr Exception:
"Expected mime type octet/stream but got text/html."
What in the world is this telling me?? The query object I submitted is
an entire sentence, not a single word. Would that matter?
Mark
Re: Google didn't help on this one!
Posted by Mark Fenbers <ma...@noaa.gov>.
On 9/16/2015 5:24 AM, Alessandro Benedetti wrote:
> As a reference I always suggest :
> https://cwiki.apache.org/confluence/display/solr/Spell+Checking
>
>
I read this doc and have found it moderately helpful to my current
problem. But I have at least one question about it, especially given
that my current error is a ClassCastException from an unknown origin.
Let's look at some lines I copied from the document:
<str name="spellcheck">true</str>
<bool name="correctlySpelled">false</bool>
and
<str name="spellcheck.count">20</str>
<int name="maxEdits">2</int>
Why are some parameters specified as strings (<str> tag) even though
they are integers or boolean, and others specificed as integer (<int>
tags) and boolean (<bool> tags)? Does it matter which way I specify them?
thanks,
Mark
Re: Google didn't help on this one!
Posted by Alessandro Benedetti <be...@gmail.com>.
Taking a look to your request :
GET
/solr/EventLog/spellCheckCompRH?qt=%2FspellCheckCompRH&q=Some+more+text+wit+some+missspelled+wordz.&spellcheck=on&spellcheck.build=true
You call :
*Solr Core ( Collection)* : EventLog
*Request handler* : spellCheckCompRH
*Qt parameter* ( legacy to specify the request handler) : /spellCheckCompRH
I think you just copied that part from the SolrJ wiki (
query.setRequestHandler("/spellCheckCompRH");) .
Have you verified what happens if you try to use the spellcheck through
requests ?
Is that request handler actually working ?
As a reference I always suggest :
https://cwiki.apache.org/confluence/display/solr/Spell+Checking
Cheers
2015-09-15 18:43 GMT+01:00 Mark Fenbers <ma...@noaa.gov>:
> So I ran "nc -l 8983" then restarted solr, and then ran my app with my
> query. nc reported the following:
>
> GET
> /solr/EventLog/spellCheckCompRH?qt=%2FspellCheckCompRH&q=Some+more+text+wit+some+missspelled+wordz.&spellcheck=on&spellcheck.build=true&wt=javabin&version=2
> HTTP/1.1
> User-Agent: Solr[org.apache.solr.client.solrj.impl.HttpSolrClient] 1.0
> Host: dell9-tir:8983
> Connection: Keep-Alive
>
> I'm not sure if this is good, or indicates an error of any kind.
>
> Anyway, when I ran my app again, I got a completely different error,
> although I didn't change anything! So, I guess I get to move on from this
> and see what other hurdles I run into!
>
> Thanks for the help!
> Mark
>
>
>
> On 9/15/2015 11:13 AM, Yonik Seeley wrote:
>
>> On Tue, Sep 15, 2015 at 11:08 AM, Mark Fenbers <ma...@noaa.gov>
>> wrote:
>>
>>> I'm working with the spellcheck component of Solr for the first time.
>>> I'm
>>> using SolrJ, and when I submit my query, I get a Solr Exception:
>>> "Expected
>>> mime type octet/stream but got text/html."
>>>
>>> What in the world is this telling me??
>>>
>> You're probably hitting an endpoint on Solr that doesn't exist and
>> getting an HTML 404 error page rather than the response (which would
>> be in binary by default).
>>
>> An easy way to see what SolrJ is sending is to kill your solr server,
>> then do
>>
>> nc -l 8983
>>
>> And then run your SolrJ program to see what it sends... if it look OK,
>> then try sending the request from curl to Solr.
>>
>> -Yonik
>>
>>
>
--
--------------------------
Benedetti Alessandro
Visiting card - http://about.me/alessandro_benedetti
Blog - http://alexbenedetti.blogspot.co.uk
"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"
William Blake - Songs of Experience -1794 England
RE: Google didn't help on this one!
Posted by steve shepard <sc...@hotmail.com>.
For this type of "walking" error, I'd suggest installing on the "client" pc a HTTP, HTTPS packet inspector like Fiddler; this allows you to see exactly what information you are sending to the server, and the response that you receive; format, image (if any) and the like.
http://fiddlerbook.com/book/
http://www.telerik.com/fiddler
Steve
> From: mark.fenbers@noaa.gov
> Subject: Re: Google didn't help on this one!
> To: solr-user@lucene.apache.org
> Date: Tue, 15 Sep 2015 13:43:47 -0400
>
> So I ran "nc -l 8983" then restarted solr, and then ran my app with my
> query. nc reported the following:
>
> GET
> /solr/EventLog/spellCheckCompRH?qt=%2FspellCheckCompRH&q=Some+more+text+wit+some+missspelled+wordz.&spellcheck=on&spellcheck.build=true&wt=javabin&version=2
> HTTP/1.1
> User-Agent: Solr[org.apache.solr.client.solrj.impl.HttpSolrClient] 1.0
> Host: dell9-tir:8983
> Connection: Keep-Alive
>
> I'm not sure if this is good, or indicates an error of any kind.
>
> Anyway, when I ran my app again, I got a completely different error,
> although I didn't change anything! So, I guess I get to move on from
> this and see what other hurdles I run into!
>
> Thanks for the help!
> Mark
>
>
> On 9/15/2015 11:13 AM, Yonik Seeley wrote:
> > On Tue, Sep 15, 2015 at 11:08 AM, Mark Fenbers <ma...@noaa.gov> wrote:
> >> I'm working with the spellcheck component of Solr for the first time. I'm
> >> using SolrJ, and when I submit my query, I get a Solr Exception: "Expected
> >> mime type octet/stream but got text/html."
> >>
> >> What in the world is this telling me??
> > You're probably hitting an endpoint on Solr that doesn't exist and
> > getting an HTML 404 error page rather than the response (which would
> > be in binary by default).
> >
> > An easy way to see what SolrJ is sending is to kill your solr server, then do
> >
> > nc -l 8983
> >
> > And then run your SolrJ program to see what it sends... if it look OK,
> > then try sending the request from curl to Solr.
> >
> > -Yonik
> >
>
Re: Google didn't help on this one!
Posted by Alessandro Benedetti <be...@gmail.com>.
Can you post us the schema description of the fields you are using for
spellchecking ?
Are you using numeric fields to get the suggestions from ? ( which should
be quite weird)
Cheers
2015-09-16 12:22 GMT+01:00 Mark Fenbers <ma...@noaa.gov>:
> On 9/15/2015 6:49 PM, Shawn Heisey wrote:
>
>>
>> >From the information we have, we cannot tell if this is a problem
>> request or not. Do you have a core/collection named "EventLog" on your
>> Solr server? It will be case sensitive. If you do, does that config
>> have a handler named "spellCheckCompRH" in it (also case sensitive)?
>>
>> The nc output lets us see everything that your client sent to Solr, so I
>> have built a test URL for you based on that info.
>>
>> Try sending the following URL from a browser or a curl command. If I've
>> gotten the host wrong, go ahead and replace it with the correct value.
>> You'll probably be able to see any errors right in the browser or curl
>> output. Hopefully this will help you figure out what's happening. Also
>> look in your Solr server's logfile for error messages.
>>
>>
>> http://dell9-tir:8983/solr/EventLog/spellCheckCompRH?qt=%2FspellCheckCompRH&q=Some+more+text+wit+some+missspelled+wordz.&spellcheck=on&spellcheck.build=true&wt=json&indent=true
>>
>> I notice that you have "spellcheck.build=true" in that URL. You
>> probably don't want to do this on every request, assuming that your
>> spellcheck dictionary even requires building.
>>
>> Thanks,
>> Shawn
>>
> It wasn't really a problem request, but a follow-up to those who took the
> time to help me. However, since this error has returned, it is now a
> problem request! ;-)
>
> I am aware that "spellcheck.build=true" is expensive, but since I haven't
> had my first success yet with spell-checking, I figured it wouldn't hurt to
> have it in there for now.
>
> I ran the URL you gave verbatim (because your assumptions were correct),
> but I got the stacktrace shown below. This is particularly puzzling
> because I can find nowhere in my code or configuration where I am
> specifying a float value where I shouldn't be. My solrconfig.xml and
> schema.xml are posted in another thread having a subject "Moving on to
> spelling" if that helps you help me.
>
> Thanks,
> Mark
>
> HTTP ERROR 500
>
> Problem accessing /solr/EventLog/spellCheckCompRH. Reason:
>
> {msg=SolrCore 'EventLog' is not available due to init failure:
> java.lang.Float cannot be cast to
> java.lang.String,trace=org.apache.solr.common.SolrException: SolrCore
> 'EventLog' is not available due to init failure: java.lang.Float cannot be
> cast to java.lang.String
> at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:978)
> at org.apache.solr.servlet.HttpSolrCall.init(HttpSolrCall.java:250)
> at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:417)
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:210)
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:179)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
> at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
> at org.eclipse.jetty.server.Server.handle(Server.java:499)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
> at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
> at org.eclipse.jetty.io
> .AbstractConnection$2.run(AbstractConnection.java:540)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.solr.common.SolrException: java.lang.Float cannot be
> cast to java.lang.String
> at org.apache.solr.core.SolrCore.<init>(SolrCore.java:820)
> at org.apache.solr.core.SolrCore.<init>(SolrCore.java:659)
> at org.apache.solr.core.CoreContainer.create(CoreContainer.java:727)
> at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:447)
> at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:438)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at
> org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$1.run(ExecutorUtil.java:210)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> ... 1 more
> Caused by: java.lang.ClassCastException: java.lang.Float cannot be cast to
> java.lang.String
> at
> org.apache.solr.spelling.AbstractLuceneSpellChecker.init(AbstractLuceneSpellChecker.java:97)
> at
> org.apache.solr.spelling.IndexBasedSpellChecker.init(IndexBasedSpellChecker.java:57)
> at
> org.apache.solr.handler.component.SpellCheckComponent.inform(SpellCheckComponent.java:660)
> at
> org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:619)
> at org.apache.solr.core.SolrCore.<init>(SolrCore.java:800)
> ... 9 more
> ,code=500}
>
>
--
--------------------------
Benedetti Alessandro
Visiting card - http://about.me/alessandro_benedetti
Blog - http://alexbenedetti.blogspot.co.uk
"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"
William Blake - Songs of Experience -1794 England
Re: Google didn't help on this one!
Posted by Mark Fenbers <ma...@noaa.gov>.
Ah ha!! Exactly my point in the post I sent about the same time you did
(same Thread)!
Mark
On 9/16/2015 8:03 AM, Mikhail Khludnev wrote:
> https://github.com/apache/lucene-solr/blob/trunk/solr/core/src/java/org/apache/solr/spelling/AbstractLuceneSpellChecker.java#L97
> this mean that
>
> <float name="accuracy">0.5</float>
>
> should be replaced to
>
> <str name="accuracy">0.5</str>
>
>
>
> On Wed, Sep 16, 2015 at 2:32 PM, Upayavira <uv...@odoko.co.uk> wrote:
>
>> See this:
>>
>> Caused by: java.lang.ClassCastException: java.lang.Float cannot be cast
>> to java.lang.String
>> at
>>
>> org.apache.solr.spelling.AbstractLuceneSpellChecker.init(AbstractLuceneSpellChecker.java:97)
>>
>> AbstractLuceneSpellChecker is expecting a string, but getting a float.
>> Can you paste here the config (in solrconfig.xml) for your spellchecker?
>>
>> Also, a simple way to get spell checking started is to look at the
>> /browse example that comes with the techproducts sample configs. It has
>> spellchecking already working, so starting there can be a way to get
>> something going easily.
>>
>> Upayavira
>>
>> On Wed, Sep 16, 2015, at 12:22 PM, Mark Fenbers wrote:
>>> On 9/15/2015 6:49 PM, Shawn Heisey wrote:
>>>> >From the information we have, we cannot tell if this is a problem
>>>> request or not. Do you have a core/collection named "EventLog" on your
>>>> Solr server? It will be case sensitive. If you do, does that config
>>>> have a handler named "spellCheckCompRH" in it (also case sensitive)?
>>>>
>>>> The nc output lets us see everything that your client sent to Solr, so
>> I
>>>> have built a test URL for you based on that info.
>>>>
>>>> Try sending the following URL from a browser or a curl command. If
>> I've
>>>> gotten the host wrong, go ahead and replace it with the correct value.
>>>> You'll probably be able to see any errors right in the browser or curl
>>>> output. Hopefully this will help you figure out what's happening.
>> Also
>>>> look in your Solr server's logfile for error messages.
>>>>
>>>>
>> http://dell9-tir:8983/solr/EventLog/spellCheckCompRH?qt=%2FspellCheckCompRH&q=Some+more+text+wit+some+missspelled+wordz.&spellcheck=on&spellcheck.build=true&wt=json&indent=true
>>>> I notice that you have "spellcheck.build=true" in that URL. You
>>>> probably don't want to do this on every request, assuming that your
>>>> spellcheck dictionary even requires building.
>>>>
>>>> Thanks,
>>>> Shawn
>>> It wasn't really a problem request, but a follow-up to those who took
>>> the time to help me. However, since this error has returned, it is now
>>> a problem request! ;-)
>>>
>>> I am aware that "spellcheck.build=true" is expensive, but since I
>>> haven't had my first success yet with spell-checking, I figured it
>>> wouldn't hurt to have it in there for now.
>>>
>>> I ran the URL you gave verbatim (because your assumptions were correct),
>>> but I got the stacktrace shown below. This is particularly puzzling
>>> because I can find nowhere in my code or configuration where I am
>>> specifying a float value where I shouldn't be. My solrconfig.xml and
>>> schema.xml are posted in another thread having a subject "Moving on to
>>> spelling" if that helps you help me.
>>>
>>> Thanks,
>>> Mark
>>>
>>> HTTP ERROR 500
>>>
>>> Problem accessing /solr/EventLog/spellCheckCompRH. Reason:
>>>
>>> {msg=SolrCore 'EventLog' is not available due to init failure:
>>> java.lang.Float cannot be cast to
>>> java.lang.String,trace=org.apache.solr.common.SolrException: SolrCore
>>> 'EventLog' is not available due to init failure: java.lang.Float cannot
>>> be cast to java.lang.String
>>> at
>>> org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:978)
>>> at org.apache.solr.servlet.HttpSolrCall.init(HttpSolrCall.java:250)
>>> at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:417)
>>> at
>>>
>> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:210)
>>> at
>>>
>> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:179)
>>> at
>>>
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
>>> at
>>>
>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
>>> at
>>>
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>>> at
>>>
>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
>>> at
>>>
>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
>>> at
>>>
>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
>>> at
>>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
>>> at
>>>
>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>>> at
>>>
>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
>>> at
>>>
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>>> at
>>>
>> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
>>> at
>>>
>> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
>>> at
>>>
>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
>>> at org.eclipse.jetty.server.Server.handle(Server.java:499)
>>> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
>>> at
>>>
>> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
>>> at
>>>
>> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
>>> at
>>>
>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
>>> at
>>>
>> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
>>> at java.lang.Thread.run(Thread.java:745)
>>> Caused by: org.apache.solr.common.SolrException: java.lang.Float cannot
>>> be cast to java.lang.String
>>> at org.apache.solr.core.SolrCore.<init>(SolrCore.java:820)
>>> at org.apache.solr.core.SolrCore.<init>(SolrCore.java:659)
>>> at org.apache.solr.core.CoreContainer.create(CoreContainer.java:727)
>>> at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:447)
>>> at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:438)
>>> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>>> at
>>>
>> org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$1.run(ExecutorUtil.java:210)
>>> at
>>>
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>> at
>>>
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>> ... 1 more
>>> Caused by: java.lang.ClassCastException: java.lang.Float cannot be cast
>>> to java.lang.String
>>> at
>>>
>> org.apache.solr.spelling.AbstractLuceneSpellChecker.init(AbstractLuceneSpellChecker.java:97)
>>> at
>>>
>> org.apache.solr.spelling.IndexBasedSpellChecker.init(IndexBasedSpellChecker.java:57)
>>> at
>>>
>> org.apache.solr.handler.component.SpellCheckComponent.inform(SpellCheckComponent.java:660)
>>> at
>>>
>> org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:619)
>>> at org.apache.solr.core.SolrCore.<init>(SolrCore.java:800)
>>> ... 9 more
>>> ,code=500}
>>>
>
>
Re: Google didn't help on this one!
Posted by Mikhail Khludnev <mk...@griddynamics.com>.
Mark, wiki and defauit configs are formally correct and just might be not
specific enough for older spellcheckers. I closed SOLR-8063.
<https://issues.apache.org/jira/browse/SOLR-8063>
On Wed, Sep 16, 2015 at 5:30 PM, Mikhail Khludnev <
mkhludnev@griddynamics.com> wrote:
> Raised https://issues.apache.org/jira/browse/SOLR-8063
>
>
> On Wed, Sep 16, 2015 at 3:35 PM, Mark Fenbers <ma...@noaa.gov>
> wrote:
>
>> Indeed! <float> should be changed to <str> in the "Spell Checking"
>> document (https://cwiki.apache.org/confluence/display/solr/Spell+Checking)
>> and in all the baseline solrconfig.xml files provided in the distribution.
>> In addition, '<str name="distanceMeasure"> internal</str>' should be
>> removed/changed in the same document and same solrconfig.xml files because
>> "internal" is not defined in AbstractLuceneSpellchecker.java! Once I
>> edited these two problems in my own solrconfig.xml, the stacktrace errors
>> went away!! Yay!
>>
>> But I'm not out of the woods yet! I'll resume later, after our system
>> upgrade today.
>>
>> Thanks!
>> Mark
>>
>> On 9/16/2015 8:03 AM, Mikhail Khludnev wrote:
>>
>>>
>>> https://github.com/apache/lucene-solr/blob/trunk/solr/core/src/java/org/apache/solr/spelling/AbstractLuceneSpellChecker.java#L97
>>> this mean that
>>>
>>> <float name="accuracy">0.5</float>
>>>
>>> should be replaced to
>>>
>>> <str name="accuracy">0.5</str>
>>>
>>>
>>>
>>>
>>>
>>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
> Principal Engineer,
> Grid Dynamics
>
> <http://www.griddynamics.com>
> <mk...@griddynamics.com>
>
--
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics
<http://www.griddynamics.com>
<mk...@griddynamics.com>
Re: Google didn't help on this one!
Posted by Mikhail Khludnev <mk...@griddynamics.com>.
Raised https://issues.apache.org/jira/browse/SOLR-8063
On Wed, Sep 16, 2015 at 3:35 PM, Mark Fenbers <ma...@noaa.gov> wrote:
> Indeed! <float> should be changed to <str> in the "Spell Checking"
> document (https://cwiki.apache.org/confluence/display/solr/Spell+Checking)
> and in all the baseline solrconfig.xml files provided in the distribution.
> In addition, '<str name="distanceMeasure"> internal</str>' should be
> removed/changed in the same document and same solrconfig.xml files because
> "internal" is not defined in AbstractLuceneSpellchecker.java! Once I
> edited these two problems in my own solrconfig.xml, the stacktrace errors
> went away!! Yay!
>
> But I'm not out of the woods yet! I'll resume later, after our system
> upgrade today.
>
> Thanks!
> Mark
>
> On 9/16/2015 8:03 AM, Mikhail Khludnev wrote:
>
>>
>> https://github.com/apache/lucene-solr/blob/trunk/solr/core/src/java/org/apache/solr/spelling/AbstractLuceneSpellChecker.java#L97
>> this mean that
>>
>> <float name="accuracy">0.5</float>
>>
>> should be replaced to
>>
>> <str name="accuracy">0.5</str>
>>
>>
>>
>>
>>
>
--
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics
<http://www.griddynamics.com>
<mk...@griddynamics.com>
Re: Google didn't help on this one!
Posted by Mark Fenbers <ma...@noaa.gov>.
Indeed! <float> should be changed to <str> in the "Spell Checking"
document
(https://cwiki.apache.org/confluence/display/solr/Spell+Checking) and in
all the baseline solrconfig.xml files provided in the distribution. In
addition, '<str name="distanceMeasure"> internal</str>' should be
removed/changed in the same document and same solrconfig.xml files
because "internal" is not defined in AbstractLuceneSpellchecker.java!
Once I edited these two problems in my own solrconfig.xml, the
stacktrace errors went away!! Yay!
But I'm not out of the woods yet! I'll resume later, after our system
upgrade today.
Thanks!
Mark
On 9/16/2015 8:03 AM, Mikhail Khludnev wrote:
> https://github.com/apache/lucene-solr/blob/trunk/solr/core/src/java/org/apache/solr/spelling/AbstractLuceneSpellChecker.java#L97
> this mean that
>
> <float name="accuracy">0.5</float>
>
> should be replaced to
>
> <str name="accuracy">0.5</str>
>
>
>
>
Re: Google didn't help on this one!
Posted by Mikhail Khludnev <mk...@griddynamics.com>.
https://github.com/apache/lucene-solr/blob/trunk/solr/core/src/java/org/apache/solr/spelling/AbstractLuceneSpellChecker.java#L97
this mean that
<float name="accuracy">0.5</float>
should be replaced to
<str name="accuracy">0.5</str>
On Wed, Sep 16, 2015 at 2:32 PM, Upayavira <uv...@odoko.co.uk> wrote:
> See this:
>
> Caused by: java.lang.ClassCastException: java.lang.Float cannot be cast
> to java.lang.String
> at
>
> org.apache.solr.spelling.AbstractLuceneSpellChecker.init(AbstractLuceneSpellChecker.java:97)
>
> AbstractLuceneSpellChecker is expecting a string, but getting a float.
> Can you paste here the config (in solrconfig.xml) for your spellchecker?
>
> Also, a simple way to get spell checking started is to look at the
> /browse example that comes with the techproducts sample configs. It has
> spellchecking already working, so starting there can be a way to get
> something going easily.
>
> Upayavira
>
> On Wed, Sep 16, 2015, at 12:22 PM, Mark Fenbers wrote:
> > On 9/15/2015 6:49 PM, Shawn Heisey wrote:
> > >
> > > >From the information we have, we cannot tell if this is a problem
> > > request or not. Do you have a core/collection named "EventLog" on your
> > > Solr server? It will be case sensitive. If you do, does that config
> > > have a handler named "spellCheckCompRH" in it (also case sensitive)?
> > >
> > > The nc output lets us see everything that your client sent to Solr, so
> I
> > > have built a test URL for you based on that info.
> > >
> > > Try sending the following URL from a browser or a curl command. If
> I've
> > > gotten the host wrong, go ahead and replace it with the correct value.
> > > You'll probably be able to see any errors right in the browser or curl
> > > output. Hopefully this will help you figure out what's happening.
> Also
> > > look in your Solr server's logfile for error messages.
> > >
> > >
> http://dell9-tir:8983/solr/EventLog/spellCheckCompRH?qt=%2FspellCheckCompRH&q=Some+more+text+wit+some+missspelled+wordz.&spellcheck=on&spellcheck.build=true&wt=json&indent=true
> > >
> > > I notice that you have "spellcheck.build=true" in that URL. You
> > > probably don't want to do this on every request, assuming that your
> > > spellcheck dictionary even requires building.
> > >
> > > Thanks,
> > > Shawn
> > It wasn't really a problem request, but a follow-up to those who took
> > the time to help me. However, since this error has returned, it is now
> > a problem request! ;-)
> >
> > I am aware that "spellcheck.build=true" is expensive, but since I
> > haven't had my first success yet with spell-checking, I figured it
> > wouldn't hurt to have it in there for now.
> >
> > I ran the URL you gave verbatim (because your assumptions were correct),
> > but I got the stacktrace shown below. This is particularly puzzling
> > because I can find nowhere in my code or configuration where I am
> > specifying a float value where I shouldn't be. My solrconfig.xml and
> > schema.xml are posted in another thread having a subject "Moving on to
> > spelling" if that helps you help me.
> >
> > Thanks,
> > Mark
> >
> > HTTP ERROR 500
> >
> > Problem accessing /solr/EventLog/spellCheckCompRH. Reason:
> >
> > {msg=SolrCore 'EventLog' is not available due to init failure:
> > java.lang.Float cannot be cast to
> > java.lang.String,trace=org.apache.solr.common.SolrException: SolrCore
> > 'EventLog' is not available due to init failure: java.lang.Float cannot
> > be cast to java.lang.String
> > at
> > org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:978)
> > at org.apache.solr.servlet.HttpSolrCall.init(HttpSolrCall.java:250)
> > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:417)
> > at
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:210)
> > at
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:179)
> > at
> >
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
> > at
> >
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
> > at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> > at
> >
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
> > at
> >
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
> > at
> >
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
> > at
> > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
> > at
> >
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> > at
> >
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
> > at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> > at
> >
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
> > at
> >
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
> > at
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
> > at org.eclipse.jetty.server.Server.handle(Server.java:499)
> > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
> > at
> >
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
> > at
> >
> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
> > at
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
> > at
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
> > at java.lang.Thread.run(Thread.java:745)
> > Caused by: org.apache.solr.common.SolrException: java.lang.Float cannot
> > be cast to java.lang.String
> > at org.apache.solr.core.SolrCore.<init>(SolrCore.java:820)
> > at org.apache.solr.core.SolrCore.<init>(SolrCore.java:659)
> > at org.apache.solr.core.CoreContainer.create(CoreContainer.java:727)
> > at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:447)
> > at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:438)
> > at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> > at
> >
> org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$1.run(ExecutorUtil.java:210)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> > ... 1 more
> > Caused by: java.lang.ClassCastException: java.lang.Float cannot be cast
> > to java.lang.String
> > at
> >
> org.apache.solr.spelling.AbstractLuceneSpellChecker.init(AbstractLuceneSpellChecker.java:97)
> > at
> >
> org.apache.solr.spelling.IndexBasedSpellChecker.init(IndexBasedSpellChecker.java:57)
> > at
> >
> org.apache.solr.handler.component.SpellCheckComponent.inform(SpellCheckComponent.java:660)
> > at
> >
> org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:619)
> > at org.apache.solr.core.SolrCore.<init>(SolrCore.java:800)
> > ... 9 more
> > ,code=500}
> >
>
--
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics
<http://www.griddynamics.com>
<mk...@griddynamics.com>
Re: Google didn't help on this one!
Posted by Upayavira <uv...@odoko.co.uk>.
See this:
Caused by: java.lang.ClassCastException: java.lang.Float cannot be cast
to java.lang.String
at
org.apache.solr.spelling.AbstractLuceneSpellChecker.init(AbstractLuceneSpellChecker.java:97)
AbstractLuceneSpellChecker is expecting a string, but getting a float.
Can you paste here the config (in solrconfig.xml) for your spellchecker?
Also, a simple way to get spell checking started is to look at the
/browse example that comes with the techproducts sample configs. It has
spellchecking already working, so starting there can be a way to get
something going easily.
Upayavira
On Wed, Sep 16, 2015, at 12:22 PM, Mark Fenbers wrote:
> On 9/15/2015 6:49 PM, Shawn Heisey wrote:
> >
> > >From the information we have, we cannot tell if this is a problem
> > request or not. Do you have a core/collection named "EventLog" on your
> > Solr server? It will be case sensitive. If you do, does that config
> > have a handler named "spellCheckCompRH" in it (also case sensitive)?
> >
> > The nc output lets us see everything that your client sent to Solr, so I
> > have built a test URL for you based on that info.
> >
> > Try sending the following URL from a browser or a curl command. If I've
> > gotten the host wrong, go ahead and replace it with the correct value.
> > You'll probably be able to see any errors right in the browser or curl
> > output. Hopefully this will help you figure out what's happening. Also
> > look in your Solr server's logfile for error messages.
> >
> > http://dell9-tir:8983/solr/EventLog/spellCheckCompRH?qt=%2FspellCheckCompRH&q=Some+more+text+wit+some+missspelled+wordz.&spellcheck=on&spellcheck.build=true&wt=json&indent=true
> >
> > I notice that you have "spellcheck.build=true" in that URL. You
> > probably don't want to do this on every request, assuming that your
> > spellcheck dictionary even requires building.
> >
> > Thanks,
> > Shawn
> It wasn't really a problem request, but a follow-up to those who took
> the time to help me. However, since this error has returned, it is now
> a problem request! ;-)
>
> I am aware that "spellcheck.build=true" is expensive, but since I
> haven't had my first success yet with spell-checking, I figured it
> wouldn't hurt to have it in there for now.
>
> I ran the URL you gave verbatim (because your assumptions were correct),
> but I got the stacktrace shown below. This is particularly puzzling
> because I can find nowhere in my code or configuration where I am
> specifying a float value where I shouldn't be. My solrconfig.xml and
> schema.xml are posted in another thread having a subject "Moving on to
> spelling" if that helps you help me.
>
> Thanks,
> Mark
>
> HTTP ERROR 500
>
> Problem accessing /solr/EventLog/spellCheckCompRH. Reason:
>
> {msg=SolrCore 'EventLog' is not available due to init failure:
> java.lang.Float cannot be cast to
> java.lang.String,trace=org.apache.solr.common.SolrException: SolrCore
> 'EventLog' is not available due to init failure: java.lang.Float cannot
> be cast to java.lang.String
> at
> org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:978)
> at org.apache.solr.servlet.HttpSolrCall.init(HttpSolrCall.java:250)
> at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:417)
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:210)
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:179)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
> at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
> at org.eclipse.jetty.server.Server.handle(Server.java:499)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
> at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
> at
> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.solr.common.SolrException: java.lang.Float cannot
> be cast to java.lang.String
> at org.apache.solr.core.SolrCore.<init>(SolrCore.java:820)
> at org.apache.solr.core.SolrCore.<init>(SolrCore.java:659)
> at org.apache.solr.core.CoreContainer.create(CoreContainer.java:727)
> at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:447)
> at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:438)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at
> org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$1.run(ExecutorUtil.java:210)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> ... 1 more
> Caused by: java.lang.ClassCastException: java.lang.Float cannot be cast
> to java.lang.String
> at
> org.apache.solr.spelling.AbstractLuceneSpellChecker.init(AbstractLuceneSpellChecker.java:97)
> at
> org.apache.solr.spelling.IndexBasedSpellChecker.init(IndexBasedSpellChecker.java:57)
> at
> org.apache.solr.handler.component.SpellCheckComponent.inform(SpellCheckComponent.java:660)
> at
> org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:619)
> at org.apache.solr.core.SolrCore.<init>(SolrCore.java:800)
> ... 9 more
> ,code=500}
>
Re: Google didn't help on this one!
Posted by Mark Fenbers <ma...@noaa.gov>.
On 9/15/2015 6:49 PM, Shawn Heisey wrote:
>
> >From the information we have, we cannot tell if this is a problem
> request or not. Do you have a core/collection named "EventLog" on your
> Solr server? It will be case sensitive. If you do, does that config
> have a handler named "spellCheckCompRH" in it (also case sensitive)?
>
> The nc output lets us see everything that your client sent to Solr, so I
> have built a test URL for you based on that info.
>
> Try sending the following URL from a browser or a curl command. If I've
> gotten the host wrong, go ahead and replace it with the correct value.
> You'll probably be able to see any errors right in the browser or curl
> output. Hopefully this will help you figure out what's happening. Also
> look in your Solr server's logfile for error messages.
>
> http://dell9-tir:8983/solr/EventLog/spellCheckCompRH?qt=%2FspellCheckCompRH&q=Some+more+text+wit+some+missspelled+wordz.&spellcheck=on&spellcheck.build=true&wt=json&indent=true
>
> I notice that you have "spellcheck.build=true" in that URL. You
> probably don't want to do this on every request, assuming that your
> spellcheck dictionary even requires building.
>
> Thanks,
> Shawn
It wasn't really a problem request, but a follow-up to those who took
the time to help me. However, since this error has returned, it is now
a problem request! ;-)
I am aware that "spellcheck.build=true" is expensive, but since I
haven't had my first success yet with spell-checking, I figured it
wouldn't hurt to have it in there for now.
I ran the URL you gave verbatim (because your assumptions were correct),
but I got the stacktrace shown below. This is particularly puzzling
because I can find nowhere in my code or configuration where I am
specifying a float value where I shouldn't be. My solrconfig.xml and
schema.xml are posted in another thread having a subject "Moving on to
spelling" if that helps you help me.
Thanks,
Mark
HTTP ERROR 500
Problem accessing /solr/EventLog/spellCheckCompRH. Reason:
{msg=SolrCore 'EventLog' is not available due to init failure:
java.lang.Float cannot be cast to
java.lang.String,trace=org.apache.solr.common.SolrException: SolrCore
'EventLog' is not available due to init failure: java.lang.Float cannot
be cast to java.lang.String
at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:978)
at org.apache.solr.servlet.HttpSolrCall.init(HttpSolrCall.java:250)
at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:417)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:210)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:179)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
at
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at
org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.SolrException: java.lang.Float cannot
be cast to java.lang.String
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:820)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:659)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:727)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:447)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:438)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$1.run(ExecutorUtil.java:210)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
... 1 more
Caused by: java.lang.ClassCastException: java.lang.Float cannot be cast
to java.lang.String
at
org.apache.solr.spelling.AbstractLuceneSpellChecker.init(AbstractLuceneSpellChecker.java:97)
at
org.apache.solr.spelling.IndexBasedSpellChecker.init(IndexBasedSpellChecker.java:57)
at
org.apache.solr.handler.component.SpellCheckComponent.inform(SpellCheckComponent.java:660)
at
org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:619)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:800)
... 9 more
,code=500}
Re: Google didn't help on this one!
Posted by Shawn Heisey <ap...@elyograg.org>.
On 9/15/2015 11:43 AM, Mark Fenbers wrote:
> So I ran "nc -l 8983" then restarted solr, and then ran my app with my
> query. nc reported the following:
>
> GET
> /solr/EventLog/spellCheckCompRH?qt=%2FspellCheckCompRH&q=Some+more+text+wit+some+missspelled+wordz.&spellcheck=on&spellcheck.build=true&wt=javabin&version=2
> HTTP/1.1
> User-Agent: Solr[org.apache.solr.client.solrj.impl.HttpSolrClient] 1.0
> Host: dell9-tir:8983
> Connection: Keep-Alive
>
> I'm not sure if this is good, or indicates an error of any kind.
>From the information we have, we cannot tell if this is a problem
request or not. Do you have a core/collection named "EventLog" on your
Solr server? It will be case sensitive. If you do, does that config
have a handler named "spellCheckCompRH" in it (also case sensitive)?
The nc output lets us see everything that your client sent to Solr, so I
have built a test URL for you based on that info.
Try sending the following URL from a browser or a curl command. If I've
gotten the host wrong, go ahead and replace it with the correct value.
You'll probably be able to see any errors right in the browser or curl
output. Hopefully this will help you figure out what's happening. Also
look in your Solr server's logfile for error messages.
http://dell9-tir:8983/solr/EventLog/spellCheckCompRH?qt=%2FspellCheckCompRH&q=Some+more+text+wit+some+missspelled+wordz.&spellcheck=on&spellcheck.build=true&wt=json&indent=true
I notice that you have "spellcheck.build=true" in that URL. You
probably don't want to do this on every request, assuming that your
spellcheck dictionary even requires building.
Thanks,
Shawn
Re: Google didn't help on this one!
Posted by Mark Fenbers <ma...@noaa.gov>.
So I ran "nc -l 8983" then restarted solr, and then ran my app with my
query. nc reported the following:
GET
/solr/EventLog/spellCheckCompRH?qt=%2FspellCheckCompRH&q=Some+more+text+wit+some+missspelled+wordz.&spellcheck=on&spellcheck.build=true&wt=javabin&version=2
HTTP/1.1
User-Agent: Solr[org.apache.solr.client.solrj.impl.HttpSolrClient] 1.0
Host: dell9-tir:8983
Connection: Keep-Alive
I'm not sure if this is good, or indicates an error of any kind.
Anyway, when I ran my app again, I got a completely different error,
although I didn't change anything! So, I guess I get to move on from
this and see what other hurdles I run into!
Thanks for the help!
Mark
On 9/15/2015 11:13 AM, Yonik Seeley wrote:
> On Tue, Sep 15, 2015 at 11:08 AM, Mark Fenbers <ma...@noaa.gov> wrote:
>> I'm working with the spellcheck component of Solr for the first time. I'm
>> using SolrJ, and when I submit my query, I get a Solr Exception: "Expected
>> mime type octet/stream but got text/html."
>>
>> What in the world is this telling me??
> You're probably hitting an endpoint on Solr that doesn't exist and
> getting an HTML 404 error page rather than the response (which would
> be in binary by default).
>
> An easy way to see what SolrJ is sending is to kill your solr server, then do
>
> nc -l 8983
>
> And then run your SolrJ program to see what it sends... if it look OK,
> then try sending the request from curl to Solr.
>
> -Yonik
>
Re: Google didn't help on this one!
Posted by Yonik Seeley <ys...@gmail.com>.
On Tue, Sep 15, 2015 at 11:08 AM, Mark Fenbers <ma...@noaa.gov> wrote:
> I'm working with the spellcheck component of Solr for the first time. I'm
> using SolrJ, and when I submit my query, I get a Solr Exception: "Expected
> mime type octet/stream but got text/html."
>
> What in the world is this telling me??
You're probably hitting an endpoint on Solr that doesn't exist and
getting an HTML 404 error page rather than the response (which would
be in binary by default).
An easy way to see what SolrJ is sending is to kill your solr server, then do
nc -l 8983
And then run your SolrJ program to see what it sends... if it look OK,
then try sending the request from curl to Solr.
-Yonik