Skip to content

Commit

Permalink
Merge pull request #554 from Senzing/issue547.awinters.2
Browse files Browse the repository at this point in the history
#547 bugfix
  • Loading branch information
arawinters authored Jul 25, 2023
2 parents 40247af + 4dd91f4 commit 9c6a79c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/lib/how/cards/sz-how-card-base.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ export class SzHowStepCardBase implements OnInit, OnDestroy {
}
public getDataRowColumn2Score(feature: SzFeatureScore): SzScoredFeature {
let candidateDataOnLeft = this.candidateDataOnLeft;
return candidateDataOnLeft ? feature.candidateFeature : feature.inboundFeature;
return candidateDataOnLeft ? feature.inboundFeature : feature.candidateFeature;
}
public get sourcesCount(): number {
let res = this.getSourceAndRecordCount();
Expand Down
12 changes: 7 additions & 5 deletions src/lib/how/sz-how-nav.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ export interface SzResolutionStepListItem extends SzResolutionStep {
description: {text: string, cssClasses: string[]}[],
recordIds?: string[],
dataSources?: string[],
freeTextTerms?: string[]
freeTextTerms?: string[],
fullTextTerms?: string[],
}
/**
* @internal
Expand Down Expand Up @@ -300,7 +301,7 @@ export class SzHowNavComponent implements OnInit, OnDestroy {
recordIds: this.getStepListItemRecords(_s),
dataSources: this.getStepListItemDataSources(_s)
}, _s);
_t.freeTextTerms = this.getStepListItemFreeTextTerms(_t)
_t.freeTextTerms = this.getStepListItemFreeTextTerms(_t);
return _t;
});
}
Expand Down Expand Up @@ -395,7 +396,7 @@ export class SzHowNavComponent implements OnInit, OnDestroy {
let _hasMatchingRecords = step.recordIds.some((recordId: string) => {
return recordId.toUpperCase().trim().startsWith(_critStr);
});
// for matching individual words like compound ters like "Jenny Smith"
// for matching individual words like compound terms like "Jenny Smith"
// or "Create V2000-4"
// result must match ALL words in search
let _hasMatchingTerms = _critTerms.every(sTermTag => {
Expand All @@ -405,8 +406,9 @@ export class SzHowNavComponent implements OnInit, OnDestroy {
});
// for matching things like multi-word address, full name etc
let _hasMatchingTerm = step.freeTextTerms.some((termTag) => {
return termTag.toUpperCase().startsWith(_critTerm.toUpperCase());
})
return termTag.toUpperCase().indexOf(_critTerm.toUpperCase()) > -1; // changed to match full search term at any position in keyterms
//return termTag.toUpperCase().startsWith(_critTerm.toUpperCase()); // has to match search term from the beginning of keyterm
})
return _hasMatchingRecords || _hasMatchingTerms || _hasMatchingTerm ? true : false;
});
}
Expand Down

0 comments on commit 9c6a79c

Please sign in to comment.