辛夷坞

涧户寂无人,纷纷开且落

By - Christen

Sphinx

Sphinx is a tool that makes it easy to create intelligent and beautiful documentation, written by Georg Brandl and licensed under the BSD license.
It was originally created for the new Python documentation, and it has excellent facilities for the documentation of Python projects, but C/C++ is already supported as well, and it is planned to add special support for other languages as well. Of course, this site is also created from reStructuredText sources using Sphinx! The following features should be highlighted.
What users say:

Cheers for a great tool that actually makes programmers want to write documentation!

  • Output formats: HTML (including Windows HTML Help), LaTeX (for printable PDF versions), ePub, Texinfo, manual pages, plain text
  • Extensive cross-references: semantic markup and automatic links for functions, classes, citations, glossary terms and similar pieces of information
  • Hierarchical structure: easy definition of a document tree, with automatic links to siblings, parents and children
  • Automatic indices: general index as well as a language-specific module indices
  • Code handling: automatic highlighting using the Pygments highlighter
  • Extensions: automatic testing of code snippets, inclusion of docstrings from Python modules (API docs), and more
  • Contributed extensions: more than 50 extensions contributed by users in a second repository; most of them installable from PyPI

Sphinx uses reStructuredText as its markup language, and many of its strengths come from the power and straightforwardness of reStructuredText and its parsing and translating suite, the Docutils.

Glossary

1. facilities
1) a ​place, ​especially ​including ​buildings, where a ​particular ​activity ​happens(BUILDING):

  • a ​nuclear ​research facility
  • a ​military facility
  • a new ​sports facility

2) the ​buildings, ​equipment, and ​services ​provided for a ​particular ​purpose(plural):
​- shopping facilities
– ​medical facilities
– ​sports facilities
3) an ​ability to do something ​easily or well(ABILITY):
His facility for ​languages is ​astonishing.
4) a ​feature of a ​product that ​allows you to do something[C or U]:
a ​computer with a ​speech ​recognition facility
2. semantic
1) connected with the ​meanings of words
2) (of words and ​language) ​connected with ​meaning:
Words are semantic ​units that ​convey ​meaning.
3. citations
1) a word or ​piece of writing taken from a written ​work(EXAMPLE):
All citations are taken from the 2007 ​edition of the ​text.
2) (law) an ​official ​request for someone to ​appear in a ​law ​court:
The ​court ​issued a ​contempt citation against ​city ​council ​members who ​refused to ​comply with a ​court ​order.
4. hierarchical
arranged in an ​order from the most to the least ​important
a hierarchical ​structure/​system/​relationship
5. siblings
a ​brother or ​sister:
I have four siblings: three ​brothers and a ​sister.
There was ​great sibling ​rivalry (= ​competition) between Peter and his ​brother.
Dictionary: Cambridge English Dictionary & Thesaurus

1 thought on “Sphinx

Christen March 9, 2016 at 2:04 pm

另外,Sphinx也是一个基于SQL的全文检索引擎,可以结合MySQL,PostgreSQL做全文搜索,它可以提供比数据库本身更专业的搜索功能,使得应用程序更容易实现专业化的全文检索。
Sphinx特别为一些脚本语言设计搜索API接口,如PHP,Python,Perl,Ruby等,同时为MySQL也设计了一个存储引擎插件。
Sphinx 单一索引最大可包含1亿条记录,在1千万条记录情况下的查询速度为0.x秒(毫秒级)。Sphinx创建索引的速度为:创建100万条记录的索引只需 3~4分钟,创建1000万条记录的索引可以在50分钟内完成,而只包含最新10万条记录的增量索引,重建一次只需几十秒。
关于全文检索,如果不用 Lucene ,这个似乎也是一种新的选择。

Reply

Leave a Reply

Your email address will not be published.
*
*