Query expansion essentially adds additional search terms to the user's original query. For example, if you enable phonetic query expansion, the query exaleed will be expanded to "exaleed" OR "exalead".
Query expansion features are essential to help users entering their queries.
For more information about query expansion features, see "Configuring Query Expansion" in the Exalead CloudView Configuration Guide.
Spell check
You can enable your search logic to include spell-check, which suggests alternate words or expressions to replace the original user query. Spell-check suggestions are determined by a score. The score is calculated based on:
• First, the Damerau-Levenshtein transformation distance from the original word
• Second, the frequency of terms in your corpus.
The transformation distance is the number of changes (replace a letter, add a letter, transpose a letter, delete a letter) required to transform word A to word B. Each change represents a distance. The greater the transformation distance, the larger the difference between two words.
Synonyms
The Synonym expansion module adds alternative forms to user queries. For example, if the text prefix handler uses the synonyms module, the query: “db architect” expands to "db architect" OR"data base architect" OR"database architect".
Unlike the other query expansion modules, you must first compile your own synonym dictionary, also known as a resource file, that defines the possible synonyms for a particular expression.
Phonetization
Phonetization is the ability to search for alternative forms that sound like the original query word, for example (soundslike: exaleed).
Wildcard search is a pattern-matching feature enabled by default. It allows you to find documents that include "test", "tests" and "tesselation" when searching on "tes*". Additional configuration is available to fine-tune your results.
If Search > Search Logics > Query Expansion > Wildcard Search is enabled, wildcard search will be expanded using a dictionary generated from the corpus.
Search Suggest
The goal of search suggestion is to auto-complete the user’s query by providing relevant suggestions for what the user wants to search. In other words, it shows some of the terms associated with the beginning of the user search query.
Search suggest relies on precomputed dictionaries to offer efficient matching (millisecond-range, thousands of queries per second). It can be based on:
• Exalead CloudView index content – fetching the values of an index field or a category facet.
• Previously-performed queries.
• Custom dictionaries provided by the administrator.
Suggest dictionaries are recomputed periodically.
A suggest dictionary contains suggest entries. These entries are the suggestions to be made to the user. Each entry has a given score. The number of possible matches for a given input string is a fixed parameter when building a suggest. For each input string, only the N best matches can be returned.
Tutorial: Add Suggest on the Name Field
In this tutorial, we want to add suggest based on the name field from our sample sales database, so that when a user starts entering sl, we automatically suggest sleeveless shirt, sleeve shirt, and slim shorts.
For that, we need to build a suggest dictionary based on the content of the sales_name index field (see the Data Model > Advanced Schema tab for a listing of all index fields), and set up the Mashup UI to use this suggest data.
For more information, see "Adding Search Suggestions" in the Exalead CloudView Configuration Guide.
Build a Suggest Dictionary
1. In the Administration Console, select Search > Suggest.
2. Click Add suggest:
a. For Name, type, for example, name_suggest.
b. For Type, select Index field suggest.
c. Click Accept.
3. In the configuration options for this new suggest, click in the Index field and select sales_name from the list.
4. We want to find matches not only for the first word of the name value, but for each word:
a. Expand Build options.
b. Select Subexpr matching.
5. Click Apply.
Now that you have declared the suggest, you must precompile data for efficient lookup.
6. Under Suggest status, click Build now.
Now, we need to add the suggest to the Mashup UI.
Add the Suggest to the Mashup UI
1. In Mashup Builder, go to a page using a search form widget. For example, the /index page, which uses the Standard Search Form widget.
2. Click the widget header to display its properties panel.
3. On the Suggest tab, complete the following:
a. Select Enable suggest.
b. For Suggest Name, click inside the field.
c. From the dynamic list that displays on the left, select the suggest service.
Note:
If you do not see the suggest you just created, refresh the list.
4. Repeat these steps for the /search page.
5. Click Apply.
Test the Suggest in the Mashup UI
1. Go to the Mashup UI, and refresh the search page.
2. Start entering sl in the Search box.
The search box suggests all the available values that start with sl.
Note: If you do not see the following suggestions, empty your browser cache.