Enabling Elasticsearch in the Target Editor

Follow these steps to configure Elasticsearch for your server-based HTML5 target.

How to Enable Elasticsearch

  1. Open the target and click the Search tab.
  2. Click the drop-down in the Type field and select Elasticsearch.

  3. Configure the following options you need to enable Elasticsearch for your output.

    Search Results

    top

    Results per page

    You can change the number of search results that appear on each page. This makes it easier to navigate between pages of search results and improves loading times, especially for users who access output from a mobile device. Setting a reasonable number of results per page also makes it easier for search indexing services (i.e., spiders, crawlers, or bots) to locate pages in output, improving search results. You can set between 1-100 search results per page.

    Fragments per result

    This sets the number of fragments that contain the text of the searched item shown in the preview text. The fragment level can be set anywhere from 0-5. This applies to both search results and Autocompletion Types. For example, if you type in the word "Search" in the search bar, the search result extract might display like this:

    • "Search can be conducted from multiple locations. There are three types of searches that can be selected in the Target Editor. Use the search bar to locate the feature you want to use."
    • In this case, the Fragments Per Limit level is set to 3.

    Fragment character limit

    This sets the character limit of the fragment phrase used in the search.

    Include stop-words in search

    Flare has a hard-coded stop words list that works behind the scenes to filter out common structure-class words (i.e., function words) from search operations. This means the Flare search engine excludes words (e.g., "an," "for," "of," and "the") by default. If you want the search engine to search for queries with these words, you can include the stop words list in search. See Including Stop Words in Search.

    Partial word searching

    This allows part of a word to be searched in the target database. For example, the string "sear" could return results for "search." The Minimum word size field can be set from 3-10.See Enabling Partial-Word Search.

    Note Enabling this setting could increase the build time and the size of the search index for your target.

    Advanced Search Options

    top

    Include Importance (recommended)

    In HTML5 output, the Flare search engine uses a combination of factors to rank search results. The search engine considers the number of links to a topic (Importance) and the number of times a search term appears in a topic. This gives you the most accurate results. You can turn off Importance and search using only the number of search term hits in each topic. This is not recommended unless you have one topic that is linked too many times that it would skew your search results.See Setting Search Result Importance.

    Include fuzzy matches

    Fuzziness is when two words are spelled similarly and could be considered the same word.

    • Substitution: tabs could be construed as tags

    • Insertion: tab could be construed as table

    • Deletion: server could be construed as sever

    • Transposition: file could be construed as flies

    • Multiple edits: imeg > image. The first edit substitutes e for i. The second edit inserts e at the end of the string to find the word image.

    By enabling this setting, this allows the following fuzzy matches:

    • Zero edits for strings of one or two characters (i.e., to, by, on)

    • One edit for strings of three to five characters (i.e., rnu could be construed as run, hleps could be construed as helps)

    • Two edits for strings greater than five characters (i.e., sievrly could be construed as severely)

    Note Sometimes a search string is stemmed when displaying the search results. Stemming is when a word is reduced to its root. For example, say you enter a search criteria for "important." If this word is stemmed, then Elasticsearch may return fuzzy matches for "importing." This occurs because the initial search criteria has been stemmed to the root "import."

    Featured Snippets

    top

    Filter

    Select to control which pieces of micro content to include in the featured snippets area. See Micro Content and Featured Snippets.

    • Do not include in search results No micro content is included in the featured snippets area.

    • All micro content files Every phrase from all of your micro content files may be included.

    • Specific micro content files In the drop-down(s), choose one or more micro content files. Every phrase from those files may be included.

    • Micro content with meta tags In the additional drop-down(s), choose specific meta tag names and corresponding values. Micro content phrases that match may be included. For more details, see Meta Tags.

    Limit number of results

    Control the maximum number of micro content responses that are allowed to display in the featured snippets area. If you leave it set at 1, Flare displays only the best match from your micro content file(s); if you enter 3, Flare displays up to the best three matches (if that many exist).

    Knowledge Panel

    top

    Filter

    Select to control which pieces of micro content to include in the Knowledge Panel. See Micro Content and Knowledge Panel.

    • Do not include in search results No micro content is included in the Knowledge Panel area.
    • All micro content files Every phrase from all of your micro content files may be included.
    • Specific micro content files In the drop-down(s), choose one or more micro content files. Every phrase from those files may be included.
    • Micro content with meta tags In the additional drop-down(s), choose specific meta tag names and corresponding values. Micro content phrases that match may be included. For more details, see Meta Tags.

    Limit number of results

    Control the maximum number of micro content responses that are allowed to display in the Knowledge Panel. If you leave it set at 1, Flare displays only the best match from your micro content file(s); if you enter 3, Flare displays up to the best three matches (if that many exist).

    Auto-complete Results

    top

    Enabled

    This option enables the other options in this area. If this box is not checked, all of the other options in this area are disabled.

    Number of results

    This field sets the limit of personal searches that display in the drop-down while entering the search string. This can be set from a value of 1-25.

    Include project content

    This displays the topic title, the path of where the topic resides in your project, and the file name based on the search criteria. These results are displayed with a topic icon.

    Include search history

    This includes a mix of personal and global searches in the output.

    Global search threshold

    This threshold determines the minimum number of times a term must be searched from unique IP addresses before it becomes a global search term. This threshold can be set from a value of 0-10000.

    • Assuming that this field is set to a value of 50, if the term "autocompletion" is searched from 49 unique IP addresses on your HTML5 output, "autocompletion" does not become a global search term until that term is searched from a 50th unique IP address.

    Sitemap

    top

    Generate sitemap

    This box should be checked to generate the sitemap required for Elasticsearch on your output.

    Web URL

    This is the URL used for your published output.

    Administrator Tools

    top

    Target GUID

    This provides the key used to identify and link a target to the corresponding Elasticsearch index.

    Note Multilingual Elasticsearch publishing (see Single Language vs. Multilingual Outputs) requires all targets to use the same GUID. If the GUIDs in the targets are different, you might have empty targets on the portal or experience a publishing failing with error 400. If necessary, open targets in the Internal Text Editor to modify the GUID.

    Generate GUID

    This generates the key to be used by the target for the Elasticsearch index.

    Launch Content Services

    This opens the target in the content services portal. You can manage your targets, and search indexes in the portal. See Content Services Portal.

  4. Click Save the active file. to save your work.

Tip If you are producing different versions of your online output and using Elasticsearch, you probably want to create a target with a different name for each version. Then, generate a unique GUID for each of those targets.

The reason for this is that a search database/index is created for each output. If those outputs share the same GUID, all the outputs will share the same search results, which would could cause problems, because some outputs might have content that is not actually available in other outputs.

Also, the paths to the topics linked in search results are also stored in the index. If you change the path of a topic between the versions, the search result paths will also be wrong.