Closed (fixed)
Project:
Search API
Version:
7.x-1.x-dev
Component:
Views integration
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Feb 2013 at 20:20 UTC
Updated:
12 Sep 2013 at 17:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
gmclelland commentedWith 7.x-1.5 release you can add a contextual filter to the view - nid. WHEN THE FILTER VALUE IS NOT AVAILABLE - Provide a default value - Content Id from url. Then choose "More" at the bottom and choose "exclude."
I use that when I want to exclude the current node from being displayed in related views on the page. I'm not sure if that is your use case.
Hope that helps
Comment #2
drunken monkeyI don't know how that could happen. You checked "Indexed" for the "Node ID" field and then, when editing a view for that index, you don't get an "Indexed Node: Node ID" filter (and contextual filter)? Have you tried clearing the cache after changing the field settings?
Please explain your steps and what happened.
For excluding certain nodes, you can of course just use "is not" filters on the node ID – or follow gmclelland's advice, if you need these nodes to be dynamic.
Comment #3
Jason Dean commentedI had exactly the same requirement. After adding Node ID field for indexing and rebuilding the index, Views didn't offer it as a filter.
Thanks to #2, I remembered to clear cache and there it was :) Thanks!
Comment #4
drunken monkeyActually, you shouldn't have to manually clear the cache, it seems that's an oversight in the code.
With the attached patch, this should now work properly and manually clearing the cache should no longer be necessary.
Please test!
Comment #5
drunken monkeyCommitted.