Ignoring certain files for search

23 views
Skip to first unread message

Daniel Evans

unread,
Apr 8, 2021, 11:27:28 AM4/8/21
to sphinx-users
Hello,

We have a codebase mainly containing user-facing documentation for a set of command line tools, but which also contains a smaller section of developer API documentation.

When searching the documentation for information on a tool, Sphinx often ranks several results for developer API above the user-facing documentation, which rather annoys users.

Is there a reasonably simple way to prevent the developer documentation pages (which are contained in a single directory) from being listed in search results? Is there some configuration option like "'search_ignore': 'developer/*'"?

(An obvious alternative is to have two separate sets of documentation, perhaps with intersphinx links, given the two fairly separate use cases)

Regards,
Daniel

Komiya Takeshi

unread,
Apr 8, 2021, 11:40:11 AM4/8/21
to sphinx...@googlegroups.com
Hi,

You can specify nosearch option to the arbitrary pages using
bibliographic fields:
https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html#special-metadata-fields

But there are no options to ignore files all at once.

Thanks,
Takeshi KOMIYA

2021年4月9日(金) 0:27 Daniel Evans <daniel.f...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/ca06082a-010c-44f1-8f2b-c2dece4380ecn%40googlegroups.com.

Daniel Evans

unread,
Apr 8, 2021, 12:06:39 PM4/8/21
to sphinx...@googlegroups.com
Hi Takeshi,

Thanks, that looks like a good solution too - there's only a few pages to apply it to.

Regards,
Daniel

You received this message because you are subscribed to a topic in the Google Groups "sphinx-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sphinx-users/-6nDi63xAZI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sphinx-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/CAFmkQAM4hrxGLCcbbqMVc2ezVp-evCWmzfQYD76g3vgK910eBQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages