Note that there are some explanatory texts on larger screens.

plurals
  1. POExternal file field not working & throws null pointer exception
    text
    copied!<p>I configured my external file field configuration like follows:</p> <pre><code> &lt; field name="idRank" type="idRankFile" indexed="true" stored="true" omitNorms="true" omitTermFreqAndPositions="true" valType="pfloat" /&gt; &lt; fieldType name="idRankFile" keyField="id" defVal="10" stored="true" indexed="true" class="solr.ExternalFileField" valType="pfloat|float|tfloat" /&gt; </code></pre> <p>Following are the value I kept in the file named :external_idRank.txt.Here keys are the values of size field in the document.</p> <pre><code>2938025 = 100.0 4030380 = 115.0 9751 = 125.0 12738 = 135.0 9752 = 145.0 </code></pre> <p>I used the following query to retrieve the result, sorting it based on the <code>idRank</code> value:</p> <pre><code>/solr/collection1/select/?&amp;q=content:* _ val _:"sum(idRank,1)"&amp;fl=size&amp;rows=100 </code></pre> <p>But, when I used the following query it throws Exception like follows,</p> <blockquote> <p>java.lang.NullPointerException at org.apache.solr.search.function.FileFloatSource.getFloats(FileFloatSource.java:273) at org.apache.solr.search.function.FileFloatSource.access$000(FileFloatSource.java:51) at org.apache.solr.search.function.FileFloatSource$2.createValue(FileFloatSource.java:147) at org.apache.solr.search.function.FileFloatSource$Cache.get(FileFloatSource.java:190) at org.apache.solr.search.function.FileFloatSource.getCachedFloats(FileFloatSource.java:141) at org.apache.solr.search.function.FileFloatSource.getValues(FileFloatSource.java:84) at org.apache.lucene.queries.function.valuesource.MultiFloatFunction.getValues(MultiFloatFunction.java:65) at org.apache.lucene.queries.function.FunctionQuery$AllScorer.(FunctionQuery.java:120) at org.apache.lucene.queries.function.FunctionQuery$FunctionWeight.scorer(FunctionQuery.java:95) at org.apache.lucene.search.BooleanQuery$BooleanWeight.scorer(BooleanQuery.java:323) at</p> </blockquote> <p>What should I make to execute this query without exception?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload