<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Dear Ramiro,<div><br></div><div>I suppose that you're talking about doing the subcorpus search directly in CQP? Then you can simply restrict your matches to those in the desired documents. You can either do it in the CQP query</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>.... query ... within text :: match.text_id = "...";</div><div><br></div><div>or you can make a subcorpus of all relevant texts</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Sub = <text_id = "..."> [] expand to text;</div><div><br></div><div>then activate it for a subcorpus search:</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Sub;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>... query ...;</div><div><br></div><div>The inconvenience is that you can use word lists with s-attributes, so this can be tedious (or not work at all) if you have a very long list of text IDs. You have to match against a regular expressions that is essentially a disjunction of the relevant text IDs.</div><div><br></div><div>Hope this helps,</div><div>Stephanie</div><div><br></div><div><br id="lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On 26 Jun 2025, at 21:21, Ramiro Santa Ana Anguiano <dev@academia.org.mx> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><p style="caret-color: rgb(0, 0, 0); font-family: ArialMT; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">I wonder how I can do a search but only on documents with specific text_ids.</p><p style="caret-color: rgb(0, 0, 0); font-family: ArialMT; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">I think what I am looking for is in the<span class="Apple-converted-space"> </span><a href="https://cwb.sourceforge.io/files/CQP_Manual.pdf">CQP Manual</a><span class="Apple-converted-space"> </span>(probably on page 30), but I am not sure about the right syntax in order to achieve this.</p><br class="Apple-interchange-newline"></div></blockquote></div><br></div></body></html>