Skip to content

Commit

Permalink
[backend/frontend] Improve identity search to be scored ordered (#4845)
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-julien committed Nov 8, 2023
1 parent d7841a1 commit b455839
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const identitySearchIdentitiesSearchQuery = graphql`
$search: String
$first: Int
) {
identities(types: $types, search: $search, first: $first) {
identities(types: $types, orderBy: _score, orderMode: desc, search: $search, first: $first) {
edges {
node {
id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3425,6 +3425,7 @@ enum IdentitiesOrdering {
created_at
updated_at
x_opencti_workflow_id
_score
}

enum IdentitiesFilter {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4029,6 +4029,7 @@ enum IdentitiesOrdering {
created_at
updated_at
x_opencti_workflow_id
_score
}
enum IdentitiesFilter {
entity_type
Expand Down
1 change: 1 addition & 0 deletions opencti-platform/opencti-graphql/src/generated/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8783,6 +8783,7 @@ export type IdentitiesFiltering = {
};

export enum IdentitiesOrdering {
Score = '_score',
Created = 'created',
CreatedAt = 'created_at',
Modified = 'modified',
Expand Down

0 comments on commit b455839

Please sign in to comment.