Available Suggest Types
Suggest Type |
Description |
---|---|
Suggest from the index |
These take the result of an index query and build a suggest dictionary from a part of each hit. You can use this to either build a suggest dictionary
based on the whole index, by using "
|
Suggest from query reporting logs |
The option Query reporting suggest automatically builds a suggest dictionary from all stored query logs. These query logs also serve for search reporting (see Analyzing User Queries with Reporters). |
Suggest from a custom XML dictionary |
If you want to suggest dictionary from an external data source, use the Static XML suggest option:
In the Administration Console, add a Static XML suggest and give the path to the
XML file, prepending it with " The root node of
the XML file is
Each entry of the dictionary is defined by a
A suggest dictionary entry can contain alternative expressions. For example, if
you want to add synonyms (“resto” for “restaurants”), you can add a
Example: Here the Suggest query " <sugg:SuggestDictionary xmlns="exa:com.exalead.mot.suggest.v10"
maxEntries="3" subExpr="false" subString="false" > <sugg:SuggestDictEntry
entry="airport" score="1" display="Airport" /> <sugg:SuggestDictEntry
entry="air" score="2" display="Category:Air" /> <SuggestDictEntry
entry="airlines" score="3" display="Airlines"/> <sugg:SuggestDictEntry
entry="aircraft" score="4"/> <sugg:SuggestDictEntry entry="airelles"
score="1" /> <sugg:SuggestDictEntry entry="airpower" score="1" />
<sugg:SuggestDictEntry entry="trucpower" score="1" />
<sugg:SuggestDictEntry entry="restaurant" score="10">
<sugg:SuggestDictEntryAlternativeForm form="resto" score="2" />
</sugg:SuggestDictEntry> </sugg:SuggestDictionary>
Example with extra information: A Suggest dictionary entry can also contain a set
of extra information (a set of URL for example), stored in
<sugg:SuggestDictionary xmlns="exa:com.exalead.mot.suggest.v10"
maxEntries="3" subExpr="false" subString="false" > <sugg:SuggestDictEntry
entry="airport" score="1"> <sugg:SuggestDictEntryExtraInfo
info="http://www.c.com"/> <sugg:SuggestDictEntryExtraInfo
info="http://www.d.com"/> </sugg:SuggestDictEntry>
<sugg:SuggestDictEntry entry="air" score="2"/> <sugg:SuggestDictEntry
entry="airlines" score="3" /> <sugg:SuggestDictEntry entry="aircraft"
score="4"> <sugg:SuggestDictEntryKeyValue key="url.first"
value="http://www.a.com"/> <sugg:SuggestDictEntryKeyValue key="url.second"
value="http://www.b.com"/> </SuggestDictEntry> <sugg:SuggestDictEntry
entry="airelles" score="1" > <sugg:SuggestDictEntryExtraInfo
info="http://www.e.com"/> </sugg:SuggestDictEntry>
<sugg:SuggestDictEntry entry="airpower" score="1" />
<sugg:SuggestDictEntry entry="trucpower" score="1" />
</sugg:SuggestDictionary>
|
Suggest from a custom precompiled resource |
A static resource suggest takes an already-compiled suggest dictionary as a
parameter. This dictionary is loaded by the search server This suggest dictionary cannot be scheduled or built. |