The name of the price field property changed between Kickstart RC1 and RC2, from amount_float to amount_decimal.
A Kickstart-provided update function will try to update the search index when update.php is run.
However, if the search index is overridden (because manual changes were made by the user through the UI), then the changes must be applied manually, in which case update.php will point the user to this issue.

Here's how to finish the update process manually

Step 1:
You will need to go to "admin/config/search/search_api" and then either:
a) Revert your search index (which will remove all custom changes done to it)
b) Manually apply the changes by going to "admin/config/search/search_api/index/product_display/fields" and then enabling all "Price » Amount (decimal)" fields. Then repeating the same process on the facets page ("admin/config/search/search_api/index/product_display/facets").

Step 2:
Go to "admin/config/search/search_api/index/product_display/status" and first click "Clear index" and then (after the page reloads) "Re-index content".
This will rebuild the search index will the new price values.

Step 3:
If you've added the Amount (decimal) facet, go to the blocks page ("admin/structure/block") and enable the matching block.

CommentFileSizeAuthor
#1 schermata1.png3.94 KBalfredof
#1 schermata2.png5.13 KBalfredof
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alfredof’s picture

FileSize
5.13 KB
3.94 KB

i have followed the steps
but
In the block SORT BY of "All Products" page,
i have twice the button price
and
it is not possible disable it

if i click on one button i have the message:
Trying to sort on unknown field field_product_commerce_price_amount_float_asc.
and if i go directly to mysite.com/admin/config/search/search_api/index/product_display/sorts
and
i cannot see "Product Price" (float) enabled

brephraim’s picture

Confirmed #1.

jsacksick’s picture

I just tried to reproduce the bug, I installed the rc1, then replaced the files with the rc2 files.
I ran the update.php, followed the steps and only had 1 price sort.
Can you confirm the content of commerce_kickstart_search_default_search_api_sort ?

brephraim’s picture

How do I do that?

alfredof’s picture

before to update from rc1 to rc2
if you try to change for example
this
yoursite/admin/config/search/search_api/index/product_display/workflow

because you dont want "unpublished nodes"

and update to rc2

you have the issue

jsacksick’s picture

I'm sorry I tried again, And I already tried with adding fields or data alteration in order for my index to be "overriden" so the update can't apply, I followed the steps once with reverting the index and an other time with adding the field manually to the index and then clear + reindex, and I only have one price sort.

davian’s picture

Had the same problem (duplicate price sort).
This is how I fixed it:

1. Go into the database and look for the table 'search_api_sort'.
2. Delete the rows you don't need. (In my case: product_display__field_product:commerce_price:amount_float)

jsacksick’s picture

Demoshane’s picture

Could this relate to this? Trying to sort with price leads to error:

Trying to sort on unknown field field_product_commerce_price_amount_float_asc.

jsacksick’s picture

Yes it's perfectly related to this, If you read the comments above you can fix this issue. Did you run the updates ?

joshmiller’s picture

jsacksick - If you can confirm the issue is fixed with the code in #8 above, then please update the status :D Otherwise, I'll be happy to document this process in the Search API section of the Kickstart 2 documentation.

Josh

jsacksick’s picture

Status: Active » Fixed
brephraim’s picture

Title: How to manually update search index between Kickstart RC1 and RC2 » How to manually update search index between Kickstart RCs
Status: Fixed » Active

On an update from RC2->RC3, I got an error message after running updates.php telling me that the new fields could not be added to the index. The new catalog view is therefore broken, and I get two errors telling me "Trying to sort on unknown field title."

I have tried reverting the index and then reindexing, but this did not fix my problem.

jsacksick’s picture

This issue is no longer accurate on how to manually update search index between kickstart RCS, the index is normaly automatically generated by commerce_search_api (http://www.drupal.org/project/commerce_search_api).
Reverting the index should be enough, your error is happening only with the sorts or the view is not working at all ? Did you revert the index, clear it and index the items again ?

brephraim’s picture

The view is not working at all, in addition to the errors relating to sorts displaying. I did revert the index, clear and reindex.

brephraim’s picture

RC4 fixed whatever error was causing this.

bojanz’s picture

Status: Active » Fixed

Awesome.

brephraim’s picture

Status: Fixed » Active

Spoke too soon, unfortunately.

As it turns out, upon retracing my steps, it was actually reverting the index that broke the view. Immediately after the upgrade things worked (albeit imperfectly, the view wasn't able to deal with my catalog hierarchy; I had needed to customize the previous collection taxonomy view to make it work), and then when I reverted the index and re-indexed, things broke as described above.

The error I got on running update.php was:
[Warning] WD search_api: Undefined data alteration commerce_search_api_product_display_filter specified in index Product display

brephraim’s picture

I think I tracked down the source of the error: aggregated fields. When I disabled it, the view started working and the error messages disappeared.

joshmiller’s picture

Assigned: Unassigned » joshmiller

Documentation Tasks Cleanup. This is on my list and will be documented soon.

lsolesen’s picture

Issue summary: View changes
Status: Active » Fixed

Closing this - as we are now past RC's. Please reopen if this is still a task @joshmiller.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

busel7’s picture

Thanks, its work!