I'm having troubles with the Relevanssi configuration and indexing custom post types. I checked the source code and did some debugging but i can't find the problem.
However, i think the configuration panel for custom post types is unnecessarily complicated. There are three fields to determine which post types should be indexed:
- What to include in the index:
- Custom post types to index:
- Index and search your posts' attachments
I think you can simplify it with an simple check list with all post types (http://codex.wordpress.org/Function_Reference/get_post_types). I did something similar in the Pronamic Google Maps plugin: http://s.wordpress.org/extend/plugins/pronamic-google-maps/screenshot-3.png?r=419182
You could also improve the relevanssi_build_index() function. There are a lot of cases and if / else statements to create an complex query.
AND ( post.post_type = 'post' OR post.post_type = 'page' OR post.post_type = 'attachment' OR post.post_type = 'project' OR post.post_type = 'event' OR post.post_type = 'file_page')
Why don't you determine the post type that should be indexed with PHP and create an short and easy to read query like this:
AND post.post_type IN ('post', 'page', 'project', 'event')
That would save you a lot of if / else constructions and exploding and imploding comma separated strings.
I tried everything to index the custom post types, but it's not working. I disabled the index of attachments but those are indexed.