Querying an Index with Egothor.
Egothor is written in such a way as to recognized a number of different query forms. Here is a sample of various queries that range from simple keyword queries to queries with complex Boolean forms.
Just write keywords that are most characteristic to information you want to find.
Use a "+" for keywords that must be in pages the engine returns as hits. To exclude terms, use a "-".
You can use Boolean queries for precise querying.
Remember, you must use brackets around boolean queries. If you forget them, the engine will report a syntax error.
Example 3.3. Simple Boolean AND Query.
(hockey && nagano)
Return only pages containing both "hockey" and "nagano".
Example 3.4. Simple Boolean OR Query
(hockey || nagano)
Return pages that contain "hockey" or "nagano".
Example 3.5. Multiple Boolean Query
(czech && (hockey || nagano))
Return pages that contain "czech" and either "hockey" or "nagano".
Example 3.6. Simple Boolean NOT Query
(hockey - nagano)
Return pages containing "hockey" but not "nagano".
You may use a number of simple Boolean queries in one query.
Example 3.7. Long Boolean Query
(hockey && nagano) (atlas || cern)
This is (logically) equivalent to:
((hockey && nagano) || (atlas || cern))
but the relevance of hits may differ. The first sample is taken as "we have two boolean queries that are independent and both talking about the same thing...", but the second one means that the keywords are dependent.
It is possible to use simple queries within Boolean ones.
When you want hits with a particular phrase surround the phrase with curly braces.
Example 3.10. Phrase Syntax
This will find all occurences of "Charles University" and "University Charles".
When you want to allow up to n words between the two words, i.e. n=4, use square brackets to surround your query.
Egothor can apply a boost factor which will inform the engine that the searcher has more of an interest in one term over another when multiple queries are made. The boost factor can be any integer
You can limit your query to documents in a specific language. The language is gotten in indexing by reading a document's metadata. Multiple languages can be queried, and this form can be used in combination with all other forms.
Sometimes you want to know if a particular document resides in a particular webspace on a server. A query using this syntax will allow you to check just that.
|Chapter 3. Querying Your Index||Home||Querying via the Egothor Webapp|
|© 2003-2004 Egothor Developers|