[SPT/CWIS] Datamodel, MySQL query and Custom RSS feed

Edward Almasy ealmasy at scout.wisc.edu
Wed Jul 2 12:12:13 CDT 2008

On Jul 1, 2008, at 4:12 PM, Jhonatan Tirado wrote:
> Thanks for your answer,
> But, How do I do and internal search engine query?
> The URL for Advanced Search is this:
> http://peru.campusvirtualsp.org/repositorio/SPT--Advanced.php

I think what Rich is talking about is the URL that you get when you do  
an Advanced Search.  For example:
The "F4" parameter indicates that I was searching for "bbc" in the Url  
field (which has a field ID of 4).

To use the internal OSMASE search engine to do a search, it would be  
something like this:

$Engine = new SPTSearchEngine();
$SearchParameters = array("Type" => "=Course");
$Scores = $Engine->FieldedSearch($SearchParameters);

$Scores would then contain an array with the IDs of the resources  
found by the search as the indexes, and the relevance score for each  
resource as the values.  The code to turn that into RSS would be  
something like:

$RSS = new RSS();
foreach ($Scores as $Id => $Score)
     $Resource = new Resource($Id);
         $Resource->Get("Date of Record Release"));

(Caveat:  I wrote this all very quickly by hand, so there may be a  
typo or two.  A better example of using the RSS object can be found in  


    Edward Almasy                             ealmasy at scout.wisc.edu
    Co-Director                                 1210 W Dayton Street
    Internet Scout                                  Madison WI 53706
    Computer Sciences Department                608-262-6606 (voice)
    University of Wisconsin - Madison             608-265-9296 (fax)

More information about the SPT-CWIS-Users mailing list