I tried to reproduce in on the recent release. Here is what I've got after
adding distrib=false
<lst name="error"> <str name="msg">requires a TFIDFSimilarity (such as
ClassicSimilarity)</str> <str
name="trace">java.lang.UnsupportedOperationException:
requires a TFIDFSimilarity (such as ClassicSimilarity) at
org.apache.lucene.queries.function.valuesource.NormValueSource.getValues(NormValueSource.java:62)
at
org.apache.solr.response.transform.ValueSourceAugmenter.transform(ValueSourceAugmenter.java:92)
at org.apache.solr.response.DocsStreamer.next(DocsStreamer.java:170) at
org.apache.solr.response.DocsStreamer.next(DocsStreamer.java:59)

Don't you have something like that in logs?

On Thu, Jun 8, 2017 at 10:42 PM, tstusr <ulfrhe...@gmail.com> wrote:

> I wanted to ask the properly way to query or get the length of a field in
> solr.
>
> I'm trying to ask and append fieldNorm in a result field by querying
> localhost:8983/solr/uda/tvrh?q=usage:stuff&fl={!func}norm(
> usage)&debugQuery=on&debugQuery=on
>
> Nevertheless, the response to this query is:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <response>
>     <lst name="responseHeader">
>         <bool name="zkConnected">true</bool>
>         <int name="status">500</int>
>         <int name="QTime">22</int>
>     </lst>
>     <lst name="error">
>         <lst name="metadata">
>             <str
> name="error-class">org.apache.solr.client.solrj.impl.HttpSolrClient$
> RemoteSolrException</str>
>             <str name="root-error-class">java.
> lang.ClassCastException</str>
>         </lst>
>         <str name="msg">Error from server at
> http://172.16.13.121:7574/solr/uda_shard2_replica1:
> org.apache.solr.common.util.SimpleOrderedMap cannot be cast to
> java.lang.String</str>
>         <str
> name="trace">org.apache.solr.client.solrj.impl.HttpSolrClient$
> RemoteSolrException:
> Error from server at http://172.16.13.121:7574/solr/uda_shard2_replica1:
> org.apache.solr.common.util.SimpleOrderedMap cannot be cast to
> java.lang.String
>         at
> org.apache.solr.client.solrj.impl.HttpSolrClient.
> executeMethod(HttpSolrClient.java:587)
>         at
> org.apache.solr.client.solrj.impl.HttpSolrClient.request(
> HttpSolrClient.java:279)
>         at
> org.apache.solr.client.solrj.impl.HttpSolrClient.request(
> HttpSolrClient.java:268)
>         at org.apache.solr.client.solrj.SolrClient.request(SolrClient.
> java:1219)
>         at
> org.apache.solr.handler.component.HttpShardHandler.lambda$submit$0(
> HttpShardHandler.java:163)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at java.util.concurrent.Executors$RunnableAdapter.
> call(Executors.java:511)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at
> com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(
> InstrumentedExecutorService.java:176)
>         at
> org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.
> lambda$execute$0(ExecutorUtil.java:229)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1142)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.ClassCastException:
> org.apache.solr.common.util.SimpleOrderedMap cannot be cast to
> java.lang.String
>         at
> org.apache.solr.common.util.JavaBinCodec.readOrderedMap(
> JavaBinCodec.java:194)
>         at
> org.apache.solr.common.util.JavaBinCodec.readObject(JavaBinCodec.java:269)
>         at org.apache.solr.common.util.JavaBinCodec.readVal(
> JavaBinCodec.java:251)
>         at
> org.apache.solr.common.util.JavaBinCodec.unmarshal(JavaBinCodec.java:173)
>         at
> org.apache.solr.client.solrj.impl.BinaryResponseParser.processResponse(
> BinaryResponseParser.java:50)
>         at
> org.apache.solr.client.solrj.impl.HttpSolrClient.
> executeMethod(HttpSolrClient.java:585)
>         ... 12 more
> </str>
>         <int name="code">500</int>
>     </lst>
> </response>
>
>
> What we want is to append it to a field since we are using this field on
> spark (using solr-spark) and then make some processing.
>
> Another way we came with, is to compute fieldLength in a processor and
> write
> it on a field, but, since norm is list on query functions we are trying to
> obtain it this way.
>
> We really appreciate your help and thanks in advice.
>
>
>
> --
> View this message in context: http://lucene.472066.n3.
> nabble.com/Query-fieldNorm-through-http-tp4339693.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Sincerely yours
Mikhail Khludnev

Reply via email to