Searching is pretty easy. Take a look at the marcish_parse_words()
function in scriblio.php
http://plugins.trac.wordpress.org/browser/scriblio/trunk/scriblio.php#L2554
That function works very much like the functions that parse the record
and generate an html representation, except that it's just plain text
(and only the parts of the record that you want to make searchable).
It gets called from the marcish_pre_content() function, which is
registered as a filter on the scrib_meditor_pre_content filter hook.
http://plugins.trac.wordpress.org/browser/scriblio/trunk/scriblio.php#L2252
http://plugins.trac.wordpress.org/browser/scriblio/trunk/scriblio.php#L2106
The scrib_meditor_pre_content filter gets called just before the post
is saved to the database, and the result that's returned is saved in
the post_content field of the wp_posts table. That text is then what
gets indexed by Scriblio's keyword search tools as well as other
WordPress search plugins and the built-in WordPress search.
Hopefully that will point you down the right path,
--Casey
The fulltext terms can still be stuffed in the post_content field, but
they'll need to be filtered out when the record is edited and
displayed. We're already filtering the post_content when it's
displayed -- the cid_the_content() does that -- so all we need to do
is add a bit of logic there to help it out.
Let's assume that the post_content field looks like this after the
fulltext terms are added:
> A rambling description of the program, perhaps with html elements.
> etc. etc. etc.
>
> ###FULLTEXT_TERMS###
> a subject heading
> or two
> and other keywords
We can then strip that out of the post_content on display like this:
preg_replace( /'###FULLTEXT_TERMS###.*/s' , '', $the_content )
And by hooking to the format_to_edit filter, we can clean up the
post_content for editing in the CID editor.
At least I think that makes sense,
--Casey