About: Search
This system uses the Apache' Lucene information retrieval toolkit to index and search entries. (More specifically, it uses the PyLucene toolkit, but technically, that's Lucene, too. :)
Listed below are several search techniques Lucene offers, along with notes about how it is being used here. Over time, we intend to make some of the admittedly-complex-syntax-driven search features listed below easy to use without having remember the syntax. For now, though, since it's all already there, we thought we should tell you about it, just in case you (like your friendly maintainers) are librarian-type search syntax geeks.
For more details on Lucene's general search syntax, see this detailed overview.
| Type | Examples | Notes |
|---|---|---|
| Fields |
user:dchud title:cyberinfrastructure tag:python group:code4lib date:2005-03-02 all:zodb |
"all" is the default, so if you search "tiger woods", it will query as if you entered "all:tiger all:woods" |
| Booleans | (python OR perl) AND inkdroid | "AND" and "OR" must be in all caps; use parenthesis for precedence; default multi-token search (e.g. "roky erickson") will OR all tokens |
| Wildcards |
p?thon [single character] digital_libr* [multiple characters] |
wildcards cannot be first character, e.g. "*libraries" will not work |
| Required values |
+user:LTjake +tag:python +tag:python -user:dchud |
'+' before term is like "AND", '-' before term is like "NOT" |
| Phrases |
"ruby on rails" [vs.] ruby on rails |
|
| Relevance boost |
user:ksclarke user:inkdroid tag:java [vs.] user:ksclarke^2 user:inkdroid tag:java |
|
| Edit distance |
matman~ libaries~0.8 |
single words only; if unspecified, defaults to 0.5 |
| Proximity | "python lisp"~10 [both 'python' and 'lisp' within 10 words] | only works with quoted phrases; '~' also used for edit distance (see "Edit distance" above) |
| Ranges |
user:{efc TO ianb} -fawcett user:[dchud TO ecorrado] |
"[]' for inclusive, '{}' exclusive |
| Domain names |
nytimes.com slashdot.org pitchforkmedia.com |
a little odd sometimes, not always just what you'd expect, but still very useful |
| More combos of above | jessamyn AND date:{2004-09-13 TO 2004-10-01} | try your own :) |