mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
feat: add support for search on nlp value description
This commit is contained in:
parent
0b902031fa
commit
7b111868ed
@ -93,7 +93,9 @@ export class NlpValueController extends BaseController<
|
||||
@Get('count')
|
||||
async filterCount(
|
||||
@Query(
|
||||
new SearchFilterPipe<NlpValue>({ allowedFields: ['entity', 'value'] }),
|
||||
new SearchFilterPipe<NlpValue>({
|
||||
allowedFields: ['entity', 'value', 'doc'],
|
||||
}),
|
||||
)
|
||||
filters?: TFilterQuery<NlpValue>,
|
||||
) {
|
||||
@ -142,7 +144,7 @@ export class NlpValueController extends BaseController<
|
||||
@Query(PopulatePipe) populate: string[],
|
||||
@Query(
|
||||
new SearchFilterPipe<NlpValue>({
|
||||
allowedFields: ['entity', 'value'],
|
||||
allowedFields: ['entity', 'value', 'doc'],
|
||||
}),
|
||||
)
|
||||
filters: TFilterQuery<NlpValue>,
|
||||
|
||||
@ -55,7 +55,7 @@ export const NlpValues = ({ entityId }: { entityId: string }) => {
|
||||
const canHaveSynonyms = nlpEntity?.lookups?.[0] === NlpLookups.keywords;
|
||||
const { onSearch, searchPayload } = useSearch<INlpValue>({
|
||||
$eq: [{ entity: entityId }],
|
||||
$iLike: ["value"],
|
||||
$or: ["doc","value"]
|
||||
});
|
||||
const { dataGridProps } = useFind(
|
||||
{ entity: EntityType.NLP_VALUE },
|
||||
|
||||
Loading…
Reference in New Issue
Block a user