English English Spanish EspañolKorea한국어
Straker»Company»Blog»2007» Programmatically Indexing Digital Assets in the FMS

Programmatically Indexing Digital Assets in the FMS

In ShadoCMS 8.0, you can programmatically index the digital assets in the File Management System (FMS) using the Search API. Search in Shado 8 using Lucene 2.2 search engine.

Here is sample code on how to programmtically index an FMS filestore.

<!--- Setup arguments for indexing --->
<cfset stArgs             = structNew()>
<cfset stArgs.storeName = "Test"><!--- The name of your store --->
<cfset stArgs.log        = true>

<!--- Instantiate the object that indexes --->
<cfset oStore = application.shado_obj_factory.get("shadomx.apps.search.store")>

<!--- Setup UI element where feedback is provided --->
<cfoutput>
    <table id="tableIndexMessage">
        <tr valign="middle">
            <td><span id="indexStatus"><img src="/#request.shadocontextroot#/ui/icons/loading.gif" /></span></td>
            <td><span id="indexMessage">&nbsp;</span></td>
        </tr>
    </table>
</cfoutput>

<!--- Index now --->
<cfset oStore.Index(argumentCollection=stArgs)>


Comments

There are no comments for this page as yet.

Add a comment