I found this in an older version of nop, but it looks like the stored procedure hasn't changed regarding specification attribute option filtering.
When filtering products with ProductService.SearchProducts, the output list of "FilterableSpecificationAttributeOptionIds" contains all options when filtering by specification option, even when selection would yield 0 results.
Repro: Use product service SearchProducts and include as an argument "filteredSpecs" that should eliminate certain options as selectable.
Expected result: A limited list of FilterableSpecificationAttributeOptionIds based on your specification filter.
Actual result: FilterableSpecificationAttributeOptionIds never changes regardless of which filteredSpecs are included in the product lookup.
I see correct FilterableSpecificationAttributeOptionIds when I change any other arguments for SearchProducts.
The fix:
In the standard "ProductLoadAllPaged" stored procedure, it "loads" the filterable specifications prior to filtering by them, thus the result we're seeing. I just flipped those two blocks (filter by spec and then load available filterable specs) and now we see correct output results for FilterableSpecificationAttributeOptionIds !