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.
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.
love paris
This will returns all the entries containing the terms love or paris.
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.
Here a list of examples and possibilities:
love paris
This will returns all the entries containing the terms love and paris.
paris -hate
This will returns all the entries containing the term paris without the term hate.
"Paris, I love you"
This will returns all the entries containing the expression Paris, I love you.
love category:paris
This will returns all the entries containing the term love filled in the category named paris.
paris tag:love
This will returns all the entries containing the term paris with the tag love.
paris author:john
This will returns all the entries containing the term paris writed by john.
paris or berlin
This will returns all the entries containing the term paris or berlin.
(paris or berlin) love
This will returns all the entries containing the terms paris or berlin with the term love.
((paris or berlin) and (tag:love or category:meet*)) girl -money
This will returns all the entries containing the terms paris or berlin with the tag love or filled under the categories starting by meet also containing the term girl excluding entries with the term money.
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.
The list of stop words is stored in the ZINNIA_STOP_WORDS setting.