Search Help
The search feature of this web site is built on the open-source Zend Search Lucene library (part of the Zend Framework). Zend Search Lucene is based on the full-featured Apache Lucene search engine. The search feature on this web site is very similar to any popular search engine (i.e. Google or Yahoo) and also supports 5 additional types of queries, namely Wildcard, Proximity, Fuzzy, Boolean and Grouping queries. Each type of query is summarized below (reference: Zend_Search_Lucene):
Wilcard Search Queries
Single and multiple character wildcard searches within single terms (but not within phrase queries) are supported.
To perform a single character wildcard search use the "?" symbol. To perform a multiple character wildcard search use the "*" symbol.
The single character wildcard search looks for a string that matches the term with the "?" replaced by any single character. For example, to search for "text" or "test" you can use the search:
te?t
Multiple character wildcard searches look for 0 or more characters when matching strings against terms. For example, to search for test, tests or tester, you can use the search:
test*
You can use "?", "*" or both at any place of the term:
*wr?t*
It searches for "write", "wrote", "written", "rewrite", "rewrote" and so on.
Fuzzy Search Queries
Fuzzy search queries are supported based on the Levenshtein Distance, or Edit Distance algorithm. To do a fuzzy search use the tilde, "~", symbol at the end of a Single word Term. For example to search for a term similar in spelling to "roam" use the fuzzy search:
roam~
This search will find terms like foam and roams. Additional (optional) parameters can specify the required similarity. The value is between 0 and 1, with a value closer to 1 only terms with a higher similarity will be matched. For example:
roam~0.8
The default that is used if the parameter is not given is 0.5.
Proximity Search Queries
This web site search supports finding words from a phrase that are within a specified word distance in a string. To do a proximity search use the tilde, "~", symbol at the end of the phrase. For example to search for a "Zend" and "Framework" within 10 words of each other in a document use the search:
"Zend Framework"~10
Boolean Search Queries
Boolean operators allow terms to be combined through logic operators. This search supports AND, "+", OR, NOT and "-" as Boolean operators.
AND, OR, and NOT operators and "+", "-" defines two different styles to construct boolean queries. You cannot mix these two styles in your search query.
If the AND/OR/NOT style is used, then an AND or OR operator must be present between all query terms. Each term may also be preceded by NOT operator. The AND operator has higher precedence than the OR operator.
AND
The AND operator means that all terms in the "AND group" must match some part of the searched field(s).
To search for documents that contain "PHP framework" and "Zend Framework" use the query:
"PHP framework" AND "Zend Framework"
OR
The OR operator divides the query into several optional terms.
To search for documents that contain "PHP framework" or "Zend Framework" use the query:
"PHP framework" OR "Zend Framework"
NOT
The NOT operator excludes documents that contain the term after NOT. But an "AND group" which contains only terms with the NOT operator gives an empty result set instead of a full set of indexed documents.
To search for documents that contain "PHP framework" but not "Zend Framework" use the query:
"PHP framework" AND NOT "Zend Framework"
&&, ||, and ! operators
&&, ||, and ! may be used instead of AND, OR, and NOT notation.
+
The "+" or required operator stipulates that the term after the "+" symbol must match the document.
To search for documents that must contain "Zend" and may contain "Framework" use the query:
+Zend Framework
-
The "-" or prohibit operator excludes documents that match the term after the "-" symbol.
To search for documents that contain "PHP framework" but not "Zend Framework" use the query:
"PHP framework" -"Zend Framework"
No Operator
If no operator is used, then the search behavior is defined by the "default boolean operator". This is set to OR by default which implies each term is optional by default. It may or may not be present within document, but documents with this term will receive a higher score.
To search for documents that requires "PHP framework" and may contain "Zend Framework" use the query:
+"PHP framework" "Zend Framework"
Grouping Queries
This search supports using parentheses to group clauses to form sub queries. This can be useful if you want to control the precedence of boolean logic operators for a query or mix different boolean query styles:
+(framework OR library) +php
This search supports subqueries nested to any level.