mirror of
https://github.com/nasa/openmct.git
synced 2025-04-09 04:14:32 +00:00
[Search] Index domain object type and provide query lite (index only) option (#3416)
* WIP * Reverting some files * reverting * using type from model, instead of passing in separately * reverting to remove query lite from search aggregator, as it is no longer necessary * removing erroneous properties from legacy search results * removed unnecessary parameters for type since it is included in the model and we have acces too that * missed one * removed empty space * removed unneccessary code Co-authored-by: Deep Tailor <deep.j.tailor@nasa.gov>
This commit is contained in:
parent
668bd75025
commit
f202ae19cb
@ -32,7 +32,8 @@
|
||||
function indexItem(id, model) {
|
||||
indexedItems.push({
|
||||
id: id,
|
||||
name: model.name.toLowerCase()
|
||||
name: model.name.toLowerCase(),
|
||||
type: model.type
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -125,13 +125,12 @@ define([
|
||||
* @param topic the topicService.
|
||||
*/
|
||||
GenericSearchProvider.prototype.indexOnMutation = function (topic) {
|
||||
var mutationTopic = topic('mutation'),
|
||||
provider = this;
|
||||
let mutationTopic = topic('mutation');
|
||||
|
||||
mutationTopic.listen(function (mutatedObject) {
|
||||
var editor = mutatedObject.getCapability('editor');
|
||||
mutationTopic.listen(mutatedObject => {
|
||||
let editor = mutatedObject.getCapability('editor');
|
||||
if (!editor || !editor.inEditContext()) {
|
||||
provider.index(
|
||||
this.index(
|
||||
mutatedObject.getId(),
|
||||
mutatedObject.getModel()
|
||||
);
|
||||
@ -262,6 +261,7 @@ define([
|
||||
return {
|
||||
id: hit.item.id,
|
||||
model: hit.item.model,
|
||||
type: hit.item.type,
|
||||
score: hit.matchCount
|
||||
};
|
||||
});
|
||||
|
@ -41,7 +41,8 @@
|
||||
indexedItems.push({
|
||||
id: id,
|
||||
vector: vector,
|
||||
model: model
|
||||
model: model,
|
||||
type: model.type
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user