I want to be able to dynamically change scores without having to
update the entire document.
For this, I started using the External File Field.

I set a fieldType called idRankFile and field called idRank in schema.xml :

<fieldType name="idRankFile" keyField="id" defVal="0" stored="false"
indexed="false" class="solr.ExternalFileField" valType="pfloat" />
<field name="idRank" type="idRankFile" />

Now I set the idRank for various id's in a file called
external_idRank.txt in dataDir :

F8V7067-APL-KIT = 1.0
IW-02 = 10.0
9885A004 = 100.0

Originally, the scores for these 3 id's (for my query) was in reverse order.
Now, I query using the following :

http://localhost:8983/solr/select?indent=on&q=car%20power%20adaptor&fl=id,name&_val_:idRank

However, the order for the results remains the same. It seems it
hasn't taken the external field into account

Any ideas how to do this? Is my query correct?

Reply via email to