Bug 663843 - RFE: implement search for bundles
Summary: RFE: implement search for bundles
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: Provisioning
Version: 4.0.0.B02
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: John Mazzitelli
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-17 02:38 UTC by John Mazzitelli
Modified: 2015-02-01 23:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description John Mazzitelli 2010-12-17 02:38:44 UTC
see BundlesDataSource:

        // TODO: this doesn't work like I think it should, figure out how to search on the name column 
        // if (request.getCriteria().getValues().get("search") != null) {
        //       criteria.setSearchExpression(request.getCriteria().getValues().get("search").toString());
        // }

(08:57:21 PM) mazz: who knows how to use org.rhq.core.domain.criteria.Criteria.setSearchExpression(String)
(08:57:28 PM) mazz: I set it, but I get a NPE on the server
(08:57:43 PM) mazz: of course, I have no way of telling the Criteria object which field I want the search to be on
(08:57:51 PM) mazz: I have a feeling this doesn't work like I think it does
(08:58:25 PM) mazz: since this is on the generic Criteria object, I assumed I can set a search expression, tell it to search on the "name" column and have it "just work". I'm trying this on BundlesCriteria
(09:18:19 PM) JimMa [~jimma@60.247.97.98] entered the room.
(09:29:23 PM) joseph42: mazz, the search expression is only implemented for resources and groups
(09:29:40 PM) joseph42: anything else throws NPE because there is no underlying classes for it
(09:30:26 PM) ckannan_away is now known as ckannan
(09:30:53 PM) joseph42: but, it's pretty easy to extend search if you want to try it out
(09:32:37 PM) joseph42: see concrete descendants of AbstractSearchAssistant, AbstractSearchTranslator
(09:35:16 PM) joseph42: basically you have to define the search terms for a bundle, tell the translator whether they are simple (name=value) or complex (name[param]=value) and then write the small bit of translation code necessary for that term

Comment 1 Joseph Marques 2010-12-17 04:01:29 UTC
* add a new enum to SearchSubsystem
* implement new classes: AbstractSearchAssistant, AbstractSearchTranslator
* augment lookup classes: SearchAssistantFactory, SearchTranslatorFactory
* add automatic recalculation of estimated saved search result counts: SavedSearchResultCountRecalculationJob

that should be it.

Comment 2 Jay Shaughnessy 2014-07-01 17:23:55 UTC
This could still be useful for installations with a lot of bundles.


Note You need to log in before you can comment on or make changes to this bug.