I read in the CF10 docs that the attribute 'FieldBoost' has been added to CFIndex in order to specify which fields should have more importance in Solr's scoring.
However, it seems that not only does it not work as intended, it in fact causes the whole indexing operation to fail completely! I've seen other posts on the Adobe forums mentioning exactly the same issue, but no replies or resolution available.
I'm running CF10 Update 11.
The following code works and indexes 14,000 records:
<cfindex collection = "MyCollection"
action = "refresh"
type = "custom"
query = "Local.MyContent"
key = "ID"
title = "Name"
body = "Name,Description"
>
However, if I add the FieldBoost value, there are no errors and the index operation appears to run correctly, however the collection now contains zero records:
<cfindex collection = "MyCollection"
action = "refresh"
type = "custom"
query = "Local.MyContent"
key = "itemID"
title = "Name"
body = "Name,Description"
fieldBoost = "title"
>
Has anyone had this working?
From the comments...
I found this bug which I believe is similar to your situation (although it was reported on a Mac platform).
Although it is not documented very well you need to include the weight with the
fieldboost
attribute. For ColdFusion's implementation you specify the weight by appending it to the field you want boosted delimited with a:
(colon). The attribute should look something like this:I was able to find a little bit of documentation on this attribute in the Adobe ColdFusion 10 Beta documentation (on page 106 of that document specifically). Here is an excerpt from that document:
And the following code is the example they used to show the
fieldboost
attribute (notice that they are boosting two fields, separated by a comma):Also check this related question for a way to boost fields during the search - CF10 Fieldboost on cfindex has no effect