




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A practice exam for nuix developer scripting, featuring multiple-choice questions and detailed explanations for each answer. It covers essential topics such as the utilities object, scripting languages, api calls, nql queries, and best practices for handling large datasets. This resource is designed to help developers test their knowledge and prepare for nuix scripting tasks, offering insights into key concepts and techniques for efficient and effective scripting within the nuix platform. It includes questions on topics such as custom properties, ingestion jobs, and multi-threading.
Typology: Exams
1 / 113
This page cannot be seen from the preview
Don't miss anything!





























































































Question 1. What is the primary purpose of the Utilities object in the Nuix API? A) To manage case metadata B) To provide helper methods such as progress bars and file I/O C) To execute NQL queries D) To create custom tags Answer: B Explanation: The Utilities object supplies common helper functions like creating progress indicators, handling files, and other utility operations needed across scripts.
Question 2. Which scripting language is natively supported for Nuix automation and runs on the JVM? A) Python B) Ruby C) Groovy D) JavaScript Answer: C Explanation: Groovy is the default scripting language for Nuix, offering seamless access to the underlying Java API while providing concise syntax.
Question 3. In the Nuix Scripting Console, which method is used to log informational messages?
A) log.debug() B) log.error() C) log.warn() D) log.info() Answer: D Explanation: log.info() records standard informational messages that appear in the console and log files.
Question 4. Which API call retrieves the currently opened case? A) Utilities.getCase() B) case.getCurrent() C) Nuix.getCase() D) case.open() Answer: A Explanation: Utilities.getCase() returns the active Case object, allowing scripts to interact with case data.
Question 5. When executing a script from the command line, which flag specifies the script file? A) – script B) – run
Answer: B Explanation: Family relationships connect a parent item with its child items such as attachments, embedded files, and email parts.
Question 8. Which NQL clause would you use to find items that have the tag “Sensitive”? A) tag:"Sensitive" B) hasTag:Sensitive C) tags=SENSITIVE D) tag=SENSITIVE Answer: A Explanation: The tag:"Sensitive" clause searches for items tagged with the exact tag name Sensitive.
Question 9. When iterating over a large result set, which technique reduces memory consumption? A) Loading all items into a List first B) Using case.searchUnsorted with batch processing C) Converting items to JSON strings immediately D) Storing items in a HashMap Answer: B
Explanation: case.searchUnsorted combined with batch processing streams items without retaining the entire set in memory.
Question 10. Which method retrieves the binary content of an Item as a java.io.InputStream? A) item.getBinary() B) item.getContentStream() C) item.getBinaryStream() D) item.getFile() Answer: C Explanation: getBinaryStream() returns an InputStream of the raw binary data, allowing efficient reading without loading the whole file into memory.
Question 11. How can you add a custom property named “ReviewStage” with value “Initial” to an Item? A) item.addCustomProperty("ReviewStage","Initial") B) item.setCustomProperty("ReviewStage","Initial") C) item.putCustomProperty("ReviewStage","Initial") D) item.setProperty("ReviewStage","Initial") Answer: B
Question 14. Which method would you use to change an item’s review status to “Reviewed”? A) item.setReviewStatus("Reviewed") B) item.updateStatus("Reviewed") C) item.setStatus(ReviewStatus.REVIEWED) D) item.markReviewed() Answer: C Explanation: setStatus expects an enum value such as ReviewStatus.REVIEWED to modify the review state.
Question 15. When generating a CSV report, which Groovy class simplifies writing rows to a file? A) CSVWriter B) BufferedWriter C) PrintWriter D) FileWriter Answer: A Explanation: CSVWriter (from the Apache Commons CSV library) provides convenient methods for writing CSV rows with proper escaping.
Question 16. Which statement correctly executes an external command “hashcalc.exe” with an argument filePath? A) Runtime.exec("hashcalc.exe " + filePath) B) Runtime.getRuntime().exec(["hashcalc.exe", filePath] as String[]) C) ProcessBuilder.start(["hashcalc.exe", filePath]) D) new Process("hashcalc.exe", filePath).run() Answer: B Explanation: Using Runtime.getRuntime().exec with a String array avoids issues with spaces and quoting in arguments.
Question 17. To call a REST endpoint from a Nuix script, which library is commonly used? A) java.net.HttpURLConnection B) org.apache.httpclient.HttpClient C) groovyx.net.http.RESTClient D) com.nuix.rest.APIClient Answer: C Explanation: groovyx.net.http.RESTClient offers a Groovy‑friendly way to make HTTP calls and parse JSON responses.
B) log.info() C) log.warn() D) log.error() Answer: C Explanation: log.warn() is appropriate for recoverable or non‑critical issues that merit attention.
Question 21. How can you retrieve the list of email participants (From, To, CC) from an Item representing an email? A) item.getEmailAddresses() B) item.getMetadata("participants") C) item.getEmailHeaders().get("From") etc. D) item.getEmailInfo().getParticipants() Answer: D Explanation: getEmailInfo() returns an EmailInfo object that provides access to participants, subject, and other header fields.
Question 22. Which method returns the total number of items in the current case? A) case.itemCount() B) case.getItemCount() C) case.totalItems() D) case.countItems()
Answer: B Explanation: getItemCount() is the official API call to obtain the total item count.
Question 23. When writing a multi‑threaded script, which Nuix API class ensures thread‑safe progress updates? A) ProgressBar B) ThreadSafeProgress C) Utilities.getProgress() D) SynchronizedProgress Answer: A Explanation: ProgressBar methods are designed to be thread‑safe, allowing concurrent updates from multiple threads.
Question 24. What is the recommended way to store script configuration parameters such as file paths? A) Hard‑code them in the script B) Store them in a JSON or properties file and read at runtime C) Use global variables in the console D) Embed them in comments Answer: B
Question 27. What is the purpose of the method case.getTagSystem() in a script? A) To retrieve a list of all tags applied to items B) To access the hierarchical tag structure for creating or modifying tags C) To export tags to a CSV file D) To delete unused tags Answer: B Explanation: getTagSystem() returns the TagSystem object, which manages the tag hierarchy and definitions.
Question 28. When parsing a CSV file, which Groovy feature automatically converts each line into a list of values? A) CSVReader class B) split(',') method on the line string C) eachLine { line - > line.split(',') } D) Groovy’s built‑in CSV parser (new CsvParser()) Answer: C Explanation: Using eachLine with split(',') is a concise Groovy idiom for turning a line into a list of fields.
Question 29. Which exception should you catch when an NQL query fails due to syntax errors? A) IOException B) IllegalArgumentException C) NuixException D) QueryParseException Answer: D Explanation: QueryParseException is thrown when the NQL parser encounters invalid syntax.
Question 30. In a script, how can you retrieve the size (in bytes) of an item’s binary content without loading the entire file? A) item.getBinarySize() B) item.getMetadata("size") C) item.getFileSize() D) item.getBinaryStream().available() Answer: A Explanation: getBinarySize() returns the exact byte size of the underlying file without streaming the content.
Question 31. Which method is used to add a new custodian to the case programmatically? A) case.addCustodian("John Doe")
Answer: B Explanation: setMetadataField updates a specific metadata field safely, especially when performed inside a write transaction.
Question 34. When creating a progress bar for a loop of 10,000 items, which constructor call is appropriate? A) Utilities.progressBar("Processing", 10000) B) Utilities.createProgressBar("Processing", 10000) C) Utilities.getProgressBar("Processing", 10000) D) Utilities.progress("Processing", 10000) Answer: B Explanation: createProgressBar(title, total) returns a ProgressBar instance ready for updates.
Question 35. Which NQL operator is used to exclude items that contain a specific phrase? A) NOT "phrase" B) - "phrase" C)! "phrase" D) EXCLUDE "phrase" Answer: B Explanation: Prefixing a phrase with a minus sign (-) excludes items containing that phrase.
Question 36. What is the effect of calling case.reindex() in a script? A) It deletes the current index and creates a new empty one B) It rebuilds the index to reflect any metadata changes made programmatically C) It only updates tag information in the index D) It exports the index to a CSV file Answer: B Explanation: reindex() refreshes the index so that recent changes to items are searchable.
Question 37. Which method retrieves the list of child items (attachments) for a given parent Item? A) item.getChildren() B) item.getAttachments() C) item.getFamilyMembers() D) item.getEmbeddedItems() Answer: A Explanation: getChildren() returns all direct child items linked to the parent.
A) Skip the item and log a warning using log.warn() B) Throw a RuntimeException to stop the script C) Attempt to read it repeatedly until success D) Delete the item from the case Answer: A Explanation: Skipping the problematic item while logging a warning keeps the script running and records the issue.
Question 41. Which API call provides access to the case’s global settings such as default language? A) case.getSettings() B. case.getGlobalSettings() C) Utilities.getGlobalSettings() D) case.globalSettings Answer: A Explanation: getSettings() returns a Settings object containing global case configuration.
Question 42. How can you programmatically suppress all items that match the NQL query “type:pdf AND size:<10KB”? A) case.search("type:pdf AND size:<10KB").each { it.setSuppressed(true) } B) case.suppressQuery("type:pdf AND size:<10KB")
C) case.bulkSuppress("type:pdf AND size:<10KB") D) case.runSuppression("type:pdf AND size:<10KB") Answer: A Explanation: Searching for the items and iterating to setSuppressed(true) is the direct way to apply suppression.
Question 43. Which method creates a new tag hierarchy under an existing parent tag? A) tagSystem.createTag(parentTag, childTag) B) tagSystem.addTag(parentTag + "/" + childTag) C) tagSystem.createTag("parent/child") D) tagSystem.defineNestedTag(parentTag, childTag) Answer: C Explanation: Using a slash‑delimited name creates a nested tag under the specified parent.
Question 44. What is the purpose of the method case.checkIntegrity()? A) To verify that the case file structure is intact and the index is not corrupted B) To validate all custom properties on items C) To ensure all tags are properly linked D) To run a full re‑ingest of the case data