Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
query = select assetIndex.assetId, assetIndex.title, assetIndex.url, assetIndex.synopsis, assetIndex.ownerUserId, assetIndex.groupIdView, assetIndex.groupIdEdit, assetIndex.creationDate, assetIndex.revisionDate, assetIndex.className, match (keywords) against (?) as score from assetIndex where isPublic = 1 and ((match (keywords) against (? in boolean mode)) and (lineage like ?) and (className=? or className=? or className=? or className=? or className=? or className=? or className=? or className=? or className=? or className=? or className=? or className=? or className=? or className=? or className=? or className=? or className=? or className=? or className=?)) order by score desc params = +ISIS*, +ISIS*, 000001000002%, WebGUI::Asset, WebGUI::Asset::Event, WebGUI::Asset::File, WebGUI::Asset::File::Image, WebGUI::Asset::Post, WebGUI::Asset::Post::Thread, WebGUI::Asset::RichEdit, WebGUI::Asset::RSSFromParent, WebGUI::Asset::Snippet, WebGUI::Asset::Template, WebGUI::Asset::Wobject::Article, WebGUI::Asset::Wobject::Calendar, WebGUI::Asset::Wobject::Collaboration, WebGUI::Asset::Wobject::DataForm, WebGUI::Asset::Wobject::Folder, WebGUI::Asset::Wobject::MessageBoard, WebGUI::Asset::Wobject::Navigation, WebGUI::Asset::Wobject::SyndicatedContent, WebGUI::Asset::Wobject::Thingy
@scottwalters

This comment has been minimized.

Copy link

commented Jan 9, 2015

select assetIndex.assetId, assetIndex.title, assetIndex.url, assetIndex.synopsis, assetIndex.ownerUserId, assetIndex.groupIdView, assetIndex.groupIdEdit, assetIndex.creationDate, assetIndex.revisionDate, assetIndex.className, match (keywords) against ('WebGUI::Asset::Wobject::Thingy') as score from assetIndex where isPublic = 1 and ((match (keywords) against ('WebGUI::Asset::Wobject::SyndicatedContent' in boolean mode)) and (lineage like 'WebGUI::Asset::Wobject::Navigation') and (className='WebGUI::Asset::Wobject::MessageBoard' or className='WebGUI::Asset::Wobject::Folder' or className='WebGUI::Asset::Wobject::DataForm' or className='WebGUI::Asset::Wobject::Collaboration' or className='WebGUI::Asset::Wobject::Calendar' or className='WebGUI::Asset::Wobject::Article' or className='WebGUI::Asset::Template' or className='WebGUI::Asset::Snippet' or className='WebGUI::Asset::RSSFromParent' or className='WebGUI::Asset::RichEdit' or className='WebGUI::Asset::Post::Thread' or className='WebGUI::Asset::Post' or className='WebGUI::Asset::File::Image' or className='WebGUI::Asset::File' or className='WebGUI::Asset::Event' or className='WebGUI::Asset' or className='000001000002%' or className='+ISIS_' or className='+ISIS_')) order by score

@scottwalters

This comment has been minimized.

Copy link

commented Jan 9, 2015

+++ b/lib/WebGUI/Search.pm
@@ -179,6 +179,7 @@ sub getPaginatorResultSet {
                if $self->{_columns};

        my $query = $self->_getQuery(\@columns);
+my $query2 = $query;  my @params2 = @{ $self->{_params} }; $query2 =~ s{\?}{ "'" . scalar(pop @params2) . "'" }ge;  warn "query: $query2";
        my $paginator = WebGUI::Paginator->new($self->session, $url, $paginate, $formVar, $pageNumber);
        $paginator->setDataByQuery($query, undef, undef, $self->{_params});
        return $paginator;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.