YakFind query language ======================== YakFind finds words by how close they are to each other, not only by whether they appear. Everything runs on your own computer. If a query cannot be understood it is searched for exactly as typed, and the panel says why. The line under the query box always shows in plain English what will be searched. Words and phrases ----------------- contract The whole word, any capitalisation. It does not match inside "contractor". breach of contract Words typed together are a phrase. Quotes are optional. "loss or damage" Use quotes when the phrase contains an operator word (OR, AND, NOT, S, P ...). terminat* Any ending: terminate, termination, terminating. * also works inside a word. terminat! The same thing, written the way some legal databases write it. wom?n Exactly one unknown letter: woman, women. STEM[pay] All grammatical forms: pay, pays, paying. FUZZY[recieve] Tolerates typing and scanning errors. The tolerance grows with the word's length; FUZZY[word,2] sets it (0 to 4). SYN[damage] The word or any of its synonyms. /\d{4}-\d{2}/ A regular expression between slashes. REGEX(...) is the same. Phrases ignore punctuation ("interest is" matches "interest! Is") but never run across a paragraph, heading or table cell. Punctuation and symbols are not part of words: C++ is searched as C, $500 as 500. Close together -------------- a NEAR 5 b Within 5 words of each other, either order. 1 means next to each other. NEAR alone means NEAR 3. Also written: a /5 b a W/5 b a WITHIN 5 WORDS b a ADJ b b directly after a. ADJ 3 allows b up to 3 words after a. Also written: a +3 b a PRE/3 b a S b In the same sentence. S 2 means within 2 sentences. Also written: a /s b a W/S b a WITHIN 2 SENTENCES b a P b In the same paragraph. P 1 includes the paragraph before and after. Also written: a /p b a PARA b a WITHIN 1 PARAGRAPHS b a NOT 3 b a, except where b is within 3 words of it on either side. Abbreviations (Mr., Ltd., e.g., No. 5), initials and decimal numbers do not end a sentence. In a web page each block (paragraph, heading, list item, table cell) is a paragraph. Combining --------- a OR b Either one. Also: a || b a AND b Both, anywhere in the document. Also: a & b a NOT b a, but only if b is nowhere in the document. Also: a BUT NOT b a % b a XOR b One of them, but not both. Also: a ^ b ( ) Group parts of a query. Order of operations ------------------- Operators are applied in this order, first to last. This is the convention used by legal research databases, and it differs from programming languages: OR comes first. 1. OR 2. NEAR, /n 3. ADJ, +n 4. NOT n 5. S, /s 6. P, /p 7. AND 8. XOR 9. NOT, BUT NOT, % So indemnify NEAR 5 loss OR damage means indemnify NEAR 5 (loss OR damage). Use parentheses whenever you want something else; the plain-English line shows how it was read. Rules ----- - Operators are written in capitals and stand alone between two terms. "and" in lower case is an ordinary word, and the panel points this out. - A number after an operator is a distance only when another term follows it: in page NEAR 5 total the 5 is a distance; in page NEAR 5 it is the thing searched for. - S and P in capitals are operators. To search for the letter itself, put it in quotes: "P". Options ------- Aa Match capitalisation exactly. ab Whole words only (on by default). Turn it off to also match inside longer words. Changes from the 2021 version ----------------------------- - Plain words now match whole words. They used to match anywhere, even inside other words, and were treated as regular expressions. Regular expressions now need /slashes/. - AND, wildcards, SYN and the /n /s /p forms are new. - NOT without a number and XOR now look at the whole document. NOT with a number still means "not nearby", and now checks both sides. - ADJ no longer needs a number. - STEM and FUZZY are written with square brackets, as before; round brackets also work. - The lower-case one-letter aliases (n for NEAR, a for ADJ) are gone; they collided with real words. Ask in plain words (browser, Word and Excel) ============================================ Next to "Exact query" the panel has "Ask in plain words". Type a question or a description and press Enter. The page or document is cut into passages of about a paragraph, and the passages that best match are listed: by shared words, by rare words (reference numbers, names) and by meaning ("how should someone be told the contract is ending" finds "written notice of termination"). Each passage says what found it. Click one to go to it: the browser marks the passage on the page, Word selects the paragraph it starts in. In Excel each row of a sheet is a passage and choosing one selects the used part of that row (see Excel below). Outlook has exact queries only. The meaning model is the same one the desktop app uses (all-MiniLM-L6-v2, about 23 MB). It is shipped inside the extension and the add-in and runs in the panel itself; nothing is downloaded when you search and no text leaves the browser or Word. The first question on a long page takes a few seconds while passages are read; up to 600 passages are compared by meaning and the rest by words only. This ranks passages; it does not promise to list every relevant one, so use an exact query when completeness matters. License (browser, Word, Excel and Outlook) ========================================== Searching, asking and stepping through results are free. Saving searches, and searching more than one place at once ("All tabs" in the browser, "All sheets" in Excel), need a license: open Help in the panel, paste the license text you received and choose "Check license". It is checked in the panel on this device; nothing is sent anywhere. The same license file works in the desktop app if it names that product (or "suite"). The panel in the browser ======================== Chrome and Edge show the panel as a side panel, Firefox (146 or newer) as a sidebar. Click the YakFind toolbar button on the page you want to search, or press Ctrl+Shift+Y (Alt+Shift+Y in Firefox). The click is what lets YakFind read that one tab; "All tabs" asks once for every site. In Firefox the sidebar can also be opened from Firefox's own sidebar menu, but it can only read a page after the toolbar button has been pressed on it. Keys in the panel Enter next result (Ctrl+Enter: previous). In "Ask in plain words": ask. Esc clear the query Arrow Down from the end of the query into the result list Tab moves between the query, the buttons, the term chips, the tabs and the result list. The result list and the row of tabs are one stop each. In the result list Arrow Up/Down, Home and End move and show the result in the document On the tabs Arrow Left/Right, Home and End Space or Enter on a term chip hides or shows that term's highlights n / p / Esc on the page itself while a search is showing: next, previous, clear The panel follows the system's light or dark setting and text size, and can be used at 400% zoom. Screen readers are told how many results a search found. Excel ===== YakFind for Excel is a task pane opened from the Home tab. It searches the cells of the open workbook inside the task pane. The workbook is never changed and nothing is sent anywhere. What is searched The text of every cell that has any, as Excel displays it: a date as "1 Mar 2024" (or however the cell is formatted), an amount as "4,250.75", a formula by the result it shows and not by the formula itself. In a merged area the text belongs to the top-left cell. Cells in hidden rows and columns are searched like any others. "This sheet" (the default) searches the sheet that is showing; "All sheets" searches every sheet, hidden ones included. Searching a sheet is free; "All sheets" and saved searches need a license, entered under Help in the panel and checked on this computer. Not searched: comments and notes, text boxes, shapes, charts, headers and footers, sheet names, and the names of defined ranges. What a hit is Each cell is a paragraph of its own, and cells follow each other row by row, left to right. A phrase never runs from one cell into the next; NEAR and ADJ count words across neighbouring cells, so birch NEAR 6 overdue finds a customer and a status in the same row. A result is listed as sheet!cell (Invoices!B7), at the cell holding its first matched word, with the neighbouring cells as context. Choosing it shows that sheet and selects the cell. In "All sheets" results are grouped by sheet and every sheet is searched on its own: AND, NOT and XOR look at one sheet at a time, and a distance never reaches from one sheet into another. A hit on a hidden sheet is listed with "(hidden sheet)" after its address; Excel cannot show it until the sheet is unhidden, so choosing it does nothing. Ask in plain words Each row is one passage (its cells side by side). Choosing a passage selects the used part of the row (Invoices!A3:F3). Column headings are not added to the rows, so a question works best when it uses or means words that are in the row itself. When the workbook changes Every search reads the cells again. In Excel 2019, 2021 and Microsoft 365 the list also updates by itself when a cell is edited or recalculated, a sheet is added or deleted, or (in "This sheet") another sheet is shown. Excel 2016 does not report changes to add-ins: there the list is brought up to date when you click back into the task pane or search again. Limits - A large sheet is read 20,000 cells at a time; a sheet of 24,000 cells takes a few requests. If Excel on the web refuses a block as too large (cells holding very long text), the sheet is read again in smaller blocks. - While you are typing in a cell Excel does not answer add-ins; the panel says so. Press Enter in the cell and search again. - A result that spans several cells is listed once, at its first cell. Outlook -------- YakFind for Outlook is a task pane opened from a message you are reading. It searches that one message inside the task pane. Nothing is written to the message or the mailbox, and no request is made to the mail server or anywhere else. What is searched The subject, the sender, the To and Cc recipients (name and address), the names of the attachments (pictures placed in the body included) and the body as text. For a formatted (HTML) message Outlook supplies the text a reader sees: link addresses, styles and other markup are not searched, the visible words of a link are. Not searched: what is inside attachments, Bcc and other headers, the date. What a hit is The subject, each person and each attachment name is a paragraph of its own and is labelled (Subject, From, To, Cc, Attachment). In the body, where there are blank lines they separate the paragraphs and a single line break counts as a wrapped line, so a phrase is found across the wrap. A body with no blank line at all is taken one line per paragraph. Results are listed with their context. Outlook gives add-ins no way to select or scroll to text in the message, so choosing a result only marks it in the list; the line at the bottom of the panel says so. When another message is selected Pin the task pane to keep it open while moving between messages; the search is then repeated on each message you select. Outlook versions without pinning close the task pane with the message: open YakFind again from the next one. Limits - One message at a time. There is no folder or mailbox search: Outlook only offers that to add-ins through requests to the mail server, and this add-in makes none. To search mail in bulk, use the desktop app on a .pst or .ost archive. - Exact queries only; there is no "Ask in plain words". - Searching is free; saved searches need a license, entered under Help in the panel and checked on this computer. - Messages being written are not searched. - Outlook does not open add-ins on some messages (for example rights-protected ones). The desktop app =============== The desktop app searches folders of documents on this computer. Add a folder and it reads every PDF, Word (.docx, .doc back to Word 6/95), rich text (.rtf), Excel (.xlsx, .xls back to Excel 5/95), PowerPoint (.pptx, .ppsx, .ppt, .pps), e-mail (.eml, .msg), Outlook archive (.pst, .ost), web page and text file in it, and keeps an index in its own data folder. Text files include structured data (.json, .jsonl, .xml, .yaml, .yml, .toml, .ini) and common source code (.java, .kt, .py, .rs, .js, .ts, .c, .cpp, .h, .cs, .go, .sh, .sql and similar), all searched as plain text. Nothing is sent anywhere and the documents are never changed. Folders are watched: new, changed and deleted files are picked up a few seconds after they settle. "Check for changed files" does the same on demand and re-reads only what is new or different. Faster change checks on Windows On NTFS drives the Windows app uses the Windows change journal, a record Windows keeps of every file change. With it, "Check for changed files" looks only at the folders where something changed instead of every folder, and it notices an edit even when a program keeps the file's size and modified time the same. The journal is opened read-only under your own account by a small signed program installed with YakFind (yakfind-usn.exe). If the journal cannot vouch for a folder (the first check, a folder that was moved, a drive that is not NTFS such as a USB stick or network share, or a journal Windows has reset), YakFind checks that folder in full as usual, so nothing is missed; if the program cannot start, YakFind uses size and modified-time checks. To always check every folder but keep the edit detection, start YakFind with -Dyakfind.ntfs.journalDiscovery=false. To turn the journal off entirely, set the environment variable YAKFIND_NTFS_HELPER to an empty value. Scanned pages and pictures PDF pages that are a picture with no text layer are read by text recognition (Tesseract) and marked "Page n (scanned)", and .png .jpg .tif .bmp files are read too. The copy of Tesseract shipped inside the installer is used when there is one; otherwise one installed on this computer (tesseract on the PATH, or -Dyaksearch.tesseract=/path/to/tesseract). The bottom left of the window says whether scanned pages are being read. Without Tesseract these pages are skipped. Above a document with scanned pages the app says which pages were recognised and how sure the recognition was, for example "Text recognition read pages 2-4, 9, 91% sure". When a page came out below 70% it is named ("page 5 was hard to read (55%), check it against the original"): words on such a page may be wrong, so a search can miss them. FUZZY[word] helps. OCR continues through the final page. The sidebar lists partially indexed PDFs and identifies pages that need OCR or yielded no OCR text. E-mail and Outlook archives A message's attachments are read with it when they are a kind of file listed above, and appear under the message as "Attachment: name" followed by their text; a forwarded message attached to a message is read too. Pictures attached to mail are listed by name but not read (they are mostly logos). An attachment that cannot be read is listed as "Attachment: name (not read: reason)", so a search for the file name still finds the message. In a .pst or .ost archive every message is a document of its own: it has its own entry in the results (subject, then the archive and the folder it is in), its own date for the Changed filter and for "newest first", and its own tags, note and reviewed mark. Attachments stay with their message. The document count at the top left therefore counts messages, not archives. Archives up to 20 GB are read. When an archive changes it is read again as a whole. Files that could not be read Listed at the bottom left with the reason (password-protected, damaged, too large). They are not retried until the file changes. Exact query The query language above, with the same meaning as in the browser and Word. Results are grouped by document, with the page, sheet or slide of each hit; sort by best first, most hits, name or newest. A coloured strip beside the open document shows where its hits are; click it to jump. Verify an exact search Select Explain result in the reader to check which clauses and tokens matched. To inspect an indexed file outside the results, select Check a document and look it up by name. Include attachments searches the complete extracted message. Exclude attachments searches its non-attachment text. Attachments only checks each attachment separately. Refresh older mail collections if YakFind reports unknown attachment boundaries. Reports keep the chosen scope. Find and read a file Select Find a file or press Ctrl+Shift+F (Cmd+Shift+F on Mac). Enter a filename, title or path prefix. In the reader, select Expand reader to give the document more room. Press Escape or select Restore layout to return to the results. Ask in plain words Type a question or a description. The passages that best match are listed, found by shared words, by rare words such as reference numbers, by the same words in the same order (a line copied from a document brings that place back first, marked "same wording") and, when the model is installed, by meaning ("cancel the deal" finds "terminate this Agreement"). This ranks passages; it does not guarantee every relevant one is listed, so use an exact query when completeness matters. Passages are about 120 to 220 words and each begins 40 words inside the one before, so a sentence that falls where one passage ends is still whole in the next. In e-mail, lines that appear in many messages (disclaimers, signatures, mailing-list footers) are left out when passages are ranked and when near-copies are found, so a message is matched on what it says rather than on its footer. Exact queries still find those lines. Filters (left side) File type, Changed (last 30 days / last year), Tagged, and Mentions (a reference number, amount, defined term, case or e-mail address found in several files). Filters apply to exact queries, to questions and to "passages like this". Saved searches "Save this search" keeps the query or question under a name; click the name to run it again. Use SAVED[Name] inside an exact query to reuse a saved text expression with the default attachment scope. Run saved refinements from the saved-search controls. PHONETIC[smith] finds sound-alike English names using Soundex. WEIGHT[apple,4] changes the importance of apple in Desktop's Best first order. Tags and notes "Tag or note" on the open document. Tags and notes are kept in the app's data folder (not in the document), can be filtered on, and are included in reports. "Tag all..." above the results puts one tag on every document listed (or takes it off them all), so a search can be turned into a named batch in one step. Working through a list "Mark reviewed" above the open document records that it has been dealt with; "Reviewed, next" (Ctrl+Enter) marks it and opens the next one in the list that is not yet reviewed. Reviewed documents show a tick in the results, the line above the results counts them ("12 of 87 reviewed"), and "Hide reviewed" on the left leaves them out of every search until switched off. Reviewed is kept like a tag: it survives re-indexing and appears in reports. "Copy all..." copies every document listed into a folder you choose, with an index.csv naming each one's tags, note and original place. Files are copied unchanged; a message from a mail archive is written as a text file. Nothing in the folder is overwritten: a name already there gets a number. Keys F3 / Shift+F3 next / previous hit in the open document Ctrl+L to the query box Ctrl+Enter mark the open document reviewed and open the next Tab, Enter/Space reach and work every other control (Cmd in place of Ctrl on a Mac) License Searching, reading, tagging and reviewing work without a license. Saving reports, "Copy all...", saved searches and serving the Word panel need one. A license is a small text file: "Enter license..." at the bottom left (or: YakFind license /path/to/file) checks it on this computer and keeps a copy in the app's data folder. Nothing is sent anywhere and there is no activation or account. A license does not expire: it covers every version released up to its "updates-until" date, for ever. Use the file exactly as it was sent; a changed file is refused. Reports XLSX, PDF or CSV next to the result count. One row per hit: query, file, location, matched text, context, tags, note, path. The XLSX also has a summary sheet. Related (in the document viewer) Key sentences the sentences most representative of the document Cross-references "Section 4.2", "clause 9.1(b)", "Schedule 1", "Exhibit B": click to go to the clause it names; references to something the document does not contain are listed as not found Versions and near-copies other files sharing much of the wording, with the share; "Compare" shows the two side by side with changed words marked Names, or is named by files whose name this document mentions, and files mentioning it Mentions the same references files citing the same reference numbers, amounts, defined terms, cases or e-mail addresses Similar passages elsewhere passages in other files with a similar meaning "Find passages like this" (above the document) lists passages elsewhere that mean much the same as the paragraph being read. Serve the Word panel Bottom left. Serves the Word add-in's panel at https://localhost:3000 on this computer only, so Word can use YakFind without any outside host. Needs the local certificate made once by "npx office-addin-dev-certs install"; the app says so if it is missing or has expired. Limits: files over 200 MB are skipped (mail archives: 20 GB). Meaning-based search covers the first 4,000 prose passages of a file (of each message, in a mail archive); the rest of a very long file is found by words. Format an exact query --------------------- Choose Format query under Query help on Desktop, or beside the matching controls in a browser or Office panel. On the website, select Format query under the editor. Indentation shows nested groups. To format multiline queries automatically, enable the adjacent preference. Run with Ctrl+Shift+Enter on Desktop, Enter in a panel, or Search on the website. Shift+Enter inserts a newline in a panel or the website. Find which clause excludes a document ------------------------------------- Run Debug query with the same folder and filters as the search. Expand a clause to see its document count. For “notice AND termination”, “left only” counts documents containing notice that would be lost by requiring termination. Select a sample to read the passage. Profile run measures work on the current index. Inspect text shows how the matching profile and tokenizer read a sample. Search a file or folder once ---------------------------- In Desktop Query help, choose Search once… and select files or folders. Enter a query and select Search. Matches appear as files are read. Use OCR flagged files to recognize text in scans, or enable Automatic OCR for future runs. Select Add to library when you expect to search these sources repeatedly. The terminal command streams matches with their original character offsets. Use --json for one JSON object per line and --ocr for local text recognition. YakFind scan "/path/to/matter" --query "termination PRE/5 convenience" --json Explore unusual vocabulary -------------------------- Choose Explore vocabulary under Desktop Query help, or Vocabulary in Search once. Select Rare to find terms in few documents. Select Distinctive to compare your results with the rest of the collection. Use in query inserts the observed phrase. Dictionary lists words absent from the chosen US, UK, or Canadian English dictionary. This view requires local Aspell with the chosen dictionary installed. Allow word records an exception for the current library or one-off vocabulary session. Desktop term-list reports ------------------------- Choose Term-list report in the search pane and paste one exact query per line. Save the results to a new CSV file. Each row gives the query, index revision, matching document count, hit count, and any query error. Blank lines are skipped. The report searches the full local index with whole-word, case-insensitive matching. The command-line equivalent is YakFind term-report queries.txt new-report.csv. Desktop metadata search ----------------------- Put metadata restrictions before the text query. For example: from:alice to:bob sent:2023-03-01..2023-03-31 "notice period" The text fields are from, to, cc, subject, author, and filename. Values match case-insensitive substrings. Quote values containing spaces. Desktop also accepts a double colon for known fields, such as author::smith. The date fields are sent, received, and modified. Dates are inclusive UTC calendar days. All leading restrictions must match. Omit the text query to list matching documents without counting text hits. Missing metadata does not match a field restriction. Refresh an older library to extract its metadata. OpenDocument text, spreadsheets, and presentations (.odt, .ods, .odp) are read from their stored paragraphs and headings. Enable Indexed words in Desktop to see spellings beginning with the last word you typed. Each count is the number of indexed documents containing that spelling. Select a suggestion to use it in the query. For a possible typo, choose Include spelling variants. Select a query word, review each indexed spelling and its document count, then apply the spellings you want to include. YakFind keeps your original word in the query. Words up to three letters stay exact. Four to seven letters allow one edit and longer words allow two. An adjacent letter swap counts as one edit. A similar word can have a different meaning, so review the choices before applying them. Desktop records completed exact and batch queries in search-audit.csv alongside the local index. Export search history in the sidebar saves a CSV copy with the time, revision, scope, settings, document and hit counts, errors, truncation status, search language and library coverage. Older audit rows leave the newly recorded fields blank. In exact results, Timeline orders documents by sent date, received date, or file modification time and labels the date source. Exact copies groups byte-identical EML and MSG files, including copies held in ZIP, 7z and RAR archives, and matching reconstructed MBOX messages. For PST and OST, it compares message IDs, recipients, headers, bodies and attached file contents. Messages with missing IDs, embedded messages, unreadable attachment data or more than 64 MiB of attachments stay separate. Email threads joins visible messages with explicit reply references. When several parent records reuse a message ID and their contents differ, the reply stays separate. Expand a group to review each source separately. Review screening and redaction ------------------------------ Open Personal data on a document to inspect candidate Social Security numbers, payment cards, labelled bank accounts and birth dates. Choose a finding to read its source. Privilege screening in the sidebar accepts one name or domain per line and applies the Possible privilege tag. Clearing the rules clears the screening tag. Other review tags are independent. For an indexed PDF, choose Redact PDF, drag boxes on the preview and inspect each marked page. Export marked PDF writes a new image-only PDF at 150 dpi. The original file remains available at its existing path. MBOX mailboxes are indexed message by message. Appending new messages keeps existing message paths stable. The individual message limit is 30 MiB. ZIP members are indexed individually with their archive path and folder. Unsupported members appear in the unreadable list. Member extraction is limited to 30 MiB per item and 1 GiB total per archive. On a ZIP update, YakFind hashes the member bytes and reuses completed extraction results for identical members. If the archive cannot be opened, coverage records the failed refresh and the last readable index stays available. In an exact result list, Compare clauses displays matching numbered sections side by side. Unnumbered text before the first section uses paragraph bounds. In Investigator, choose Production from an exact result list, enter a Bates prefix and starting number, and choose the destination folder. Each batch has a fresh subdirectory. The manifest records the source representation, SHA-256 hashes, first and last Bates numbers and individual failures. Original PDFs use rendered pages. Other readable files use their extracted text for the PDF. Firm Suite shared indexes ------------------------- On the publisher, choose Collections → Publish shared index, or run YakFind publish-share , after refreshing the library. Each publication verifies the Lucene files before switching the CURRENT pointer. The shared filesystem must support atomic rename. Reviewers choose Collections → Open shared index, or run YakFind open-share , to open that generation read-only. Restart the viewer to pick up a newer generation. Tags, notes, settings and search history are stored under each user's local application data. The index contains the extracted text of the published library; give the shared folder only to reviewers authorized to read the whole collection. Additional importers and languages ---------------------------------- OneNote section files (.one) use the embedded Apache Tika reader. WordPerfect (.wpd), Pages, Numbers and Keynote files use the locally installed LibreOffice import filters. Set -Dyakfind.soffice to the executable if it is outside PATH. 7z and RAR members use a locally installed 7-Zip with the relevant decoder. Set -Dyakfind.7zip to the executable if necessary. Encrypted or unreadable members carry a diagnostic. Archive member export currently yields extracted text. Keep the container as the original evidence. Choose English, Spanish, French or German under Search language. In Desktop the choice applies to STEM queries and abbreviation handling in sentence queries, including term-list reports. English remains the initial setting. Microsoft 365 reviewer collections ---------------------------------- On a desktop configured for YakFind Microsoft sign-in, choose Collections → Open Microsoft 365 collection, or run YakFind open-cloud. Choose mail or files and sign in to the Microsoft work account that has access to the material. For mail, select a mailbox folder. For OneDrive or SharePoint, paste a folder sharing link that you can open with the same account. YakFind downloads the selected items and opens a separate local index for that account and collection. Open the collection again to check for source changes. Use Disconnect Microsoft 365 when the review ends. This removes the downloaded collection and its local notes and history. To remove a collection without signing in, close its window and run YakFind disconnect-cloud. Searching selected indexes from Copilot and Codex Install YakFind Desktop and index your collection once. Give each index you want to expose a short name and its absolute Lucene directory (for example index-v5 under your local profile). For a published shared index, use the directory that contains CURRENT. Only configure collections you want the AI client to read. Returned excerpts may be sent to the client's model provider. For VS Code Copilot, add a stdio server in .vscode/mcp.json: {"servers":{"yakfind":{"type":"stdio","command":"YakFind","args":["mcp","--index","pilot=/absolute/path/to/index-v5"]}}} For Codex, add this entry to config.toml: [mcp_servers.yakfind] command = "YakFind" args = ["mcp", "--index", "pilot=/absolute/path/to/index-v5"] Use the absolute path to the installed YakFind launcher if it is outside PATH. Repeat --index for additional collections. Ask the client to list_indexes, search a selected index, then get_passage for a citation in its results. A search returns one result per matching document, with the first match in context. Continue with nextOffset and the same revision. suggest_spellings lists candidate spellings, their edit distances and matching document counts. Start a search from Windows Explorer ------------------------------------ In PowerShell, run scripts/windows-explorer.ps1 from the source checkout. If you installed YakFind elsewhere, pass -Launcher with the full path to YakFind.exe. Registration applies to your Windows user. To remove the commands, run the same script with -Uninstall. Right-click a folder or its background and select Search this folder in YakFind. Right-click a file and select Read and search with YakFind. On Windows 11 these commands may appear under Show more options. YakFind opens a separate window with a temporary index of the selected folder or file. Closing that window discards the index and its review notes. From a local document in YakFind, choose Open original to use its default application or Show in folder to locate it on disk. Drag files and folders onto the YakFind Desktop window to search them together in a temporary review window. This leaves your library unchanged. In the viewer, select a match and choose Copy citation to copy its source path, location when available, and excerpt. In Word, select a passage and choose Search selected text in the YakFind panel. In Outlook reading mode, copy a passage and choose Search copied text. If Outlook blocks clipboard access, paste it into Exact query and surround the phrase with quotation marks. Search from Dolphin, Nautilus, or Finder --------------------------------------- Run python3 scripts/install-file-manager.py from the source checkout after installing YakFind. Pass --launcher with the installed executable path on Linux or the .app path on macOS if you used a custom install location. Run again with --uninstall to remove YakFind's entries. In Dolphin, select files or folders and choose Search with YakFind from the context menu. In Nautilus, find the same command under Scripts. In Finder, look under Quick Actions or Services. If needed, enable the service in System Settings under Keyboard Shortcuts, Services. A selection opens in a temporary review window. Drag-and-drop and Copy citation are also available inside Desktop. Query help and syntax reference ------------------------------- See https://yakfind.com/docs/query-syntax/ for the full reference and interactive examples. In Exact query, use Suggestions or Ctrl+Space to request completions at the caret. Choose autocomplete under Query help to open suggestions as you type and accept the selected suggestion with Tab. Escape dismisses the suggestions. Set Query help to off to hide the assistance. YakFind explain-query [--caret offset] explains Desktop syntax as JSON. MCP clients can call describe_query with query and optional caret. Both use zero-based UTF-16 offsets and work without searching an index. Search within the current results --------------------------------- In Desktop, choose Filter results after an exact search. Find in list filters by visible title, filename, path, or the first excerpt. Search within results searches the full text of the previously matched documents. Type a query or select a saved exact search to refine the current set. Remove a refinement to return to its parent. Run the base search again if the index changed. The audit records the refinement and its parent queries. Hit reports include the refinement chain and index revision. Bulk controls are available for the unfiltered base search. Use NUM[10000..50000] for an inclusive range in the text, including within a proximity expression such as invoice NEAR 8 NUM[10000..50000]. Use FIRST[100](notice) or LAST[100](signature) to limit an expression to opening or closing searchable words. On YakFind.com, switch to Fictional matter to browse a larger sample. Import a dtSearch query to preview common connectors and integer ranges. Review the proposed YakFind expression before using it. The importer flags unsupported syntax and mixed connectors that need grouping. Concepts and similar passages in Desktop Choose Ask in plain words and enter “transfer the agreement to someone else”. Select Assignment of contract to see the phrases used for that concept. Click a phrase to include or remove it. Matching formulations are highlighted on passage cards. Other passages can appear because of shared words or vector similarity. Read the clause in context, especially if it negates a formulation. Select Edit formulations as an exact query when every result must match one of the chosen phrases. Saving a concept question keeps the selected phrases, attachment scope and vector setting. Exact searches expand only what you enter. With Include vector similarity enabled, Desktop can suggest up to three concepts from an unfamiliar description. Select a concept to apply its formulations. Turn the option off to use vocabulary aliases and wording. No model is required. In the reader, Find passages like this lets you retain up to eight examples, remove incidental terms, and search other documents. Use Keep examples to add another passage before searching. Desktop includes eight English contract concepts. To add matter-specific vocabulary, put concepts.tsv in the library profile and reopen Desktop. Each row has four tab-separated columns: stable lowercase ID (letters, numbers and hyphens), display name, plain-language aliases separated by |, and matching phrases separated by |. Reusing an ID replaces its definitions. Example (tabs between columns): inspection-right Inspection right check their accounts|inspect the books inspect its records|right of audit An MCP client can call suggest_concepts with an index and description. It returns the ID, vocabulary revision, formulations and an exact YakFind query. Review the proposed expression, then pass it to search with the required scope. In an attachment-only or body-only passage search, older mail or archive passages may still need attachment labels. The notice counts passages in the active scope. Choose Refresh index, or ask the owner to refresh and republish a shared snapshot. MCP clients can pass useVectors=true to suggest_concepts to request the installed local model. The default uses vocabulary wording. Regional and reusable exact queries IN[paragraph](renew* BUT NOT automatic*) checks each paragraph independently. Other regions include sentence, document, extracted PDF page, slide, sheet, email subject, body and attachment. Missing boundaries give no regional hits. ATLEAST[2](audit, inspection, "books and records") counts matching clauses. WINDOW[12](notice, breach, cure) fits all three in twelve words, inclusive. OUTSIDE(Smith, "Mr Smith") keeps individual mentions outside the phrase. In Desktop, save from:{{phrase:who}} as sender and use SCOPE[sender|who=Ada Mercer] notice. For an exact expression, save {{phrase:item}} NEAR {{distance:n}} notice as close and search SAVED[close|item=delivery date|n=5]. Date values use {{date:name}} and YYYY-MM-DD. The resolved query appears in the preview and search history. Search the dates written in a document with DATE[2026-03-14], DATE[2026-03], DATE[2026-01..2026-03] or DATE[*]. For example, notice NEAR 8 DATE[UK:2026-03] reads numeric day/month dates in UK order. Use US: for month/day, YMD: for year/month/day, or STRICT: to skip ambiguous day/month pairs. Desktop remembers your choice under Query help. Years 00–49 mean 2000–2049 and 50–99 mean 1950–1999. A saved run records the effective order in its resolved query. Use @name for an exact macro, @name(key=value,other=value) for a template, and @@name or @@name(key=value) for a leading Desktop metadata scope. Short calls use the same typed arguments, nesting limits and expansion preview as SAVED and SCOPE. Quote a literal "@name". In web and Office panels, choose Saved and Macro name to assign a short name. Review ambiguous dates with DATE[AMBIGUOUS] or a particular possible reading with DATE[AMBIGUOUS:2026-04-03]. DATE[PARTIAL:--04-03] finds a possible April 3 without a year. DATE[PARTIAL] finds any recognized yearless pair. Full dates use YYYY-MM-DD by default. Both readings remain visible. On Desktop, Export search profile and Import search profile in the sidebar transfer saved investigations and matching settings in a versioned JSON file. Identical definitions can be imported again. A conflicting name stops the import. The profile contains query text and concept terms. Keep search history, documents and the index separately for a reproducible investigation. In browser and Office panels, open Saved to export and import compatible profiles. Desktop-specific searches and language settings require Desktop. Structured values in exact search Use MONEY[GBP:10000..15000], RATE[GBP/hour:>=60], DURATION[hours:<72], QTY[g:0.5], or PERCENT[0.25] across equivalent source representations. Business days and calendar months have their own comparison groups. Use CLAUSE[4.2.*] or EXHIBIT[A.*] to include descendants, and VERSION[<2.10.0] for semantic-version precedence including prereleases. NUM supports equality, !=, <, <=, >, >=, inclusive ranges, INTEGER, FRACTIONAL, ODD, EVEN, and MULTIPLE followed by a positive integer divisor. All operate on occurrences and can be used with proximity, IN regions and reusable exact expressions. Investigation queries DURATION[days:COVERS 45] finds wording such as 30–60 days. OVERLAPS and WITHIN compare two inclusive intervals. Use these inside MONEY, DURATION, QTY, PERCENT and DATE. Monetary and physical bounds can also use “at least” or “up to”. MONEY[GBP:12500 +/- 2%] includes both £12,250 and £12,750. NUM and measured values accept absolute tolerances. In source text, 1½ hours, 1 1/2 hours and £12.5k retain their original highlights. BATES[ACME:001250..001499] keeps the prefix and sequence width. ID[INV-2025-####] recognizes four digits after the year with space, hyphen or underscore separators. Saved ID patterns travel with a search profile. CITE[US:347 U.S. 483], CITE[UK:2021 EWCA Civ *] and CITE[CA:2024 SCC 1] search reporter and neutral citations. CITE[CA:*] finds all recognized Canadian formats. On a citation hit, Find this judgment runs an exact search. TIME[17:00..18:00] compares local clock readings. INSTANT compares timestamps carrying offsets. To assign a fixed offset to otherwise unzoned timestamps, use INSTANT[OFFSET=-05:00;2026-01-01T00:30:00Z]. Ranked values and structured review MONEY[GBP:NEAREST 12500 WITHIN 500] ranks accepted amounts by distance. MONEY[GBP:GAUSS 12500 SD 250 WITHIN 2] includes both endpoints. GAUSS AUTO WITHIN 2 uses the population mean and population SD. PERCENTILE 90..100 includes tied endpoints. OUTLIER MAD 3 ranks values beyond three scaled median absolute deviations. Constant populations have no standardized outliers. Scoped collection searches use exact values. COUNT[>=3](CITE[CA:*]) counts occurrences. DISTINCT[>=3](CITE[CA:*]) counts judgments and recognizes SCC and CSC as aliases. OCR(BATES[ACME:001250]) also finds ACME00I250. TYPO(ID[INV-2025-42]) includes potential one-edit identifiers. Possible readings retain source offsets. Run a BATES, ID, or CITE query on Desktop and choose Reconcile IDs to export repeated identifiers and missing Bates runs for that scope. In Query help, choose Include OCR variants or Review structured typos to apply the mode to structured clauses. Saving that query preserves its mode. Automatic statistics use double precision. Fixed target range endpoints are compared with exact decimal arithmetic. A Gaussian closeness of 1 means the value is at the target. The score is a ranking weight. OCR(MONEY[GBP:GAUSS AUTO WITHIN 2]) explicitly includes uniquely recovered observations. Reconciliation reports omit ambiguous readings and retain the original spelling and offset for accepted readings.