-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Onboard hybrid search use case; add readonly search flows for all use…
… cases (#143) (#144) Signed-off-by: Tyler Ohlsen <[email protected]> (cherry picked from commit 73cbed4) Co-authored-by: Tyler Ohlsen <[email protected]>
- Loading branch information
1 parent
c3e4586
commit 8a6fe08
Showing
30 changed files
with
971 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,5 @@ | |
*/ | ||
|
||
export * from './document'; | ||
export * from './results'; | ||
export * from './query'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
export * from './match_query'; | ||
export * from './neural_query'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { COMPONENT_CLASS } from '../../../utils'; | ||
import { Query } from './query'; | ||
|
||
/** | ||
* A basic match query placeholder UI component. | ||
* Does not have any functionality. | ||
*/ | ||
export class MatchQuery extends Query { | ||
constructor() { | ||
super(); | ||
this.type = COMPONENT_CLASS.MATCH_QUERY; | ||
this.label = 'Match Query'; | ||
this.description = 'An OpenSearch match query'; | ||
this.inputs = []; | ||
this.baseClasses = [...this.baseClasses, this.type]; | ||
this.outputs = [ | ||
{ | ||
label: this.label, | ||
baseClasses: this.baseClasses, | ||
}, | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { COMPONENT_CLASS } from '../../../utils'; | ||
import { Query } from './query'; | ||
|
||
/** | ||
* A basic neural query placeholder UI component. | ||
* Does not have any functionality. | ||
*/ | ||
export class NeuralQuery extends Query { | ||
constructor() { | ||
super(); | ||
this.type = COMPONENT_CLASS.NEURAL_QUERY; | ||
this.label = 'Neural query'; | ||
this.description = 'An OpenSearch neural query'; | ||
this.inputs = []; | ||
this.baseClasses = [...this.baseClasses, this.type]; | ||
this.outputs = [ | ||
{ | ||
label: this.label, | ||
baseClasses: this.baseClasses, | ||
}, | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { COMPONENT_CATEGORY, COMPONENT_CLASS } from '../../../utils'; | ||
import { BaseComponent } from '../../base_component'; | ||
|
||
/** | ||
* A basic Query placeholder UI component. | ||
* Does not have any functionality. | ||
*/ | ||
export abstract class Query extends BaseComponent { | ||
constructor() { | ||
super(); | ||
this.type = COMPONENT_CLASS.QUERY; | ||
this.label = 'Query'; | ||
this.description = 'An OpenSearch query'; | ||
this.categories = [COMPONENT_CATEGORY.SEARCH]; | ||
this.allowsCreation = false; | ||
this.baseClasses = [this.type]; | ||
this.inputs = []; | ||
this.outputs = []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { COMPONENT_CATEGORY, COMPONENT_CLASS } from '../../utils'; | ||
import { BaseComponent } from '../base_component'; | ||
|
||
/** | ||
* A basic Results placeholder UI component. | ||
* Does not have any functionality. | ||
*/ | ||
export class Results extends BaseComponent { | ||
constructor() { | ||
super(); | ||
this.type = COMPONENT_CLASS.RESULTS; | ||
this.label = 'Results'; | ||
this.description = 'OpenSearch results'; | ||
this.categories = [COMPONENT_CATEGORY.SEARCH]; | ||
this.allowsCreation = false; | ||
this.baseClasses = [this.type]; | ||
this.inputs = []; | ||
this.outputs = [ | ||
{ | ||
label: this.label, | ||
baseClasses: this.baseClasses, | ||
}, | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
public/component_types/transformer/normalization_transformer.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { COMPONENT_CATEGORY, COMPONENT_CLASS } from '../../utils'; | ||
import { ResultsTransformer } from './results_transformer'; | ||
|
||
/** | ||
* A normalization results transformer UI component | ||
*/ | ||
export class NormalizationTransformer extends ResultsTransformer { | ||
constructor() { | ||
super(); | ||
(this.type = COMPONENT_CLASS.NORMALIZATION_TRANSFORMER), | ||
(this.label = 'Normalization Transformer'); | ||
this.description = 'A transformer to normalize search results'; | ||
this.baseClasses = [...this.baseClasses, this.type]; | ||
this.categories = [COMPONENT_CATEGORY.SEARCH]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { COMPONENT_CLASS } from '../../utils'; | ||
import { BaseTransformer } from './base_transformer'; | ||
|
||
/** | ||
* A generic results transformer UI component | ||
*/ | ||
export class ResultsTransformer extends BaseTransformer { | ||
constructor() { | ||
super(); | ||
(this.type = COMPONENT_CLASS.RESULTS_TRANSFORMER), | ||
(this.label = 'Results Transformer'); | ||
this.description = 'A general results transformer'; | ||
this.baseClasses = [...this.baseClasses, this.type]; | ||
this.inputs = [ | ||
{ | ||
id: 'results', | ||
label: 'Results', | ||
baseClass: COMPONENT_CLASS.RESULTS, | ||
acceptMultiple: false, | ||
}, | ||
]; | ||
this.outputs = [ | ||
{ | ||
label: 'Transformed Results', | ||
baseClasses: [COMPONENT_CLASS.RESULTS], | ||
}, | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.