The SearchAggregator exposes it's constants to add stability to
tests.
It also has a fudge factor which increaases the number of results
it requests from providers to better support pagination when using
client side filtering.
Rewrite the generic search provider to use prototypes. Increase performance
by utilizing the model service instead of the object service, and use a
simplified method of request queueing.
Search providers return search results as models for domain objects, as the
actual number of max results is enforced by the aggregator, and because the
individual providers store and return the models for their objects already.
This lowers the amount of resources consumed instantiating domain objects, and
also allows the individual search providers to implement function-based
filtering on domain object models, which is beneficial as it allows the search
filtering in the search controller to be done before paginating of results.
The generic search worker now does indexing work during the index operation,
ensuring that queries do not have to do extraneous or repeat calculations.
Change the return format slightly and fixed a bug in the GenericSearchProvider
which caused more objects than intended to be returned from the provider.
Rewrite the search controller, making numerous changes and using prototypical
style.
First, the search controller immediately hides previous results when a new
search is started. Secondly, the search controller ensures that search results
displayed match the currently entered query, preventing race conditions. Finally,
the search controller uses a poor filtering option that means it may not display
all results.
Per discussion from nasa/openmctweb#141, minimize the
interval at which new objects get indexed, instead of
presuming requirements for CPU utilization.
When indexing for generic search, issue new batches of
requests as individual requests finish (instead of waiting
for whole batches to finish) varying size to keep the
number of outstanding requests below some maximum.
nasa/openmctweb#141
This reverts commit 4b8a5ac0b257737ee33effc966816afca6c11b94.
Performance measurements indicates this is harmful for performance,
although this is not well-explained.
Move function used to listen for mutation changes (to trigger
reindexing) up in scope, to avoid retaining references to
domain objects via closure. nasa/openmctweb#141
Also, includes misc. whitespace normalization (provided by
code editor.)
open #95
IN-PROGRESS!;
Mostly buttons and menus classes (s-btn and s-menu);
Removed unused templates and .css files;
Normalized some button containers;
Updated the generic provider test. Removed index
checking from the generic search worker, because
that checking is already done (more efficiently)
in the generic search provider.
Created a search-menu template and corresponding controller.
Moved functions out of SearchController to SearchMenuController.
The two controllers share information through ngModel.
Set up bundle.json so that the search bar could
be a mct-control, but left the control itself
commented out because then CSS styling would not
work due to lack of access to parent elements.
The search menu now opens to having none of the types
checked, but 'ALL' checked. Checking anything besides
'ALL' unchecks 'ALL' and begins filtering search by
type.