Forum OpenACS Development: Re: Adding full text search to XoWIKI extensions

Collapse
Posted by Dave Bauer on
I don't know if xowiki provides anything special for search. Its simple enough to write your own callback (5.3) or service contract implementation for your new subtype of content_revision.

I wrote some code in edit-this-page ages ago that would generate simple implementations on the fly. You could easily write a implementation that automatically concatenated all the attributes together with the content and indexed that automatically.

It might be useful to have search types inherit, but now you can avoid your type being indexed by not implementing search on the type.

Collapse
Posted by Gustaf Neumann on

XoWiki does not do anything special in this regard. Adding a service contract for the type like the following should be sufficient. One can reuse the datasouce and url implementations from xowiki, if nothing special is needed. xowiki uses the output of the method "render" for indexing, which can be overloaded in the derived types.

    acs_sc::impl::new_from_spec -spec {
      name "::xowiki::Page"
      aliases {
        datasource ::xowiki::datasource
        url ::xowiki::url
      }
      contract_name FtsContentProvider
      owner xowiki
    }

It would be possible to include a flag in the type definition (xowiki class) to state whether the type should be included for indexing. If the flag is set, it could issue the above sc automatically. However, i am not sure whether this is needed.

Items with publish_status "production" are not indexed.