Skip to content

Commit

Permalink
NAC-305: optimized queries (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
swarnadipa-dev authored Oct 22, 2024
1 parent c678db3 commit d5f5594
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ export const ELASTIC_SEARCH_LABELS = {
DOCUMENT_REINDEX_TITLE: "Reindex a single document",
NXQL_QUERY_REINDEX_TITLE: "Reindex the results of a NXQL query",
REINDEX_BUTTON_LABEL: "Reindex",
DOCUMENT_QUERY: "ecm:path='{query}'",
DOCUMENT_QUERY: "ecm:path='{query}' AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isVersion = 0 AND ecm:isTrashed = 0",
FOLDER_QUERY:
"ecm:uuid='{query}' OR ecm:ancestorId='{query}' AND ecm:isProxy = 0 AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isVersion = 0 AND ecm:isTrashed = 0",
"(ecm:uuid='{query}' OR ecm:ancestorId='{query}') AND ecm:isProxy = 0 AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isVersion = 0 AND ecm:isTrashed = 0",
NXQL_QUERY:
"ecm:uuid='{query}' OR ecm:ancestorId='{query}' AND ecm:isProxy = 0 AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isVersion = 0 AND ecm:isTrashed = 0",
"(ecm:uuid='{query}' OR ecm:ancestorId='{query}') AND ecm:isProxy = 0 AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isVersion = 0 AND ecm:isTrashed = 0",
NXQL_QUERY_DEFAULT_VALUE:
"SELECT * FROM Document WHERE ecm:isProxy = 0 AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isVersion = 0 AND ecm:isTrashed = 0 AND dc:title = 'A document to reindex'",
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ export const PICTURE_RENDITIONS_LABELS = {
DOCUMENT_QUERY:
"ecm:path='{query}' AND ecm:mixinType = 'Picture' AND ecm:isProxy = 0 AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isVersion = 0 AND ecm:isTrashed = 0",
FOLDER_QUERY:
"(ecm:uuid='{query}' OR ecm:ancestorId='{query}') AND ecm:mixinType = 'Picture' AND ecm:isProxy = 0 AND ecm:isVersion = 0",
"(ecm:uuid='{query}' OR ecm:ancestorId='{query}') AND ecm:mixinType = 'Picture' AND ecm:isProxy = 0 AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isVersion = 0 AND ecm:isTrashed = 0",
NXQL_QUERY:
"(ecm:uuid='{query}' OR ecm:ancestorId='{query}') AND ecm:mixinType = 'Picture' AND ecm:isProxy = 0 AND ecm:isVersion = 0",
"(ecm:uuid='{query}' OR ecm:ancestorId='{query}') AND ecm:mixinType = 'Picture' AND ecm:isProxy = 0 AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isVersion = 0 AND ecm:isTrashed = 0",
NXQL_QUERY_DEFAULT_VALUE:
"SELECT * FROM Document WHERE ecm:mixinType = 'Picture' AND picture:views/*/title IS NULL AND ecm:isVersion = 0 AND ecm:isProxy = 0 AND ecm:isTrashed = 0 AND dc:title = 'A picture without renditions'",
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ export const THUMBNAIL_GENERATION_LABELS = {
DOCUMENT_THUMBNAIL_GENERATION_TITLE: "Generate the thumbnail of a single document",
FOLDER_THUMBNAIL_GENERATION_TITLE: "Generate the thumbnail of a document and all of its children",
THUMBNAIL_GENERATION_BUTTON_LABEL: "Generate",
DOCUMENT_QUERY: "ecm:path='{query}'",
FOLDER_QUERY:"ecm:uuid='{query}' OR ecm:ancestorId='{query}' AND ecm:isProxy = 0 AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isVersion = 0 AND ecm:isTrashed = 0",
DOCUMENT_QUERY: "ecm:path='{query}' AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isVersion = 0 AND ecm:isTrashed = 0",
FOLDER_QUERY:"(ecm:uuid='{query}' OR ecm:ancestorId='{query}') AND ecm:isProxy = 0 AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isVersion = 0 AND ecm:isTrashed = 0",
NXQL_THUMBNAIL_GENERATION_TITLE: "Generate the thumbnail of the documents returned by a NXQL query",
NXQL_QUERY_DEFAULT_VALUE: "SELECT * FROM Document WHERE ecm:mixinType = 'Thumbnail' AND thumb:thumbnail/data IS NULL AND ecm:isVersion = 0 AND ecm:isProxy = 0 AND ecm:isTrashed = 0 AND dc:title = 'A document without thumbnail'",
NXQL_QUERY: "(ecm:uuid='{query}' OR ecm:ancestorId='{query}') AND ecm:isProxy = 0 AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isVersion = 0 AND ecm:isTrashed = 0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export const VIDEO_RENDITIONS_LABELS = {
DOCUMENT_QUERY:
"ecm:path='{query}' AND ecm:mixinType = 'Video' AND ecm:isProxy = 0 AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isVersion = 0 AND ecm:isTrashed = 0",
FOLDER_QUERY:
"ecm:uuid='{query}' OR ecm:ancestorId='{query}' AND ecm:mixinType = 'Video' AND ecm:isProxy = 0 AND ecm:isVersion = 0",
"(ecm:uuid='{query}' OR ecm:ancestorId='{query}') AND ecm:mixinType = 'Video' AND ecm:isProxy = 0 AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isVersion = 0 AND ecm:isTrashed = 0",
NXQL_QUERY:
"ecm:uuid='{query}' OR ecm:ancestorId='{query}' AND ecm:mixinType = 'Video' AND ecm:isProxy = 0 AND ecm:isVersion = 0",
"(ecm:uuid='{query}' OR ecm:ancestorId='{query}') AND ecm:mixinType = 'Video' AND ecm:isProxy = 0 AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isVersion = 0 AND ecm:isTrashed = 0",
NXQL_QUERY_DEFAULT_VALUE:
"SELECT * FROM Document WHERE ecm:mixinType = 'Video' AND ecm:isProxy = 0 AND ecm:isVersion = 0 AND ecm:isTrashed = 0 AND vid:transcodedVideos/0/name IS NULL AND dc:title = 'A video without renditions'",
VID_TRANSCODED: "vid:transcodedVideos/0/name",
Expand Down

0 comments on commit d5f5594

Please sign in to comment.