This is an updated version of Martin Schrode's search.ini explained article. That article has not been updated since Opera 6, which is done here.
You don't like Opera's default queries? Well, it's your browser, change them, it's easy! What do you need? Nothing but a text editor and some time.
Basically, all you have to do, is edit search.ini (see EditingINIFiles to find it). Before you start, create a backup copy of the original search.ini file. Then start your favorite text editor (e. g., notepad on Windows; vim on Linux) and open search.ini. Have a look at the first (slightly edited) search entry.
1 ; This file is part of the Opera browser. 2 3 [Search Engine 1] 4 Name=&Google 5 URL=http://www.google.com/search?q=%s&num=%i 6 Query= 7 Key=g 8 Is post=0 9 Has endseparator=0 10 Encoding=utf-8 11 Search Type=0 12 Verbtext=17063 13 Position=-1 14 Nameid=0
Might look complicated at first, but it's not that hard to understand. I will try to explain what each line means.
1 ; This file is part of the Opera browser.
This is a comment. You can add comments to explain something but you can also comment-out searches you want to replace. If you want to comment out a search, put a semi-colon ; in front of each lines of this query.
3 [Search Engine 1]
This entry determines the order in which Opera will list the search entries in its dialogs, e. g., in Preferences or when right-clicking the personal bar.
Caution: Opera will use [Search Engine 1] and [Search Engine 2] when you use Super search. So it makes sense to list Super as [Search Engine 3], although you don't have to. You don't know what Super search is? Try it!
You can add up to 50 "normal" (customized) search entries (plus Hotclick entries), but it's easier to just replace one of existing 17 entries.
If you don't have a search.ini or an "empty" search.ini, only Google, AllTheWeb?, Super, and Find in page will get listed (that's probably a bug).
Opera won't add other built-in search engines (like Find in page) automatically if you add more than three search engines to your search.ini (that's probably another bug).
The list of Search Engines has to be ascending and must not contain any gaps. If the list is incomplete, all search entries after the last correct one will be missing in all dialogs.
If some of your Search Engines are listed in the Hotclick dialog and in Preferences but are not displayed on the Personal bar, it's because of missing Key entries.
This entry determines the name that Opera will use on its dialogs. It will also get displayed in the search field on the personal bar. The ampersand & denotes the mnemonic (some call it accelerator or shortcut key). The ampersand is also responsible for the underlined G in Google on some dialogs. I don't think you can use Alt+G anywhere to access Google but you can use G as accelerator on some dialogs.
This entry is the URL of the query. It will get displayed in the address bar after you execute the query. There are two parameters: %s and %i. %s will get replaced by the search string you enter in the search field on the personal bar (or the high-lighted word if you execute a query using the Hotclick or right-click menu), %i will get replaced by the Preferred number of search results per page or by zero 0 if you haven't set one up in the Preferences dialog. If you want to use %i and haven't set up a Preferred number of search results per page, make sure the search engine returns more than zero results.
So, if you wanted to change the google search to use a regional google, you would edit line 5 to read:
Note: If Is post=1 is set, you would put the query part in the Query= line. Read on to find out more.
This entry contains the query string. It will only get used if Is post=1 is set! In that case you would put the query part of the URL here. For Amazon.de, this could result in URL=http://www.amazon.de/exec/obidos/search-handle-form/, and Query=url=index%3Dbooks-de&field-keywords=%s&size=%i. The query part will not appear in the address bar after you execute the query because the query gets submitted using post. Since the Google example uses Is post=0, this setting has not been set.
This entry contains the Keyword. Entering g Opera will search for Opera using the Google search engine. If you use the Keyword as mnemonic in the Name, e. g., &Google, it's easier for you to remember them.
Keywords are case sensitive (Linux version only), that means you could use "Key=g" for Google and "Key=G" for something else. Keywords can indeed be words (Windows version only), so you could assign "Key=cnn" to a query to CNN and search CNN using "cnn Afghanistan Enron Bush Conspiracy".
Keywords have to be unique. Duplicates will be ignored.
If you leave the Key setting empty, this Search Engine and all subsequent engines (the latter might be a bug) will not get displayed on your Personal bar. This makes it possible to "hide" the Hotclick and Translation searches.
8 Is post=0
This entry determines how the query will get sent to the server. If Is post=0 the query string will get passed on in the URL and the query will get submitted using get. If Is post=1 the query string will not get passed on in the URL and the query will get submitted using post. If Is post=1 you will have to fill in the Query= line.
9 Has endseparator=0
If set, there will be a separator after the search entry on some dialogs. Separators group related items, e. g., on the left image, you will notice an end separators (horizontal rule) after Paperball.
This entry sets the character encoding of International characters in your search query. For example, if set to Encoding=utf-8, Opera would encode your query using Unicode UTF-8 encoding. If you were searching for g König, Opera would replace the umlaut ö and submit K%C3%B6nig instead. This setting depends on the search engine you are using. If you have problems with International characters, try changing this to Encoding=iso-8859-1 or some other settings. Have a look at the content of Encoding » in the View menu on the menu bar.
11 Search Type=0
Please be careful with this entry, since some Search Types have a special meaning:
Search Type 2: Super Search Search Type 12: Find in page Search Type 50: Hotclick Dictionary Search Type 51: Hotclick Encyclopedia Search Type 52: Hotclick Convert currency Search Type 100: Hotclick Translation English to French Search Type 100 to 116: Hotclick Translation ... to ... Search Type 117: Hotclick Translation Spanish to French
This entry refers to the language file. The corresponding string will be used to name the search engines in search fields. The standard value 17063 is the best choice:
17063 = "%s search"
In combination with for example Name=Google, this will result in:
Sets the position of the corresponding search field in the Personal bar. Choose -1 to hide it from the toolbar, or any non-negative integer n to make it visible at the (n+1)th position (counted from left to right).