The terms component works at the index level, i.e. looks at the actual terms dictionary. Which means the count you see is across both deleted and live docs across segments. Delete in Solr only *marks* the document as deleted in the underlying lucene segment files. The actual removal of docs happens during segment merges. Once the segment merge takes place and the deleted doc is actually purged from index, you should see the count as 1 with /terms as well.
/select on the other hand is cognizant of live docs. -Rahul On Tue, Mar 24, 2026 at 5:47 PM Dmitri Maziuk <[email protected]> wrote: > Hi all, > > is this the case of there being only two hard problems in Comp. Sci.: > cache invalidation, naming things, and off-by-one errors? -- > > ``` > ${MY_SOLR_URL}/terms?terms.fl=record_type&terms.limit=-1 > > ..., "KeyFrame",*2* ] > ``` > > Versus > ``` > ${MY_SOLR_URL}/select?q=record_type:KeyFrame > ... > "params":{ > "q":"record_type:KeyFrame", > "indent":"true", > "q.op":"OR", > "useParams":"", > "_":"1774386812360" > } }, > "response":{ > "numFound":*1*, > ... > ``` > > Or am I missing something? > > TIA > Dima > >
