Search Engines¶
Zinnia like almost all blogging systems contains a
search engine feature.
But in fact there are 2 search engines, a basic and an advanced, the advanced search engine is enabled by default, but if he fails the basic search engine will resume the job.
Basic Search Engine¶
The basic search engine is the original engine of Zinnia, and will be used if the advanced engine cannot be used.
It will always returns more results than the advanced engine, because each terms of the query will be searched in the entries and the results are added to a main result list. We can say that the results are inclusives.
- Example of a query :
love parisThis will returns all the entries containing the terms
loveorparis.
Advanced Search Engine¶
The advanced search engine has several possibilities for making more elaborated queries, with it’s own grammar system.
The grammar of the search is close to the main search engines like Google or Yahoo.
The main difference with the basic engine is that the results are exclusives.
For enabling the advanced search engine, you simply need to install the
pyparsing package. Otherelse the basic engine will be used.
Query examples¶
Here a list of examples and possibilities:
- Example of a query with terms:
love parisThis will returns all the entries containing the terms
loveandparis.- Example of a query with excluded terms:
paris -hateThis will returns all the entries containing the term
pariswithout the termhate.- Example of a query with expressions:
"Paris, I love you"This will returns all the entries containing the expression
Paris, I love you.- Example of a query with category operator:
love category:parisThis will returns all the entries containing the term
lovefilled in the category namedparis.- Example of a query with tag operator:
paris tag:loveThis will returns all the entries containing the term
pariswith the taglove.- Example of a query with author operator:
paris author:johnThis will returns all the entries containing the term
pariswrited byjohn.- Example of a query with boolean operator:
paris or berlinThis will returns all the entries containing the term
parisorberlin.- Example of e query with parenthesis:
(paris or berlin) loveThis will returns all the entries containing the terms
parisorberlinwith the termlove.- Complex example:
((paris or berlin) and (tag:love or category:meet*)) girl -moneyThis will returns all the entries containing the terms
parisorberlinwith the tagloveor filled under the categories starting bymeetalso containing the termgirlexcluding entries with the termmoney.
Note that the query is stripped of common words known as stop words. These are words such as on, the or which that are generally not meaningful and cause irrelevant results.