I am using drupal 7 with apachesolr module.
I have an external file field to boost the results i want. The name of the file is external_eff_ranking. In the schema, I have:
<fieldType name="pfloat" class="solr.FloatField" omitNorms="true"/>
<fieldType name="file" keyField="id" defVal="1" stored="false" indexed="false" class="solr.ExternalFileField" valType="pfloat"/>
<dynamicField name="eff_*" type="file"/>
The format of the external file is:
id1=3.1
id2=4.2
id3=5
This works as expected, the results are boosted according to the values in the file. The problem is that when the values are changed, the results do not reflect the changes. I understand that I need to commit the changes somehow, but I can not figure out how.
I tried things like:
curl http://localhost:8983/solr/update?commit=true -H "Content-Type: text/xml" --data-binary '<commit />'
but did not work.
SOLVED
The following line in my solrconfig.xml solved the problem:
<requestHandler name="/reloadCache" class="org.apache.solr.search.function.FileFloatSource$ReloadCacheRequestHandler" />
Then I hit this url (http://localhost:port/reloadCache) after each file update
Looks like this is due to a bug in solr that affects cached results. May be trying the reloadCache helps?