[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:
Jamie V 2021-01-08 14:16:01 -08:00 committed by GitHub
parent 668bd75025
commit f202ae19cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 7 deletions

View File

@ -32,7 +32,8 @@
function indexItem(id, model) {
indexedItems.push({
id: id,
name: model.name.toLowerCase()
name: model.name.toLowerCase(),
type: model.type
});
}

View File

@ -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
};
});

View File

@ -41,7 +41,8 @@
indexedItems.push({
id: id,
vector: vector,
model: model
model: model,
type: model.type
});
}