jackwener/OpenCLI · warning · EmptyResultError

No publications matched "${query}".

Error message

No publications matched "${query}".

What it means

EmptyResultError thrown when dblp's publication search API (/search/publ/api) returns zero hits for the query. The request and network succeeded; dblp simply has no matching publication records.

Source

Thrown at clis/dblp/search.js:41

    access: 'read',
    description: 'Search dblp computer-science bibliography by free-text query',
    domain: 'dblp.org',
    strategy: Strategy.PUBLIC,
    browser: false,
    args: [
        { name: 'query', positional: true, required: true, help: 'Search keyword (title / author / venue, e.g. "attention is all you need")' },
        { name: 'limit', type: 'int', default: 20, help: 'Max results (1-100, single dblp page)' },
    ],
    columns: SEARCH_COLUMNS,
    func: async (args) => {
        const query = requireQuery(args.query);
        const limit = requireBoundedInt(args.limit, 20, 100);
        const path = `/search/publ/api?q=${encodeURIComponent(query)}&format=json&h=${limit}`;
        const json = await dblpFetchJson(path, 'dblp search');
        const hits = json?.result?.hits?.hit;
        const list = Array.isArray(hits) ? hits : [];
        if (list.length === 0) {
            throw new EmptyResultError('dblp search', `No publications matched "${query}".`);
        }
        return list.slice(0, limit).map((hit, i) => searchHitToRow(hit, i + 1));
    },
});

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Shorten the query to a few distinctive words from the title
  2. Correct spelling and remove punctuation/special characters
  3. Try author name plus a keyword instead of the full title
  4. Search dblp.org directly to confirm the publication exists in dblp at all

Example fix

// before
opencli dblp search 'Attention Is All You Need: A Very Long Retyped Title With Typos'
// Error: No publications matched.
// after
opencli dblp search 'attention is all you need'
Defensive patterns

Strategy: fallback

Validate before calling

const query = String(args.query ?? '').trim();
if (query.split(/\s+/).length > 8) {
  console.warn('Long queries often return 0 dblp hits; consider shortening.');
}

Try / catch

try {
  rows = await dblpSearch({ query });
} catch (err) {
  if (/No publications matched/.test(err.message)) {
    rows = []; // or retry with a shortened query
  } else throw err;
}

Prevention

When it happens

Trigger: Calling `dblp search '<query>'` where the publ/api endpoint's result.hits contains no hit entries — overly specific query, unusual title phrasing, or a publication not indexed in dblp.

Common situations: Typo in paper title; querying non-CS venues dblp does not index; too many words in the query narrowing results to zero; quoting special characters that change matching.

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/fee4a46a38d4506b. Report an issue: GitHub.