Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Looking for trees with search_doc("tree") is a bad idea #7018

Closed
nathanncohen mannequin opened this issue Sep 26, 2009 · 6 comments
Closed

Looking for trees with search_doc("tree") is a bad idea #7018

nathanncohen mannequin opened this issue Sep 26, 2009 · 6 comments

Comments

@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented Sep 26, 2009

I understand the word "tree" may be the only way to get this result, the other words being less common or not mathematics-related... Even though :

sage: search_doc("tree")
html/en/installation/source.html:226:tree. This can take close to an hour on some machines. Depending on the
html/en/installation/source.html:246:build tree to <tt class="docutils literal"><span class="pre">/usr/local</span></tt>. You might also copy the <tt class="docutils literal"><span class="pre">sage-*/sage</span>html/en/installation/index.html:59:<li class="toctree-l1"><a class="reference external" href="introduction.html">Introduction</a></li>
html/en/installation/index.html:62:<li class="toctree-l1"><a class="reference external" href="binary.html">Pre-built Binary Install</a><ul>
html/en/installation/index.html:63:<li class="toctree-l2"><a class="reference external" href="binary.html#linux-and-os-x">Linux and OS X</a></li>
html/en/installation/index.html:64:<li class="toctree-l2"><a class="reference external" href="binary.html#microsoft-windows">Microsoft Windows</a></li>
html/en/installation/index.html:69:<li class="toctree-l1"><a class="reference external" href="source.html">Install from Source Code</a><ul>
html/en/installation/index.html:70:<li class="toctree-l2"><a class="reference external" href="source.html#steps-to-install-from-source">Steps to Install from Source</a></li>
html/en/installation/index.html:71:<li class="toctree-l2"><a class="reference external" href="source.html#installation-in-a-multiuser-environment">Installation in a Multiuser Environment</a></li>
html/en/installation/index.html:72:<li class="toctree-l2"><a class="reference external" href="source.html#special-notes">Special Notes</a></li>
html/en/installation/index.html:77:<li class="toctree-l1"><a class="reference external" href="icon.html">Desktop icon</a></li>
html/en/installation/index.html:80:<li class="toctree-l1"><a class="reference external" href="documentation.html">The Documentation</a></li>
html/en/numerical_sage/index.html:72:<li class="toctree-l1"><a class="reference external" href="numerical_tools.html">Numerical Tools</a><ul>
html/en/numerical_sage/index.html:73:<li class="toctree-l2"><a class="reference external" href="numpy.html">NumPy</a></li>
html/en/numerical_sage/index.html:74:<li class="toctree-l2"><a class="reference external" href="scipy.html">SciPy</a></li>

and much more below, as class=doctree is in all the lines... ;-)

Nathann

CC: @dandrake

Component: documentation

Author: John Palmieri

Reviewer: Dan Drake

Merged: sage-4.3.2.alpha0

Issue created by migration from https://trac.sagemath.org/ticket/7018

@nathanncohen nathanncohen mannequin added this to the sage-4.3.1 milestone Sep 26, 2009
@jhpalmieri
Copy link
Member

Author: John Palmieri

@jhpalmieri
Copy link
Member

comment:1

Here is a patch. This implements two new keywords for searching, one of which addresses the issue in this ticket. These work for search_src, search_doc, and search_def.

  • You can now do search_doc('tree', whole_word=True), and it will look for 'tree' as a whole word, not returning matches for 'toctree' or 'trees'.

  • You can now do search_src('TreE', ignore_case=True), and it will return matches for 'TREE', 'Tree', 'tree', etc., completely ignoring case. (By default, all searches continue to be case-sensitive, so search_src('TreE') returns no matches.)

@dandrake
Copy link
Contributor

Reviewer: Dan Drake

@dandrake
Copy link
Contributor

comment:2

Attachment: trac_7018-search.patch.gz

This looks good, works as advertised, and passes all doctests. Positive review.

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Jan 23, 2010

Merged: sage-4.3.2.alpha0

@sagetrac-mvngu sagetrac-mvngu mannequin closed this as completed Jan 23, 2010
@nthiery
Copy link
Contributor

nthiery commented Apr 18, 2010

comment:4

See also discussion on sage-combinat-devel: http://groups.google.com/group/sage-combinat-devel/browse_thread/thread/8560fa9a2eda7712

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants