Differences between revisions 146 and 152 (spanning 6 versions)
Revision 146 as of 2011-07-22 19:12:25
Size: 3467
Editor: Hannah Bast
Comment: Scheiß Spammer
Revision 152 as of 2012-01-25 20:41:00
Size: 3281
Editor: Hannah Bast
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== Documentation (users) == #acl All:read
Line 3: Line 3:
[wiki:Self:completesearch/Installation Installation Guide] = CompleteSearch =
Line 5: Line 5:
[wiki:Self:completesearch/Local Set up the system on a local machine (notebook)] [[MpiiWiki|Old Wiki from the MPII]] (lots of detailed / internal information)
Line 7: Line 7:
[wiki:Self:completesearch/IndexBuilding Index Building: Tools, Formats, etc.] == Quick Intro ==
Line 9: Line 9:
[wiki:Self:completesearch/DocumentFormats Document Formats: .docs, .words, .vocabulary, etc.] Follow these steps to checkout the CompleteSearch code from our SVN, build it, build an index, run a server on that index, and ask queries to that server via HTTP. Don't be afraid, it's easy. If you have questions, send an email to <bast@informatik.uni-freiburg.de>.
Line 11: Line 11:
[wiki:Self:completesearch/CharacterEncoding UTF-8 support for PHP (php_mbstring extension)] 0. Get source code
Line 13: Line 13:
[wiki:Self:completesearch/PHPErrorReporting Error reporting / handling with PHP] svn checkout
http://vulcano.informatik.uni-freiburg.de/svn/completesearch/codebase
Username: [ask us]
Password: [ask us]
Line 15: Line 18:
[wiki:Self:completesearch/Php Problems with PHP] 1. Compile
Line 17: Line 20:
[wiki:Self:completesearch/Glossary Glossary of important terms in search engine technology] make all
Line 19: Line 22:
== Documentation (developers) == This will build three binaries:
Line 21: Line 24:
[wiki:Self:completesearch/SourceCodeOverview Source code overview] buildIndex
buildDocsDB
startCompletionServer
Line 23: Line 28:
[http://search.mpi-inf.mpg.de/ir-www/doc Documentation produced by Doxygen] If you call any of these binaries without parameters you will get usage
info with all the available options.
Line 25: Line 31:
[wiki:Self:CodingConventions Coding Conventions] and [wiki:Self:completesearch/DesignConventions OO and C++ Design Conventions] 2. Input (to be produced by a suitable parser)
Line 27: Line 33:
[wiki:Self:completesearch/ProblemsCompiling Typical problems compiling] a <name>.words file, with lines of the form
Line 29: Line 35:
[wiki:Self:completesearch/Debugging Debugging HowTo] <word><TAB><doc id><TAB><score><TAB><position>
Line 31: Line 37:
[wiki:Self:completesearch/GNUBuildSystem Building with autoconf/automake] and [wiki:Self:completesearch/CMakeBuildSystem Building with CMake] Must be sorted so that sort -c -k1,1 -k2,2n -k4,4n does not complain.
Line 33: Line 39:
[wiki:Self:completesearch/MinGW Compiling under MinGW] And a <name>.docs file, with lines of the form
Line 35: Line 41:
[wiki:Self:completesearch/ExcerptGenerator Excerpt Generator requirements] <doc id><TAB>u:<url of document><TAB>t:<title of document><TAB>H:<raw
text of document>
Line 37: Line 44:
[wiki:Self:completesearch/ExcerptGenerator/ThesisTopic Description for a Master's Thesis on Excerpt Generation] [wiki:Self:Projects/ExcerptGeneration Excerpt Generation Project Overview] Must be sorted so that sort -c -k1,1n does not complain.
Line 39: Line 46:
[wiki:Self:completesearch/Templates Template peculiarities in the CompleteSearch code] You find a very simple example under
http://www.mpi-inf.mpg.de/~bast/topsecret/example.tgz
Line 41: Line 49:
[wiki:Self:completesearch/CVSHistory CVS history (TODO: what's this; is it still used?)] 3. Build the word index
Line 43: Line 51:
[wiki:Self:completesearch/SyslogdAndLogrotate Using syslogd and logrotate to manage the server's log files] buildIndex HYB <name>.words
Line 45: Line 53:
[wiki:Self:completesearch/UsefulLiterature (Secondary) literature that might be useful] This produces the main index file <name>.hybrid needed for prefix search
(this is a binary file). It also produces the file <name>.vocabulary,
that provides the mapping from word ids to words (it's an ascii file,
you can just look at it).
Line 47: Line 58:
[wiki:Self:completesearch/FirefoxBugAbsentCursor Missing cursor on form fields (Firefox bug)] Note that by default, HYB is built with block of fixed sizes. It is more
efficient though to pass it an explicit list of block boundaries (-B
option). Let's talk about this more when efficiency becomes an issue for
you.
Line 49: Line 63:
[wiki:Self:completesearch/NotesToJavascript Problem including Javascript from external servers] 4. Build the doc index
Line 51: Line 65:
[wiki:Self:completesearch/CSSBoxModel The CSS Box Model] buildDocsDB <name>.docs
Line 53: Line 67:
[wiki:Self:completesearch/QuerySpecification Specification of queries (in German only)] This produces the file <name>.docs.DB which provides efficient mapping
from doc ids to documents. Needed if you want to show excerpts/snippets
from documents matching the query.
Line 55: Line 71:
[wiki:Self:completesearch/InitializationOfCompleteSearch The Initialization of CompleteSearch (in German only)] 5. Start server
Line 57: Line 73:
[wiki:Self:completesearch/WritingPortableCode Tips for writing portable code] startCompletionServer -Z <name>.hybrid
Line 59: Line 75:
[wiki:Self:completesearch/CompilingLinkingUnderWindows Compiling and linking against 3rd party libs under Windows (in German only)] This starts the server. If you run it without argument, it prints usage
information. The -Z argument lets the server run in the foreground, and
output everything to the console, which is convenient for testing.
Line 61: Line 79:
Introductions to testing with test frameworks:
[wiki:Self:completesearch/InstallingAndRunningGoogleTest GoogleTest] (the better one)
and
[wiki:Self:completesearch/InstallingAndRunningCppUnit CppUnit] (the father of the aforementioned)
6. Queries
Line 66: Line 81:
== HowTos == The server listens on the port you specified in step 6 (8888 by
default), and speaks HTTP. For example:
Line 68: Line 84:
[wiki:Self:completesearch/ApachePhpWindows Installing Apache + PHP under Windows to work with CompleteSearch] curl "http://localhost:8888/?q=die*&h=1&c=3"
Line 70: Line 86:
[wiki:Self:completesearch/SeleniumRC Testing with SeleniumRC] This will return the result as an XML, which should be self-explanatory.
Line 72: Line 88:
[wiki:Self:completesearch/ModPhpStartetExe Have a click on a link start a local application] Here is the list of parameters which you may pass along with the query
(q=...)
Line 74: Line 91:
[wiki:Self:completesearch/Examples Example programs etc.] h : number of hits
c : number of completions (of last query word, if you put a * behind it)
f : send hits starting from this one (default: 0)
en : number of excerpts per hit
er : size of excerpt
rd : how to rank the documents (0 = by score, 1 = by doc id, 2 = by word
id, append a or d for ascending or descending)
rw : how to rank the words (0 = by score, 1 = by doc count, 2 = by
occurrence count, 3 = by word id, 4 = by doc id, append a or d as above)
s : how to aggregate scores (expert option, ignore for the moment)
Line 76: Line 102:
[wiki:Self:completesearch/GettingStartedWithDocBook Getting Started With DocBook]


== ToDos ==

[wiki:Self:completesearch/TODO TODO list]

[wiki:Self:NewFeatures New Features that would be nice to have]
Jede Menge Doku auf http://search.mpi-inf.mpg.de/wiki/CompleteSearch

CompleteSearch

Old Wiki from the MPII (lots of detailed / internal information)

Quick Intro

Follow these steps to checkout the CompleteSearch code from our SVN, build it, build an index, run a server on that index, and ask queries to that server via HTTP. Don't be afraid, it's easy. If you have questions, send an email to <bast@informatik.uni-freiburg.de>.

0. Get source code

svn checkout http://vulcano.informatik.uni-freiburg.de/svn/completesearch/codebase Username: [ask us] Password: [ask us]

1. Compile

make all

This will build three binaries:

buildIndex buildDocsDB startCompletionServer

If you call any of these binaries without parameters you will get usage info with all the available options.

2. Input (to be produced by a suitable parser)

a <name>.words file, with lines of the form

<word><TAB><doc id><TAB><score><TAB><position>

Must be sorted so that sort -c -k1,1 -k2,2n -k4,4n does not complain.

And a <name>.docs file, with lines of the form

<doc id><TAB>u:<url of document><TAB>t:<title of document><TAB>H:<raw text of document>

Must be sorted so that sort -c -k1,1n does not complain.

You find a very simple example under http://www.mpi-inf.mpg.de/~bast/topsecret/example.tgz

3. Build the word index

buildIndex HYB <name>.words

This produces the main index file <name>.hybrid needed for prefix search (this is a binary file). It also produces the file <name>.vocabulary, that provides the mapping from word ids to words (it's an ascii file, you can just look at it).

Note that by default, HYB is built with block of fixed sizes. It is more efficient though to pass it an explicit list of block boundaries (-B option). Let's talk about this more when efficiency becomes an issue for you.

4. Build the doc index

buildDocsDB <name>.docs

This produces the file <name>.docs.DB which provides efficient mapping from doc ids to documents. Needed if you want to show excerpts/snippets from documents matching the query.

5. Start server

startCompletionServer -Z <name>.hybrid

This starts the server. If you run it without argument, it prints usage information. The -Z argument lets the server run in the foreground, and output everything to the console, which is convenient for testing.

6. Queries

The server listens on the port you specified in step 6 (8888 by default), and speaks HTTP. For example:

curl "http://localhost:8888/?q=die*&h=1&c=3"

This will return the result as an XML, which should be self-explanatory.

Here is the list of parameters which you may pass along with the query (q=...)

h : number of hits c : number of completions (of last query word, if you put a * behind it) f : send hits starting from this one (default: 0) en : number of excerpts per hit er : size of excerpt rd : how to rank the documents (0 = by score, 1 = by doc id, 2 = by word id, append a or d for ascending or descending) rw : how to rank the words (0 = by score, 1 = by doc count, 2 = by occurrence count, 3 = by word id, 4 = by doc id, append a or d as above) s : how to aggregate scores (expert option, ignore for the moment)

Jede Menge Doku auf http://search.mpi-inf.mpg.de/wiki/CompleteSearch

CompleteSearch: FrontPage (last edited 2017-03-19 13:30:19 by Hannah Bast)