Alex
Alex

Reputation: 879

Sphinx questions in search button

For now, I am trying to learn sphinx for generating documentations in html format, but I find a problem is that I can't use the search button to find anything. I just search a keyword, the result will be nothing. I don't know why, I just put all of things by default. Does someone know how to fix it?

What I wrote in the index.rst is:

Contents:

.. toctree::
   :maxdepth: 2

   test.rst
Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

And test.rst is:

================
 eeeeeeeeadadadad
================
----------
 Subtitle
----------

Section Title ddadadada
==================================
.. [1] adadadadadadada"

Here is the picture, it will search but no result, and can't stop, just keep search...

enter image description here

Upvotes: 1

Views: 266

Answers (1)

Kevin Horn
Kevin Horn

Reputation: 4295

Sphinx does not perform a full-text search by default. It only searches an index generated based on index entries, cross-references, etc.

Judging by what you've posted in your question, you don't have any content that will be indexed by the searching mechanism.

Try adding more content (especially python object documentation, or index entries).

If you want a full test search, there's a Sphinx extension which can build an index for the whoosh full-text search engine here, though that may be more compicated than what you are looking for.

Upvotes: 1

Related Questions