Site Search Personas

Purpose

This document contains a list of ElasticPress.io Site Search Personas associated with common use cases for incorporating ElasticPress on various types of sites.

The steps and recommended configurations listed in this document should not be considered an exhaustive step-by-step installation guide. Rather, they represent best practices and high-level steps that can be helpful to follow while configuring and tuning search on various types of sites.

Site Search Persona: WooCommerce Store

Required Active Features: Post Search, WooCommerce

  • Post Search provides the base functionality for indexing and querying posts (of any post type) via ElasticPress/Elasticsearch.
  • WooCommerce provides the added functionality of integrating ElasticPress with WooCommerce’s various product filter widgets and blocks, as well as product taxonomy/archive pages.

Optional Active Features: Instant Results, Autosuggest, Protected Content, Documents

  • Instant Results provides real-time search and filtering using a direct API connection to ElasticPress.io.
  • Autosuggest provides typeahead results, which can be useful for product or documentation/support search for ecommerce stores.
  • Protected Content integrates with the WooCommerce Feature to provide ElasticPress indexing and search (in the Dashboard) of Orders. For larger stores where Order-based queries are slow or problematic, this Feature can be enabled to offload those queries to ElasticPress/Elasticsearch.
  • Documents enables indexing and search of PDFs, Microsoft Office files, and other similar documents. This can be useful for creating searchable manuals, product information sheets, and other supporting materials related to product sales and support.

Recommended Configuration Steps

  1. Ensure appropriate Features are activated for your desired use-case based on the recommendations above.
  2. In the Post Search Feature, make sure you select one of the Weighting By Date options related to products.

    ElasticPress Post Search Feature screenshot - Weighting By Date options
  3. (Optional) Highlighting can be enabled to add markup around the matching words in search results. This can be helpful in identifying to users where their results matched, but is entirely optional.
  4. Confirm the behavior of any existing WooCommerce Filter Blocks currently on the site. These blocks are now using ElasticPress/Elasticsearch to power their filter queries, so it is important to confirm results look appropriate.
  5. Configure the Weighting Engine’s Product post type to reflect the type of searching that happens on your site. For example, if product titles are frequently searched for, you might consider weighting the titles more heavily (say, 20 or above). You should also consider which fields might not be important to search, such as the author field. These can be unchecked in the Weighting Engine and will no longer be searched by ElasticPress. Consider whether to remove other fields such as the Description field, which can often contain extraneous information and create less-than-optimal search results. For example, a description that says “compatible with xxx, yyy, zzz parts” will match when a user searches for those three part names and those results may appear above the actual part itself.
  6. Ensure that other WooCommerce archive and landing pages (e.g. taxonomy archives) are functioning as expected, as these queries are now running through ElasticPress/Elasticsearch.
  7. If desired, add Synonyms in the WordPress Dashboard under ElasticPress -> Synonyms to map commonly-searched keywords to keywords used by the site.

Site Search Persona: News Publisher

Required Active Features: Post Search

  • Post Search provides the base functionality for indexing and querying posts (of any post type) via ElasticPress/Elasticsearch.

Optional Active Features: Instant Results, Autosuggest, Documents

  • Instant Results provides real-time search and filtering using a direct API connection to ElasticPress.io.
  • Autosuggest provides typeahead results, which can be useful for guiding readers to desired content, boosting engagement.
  • Documents enables indexing and search of PDFs, Microsoft Office files, and other similar documents. This can be useful for providing access to newspaper archives (often scanned into PDFs) or enable newsroom teams to archive and search story-related documents.

Recommended Configuration Steps

  1. In the Post Search Feature, consider enabling the Weight Results by Date option. This places more weight on more recent content, which can help surface recent and relevant stories over older and less timely ones.
  2. (Optional) Highlighting can be enabled to add markup around the matching words in search results. This can be helpful in identifying to users where their results matched, but is entirely optional.
  3. Consider adding weight to the Title, Author, and Excerpt fields in the Weighting Engine, which can help surface results with matching titles and content which mention search terms in the lede over those that reference them later in an article. Consider adding Categories and Tags as searchable fields so users looking for those terms will find appropriate matches.
  4. If desired, activating Autosuggest will provide typeahead functionality, which can boost reader engagement by helping users find content faster. NB: This step requires a full reindex as it adds a new field to the Elasticsearch mapping to handle partial matches in post titles.
  5. If needed, activating the Documents Feature provides searchability in common document formats. This can be useful in a newsroom context for searching archived newspaper editions.
  6. If desired, add Synonyms in the WordPress Dashboard under ElasticPress -> Synonyms to map commonly-searched keywords to keywords used by the site.

Site Search Persona: Archival Site/Intranet

Required Active Features: Post Search, Documents

  • Post Search provides the base functionality for indexing and querying posts (of any post type) via ElasticPress/Elasticsearch.
  • Documents enables indexing and search of PDFs, Microsoft Office files, and other similar documents. This is required to provide access to search for archival documents such as meeting notes and other legacy content.

Optional Active Features: Instant Results, Autosuggest, Protected Content

  • Instant Results provides real-time search and filtering using a direct API connection to ElasticPress.io.
  • Autosuggest provides typeahead results, which can be useful for guiding readers to desired content rapidly.
  • Protected Content enables searching through non-public content, which can be helpful for many archival/intranet sites (with gated access via user login).

Recommended Configuration Steps

  1. In the Post Search Feature, consider enabling the Weight Results by Date option. This places more weight on more recent content, which can help surface recent and relevant documents over older and less timely ones.
  2. Activate the Documents Feature to index PDFs, Microsoft Office files, and other similar documents. NB: when activating this feature, you may want to lower the number of Posts per Index Cycle as set in ElasticPress -> Settings. This number represents the number of records (posts or documents) that ElasticPress will try to sync with ElasticPress.io per HTTP request. Since documents can be quite large, the default of 350 can cause timeout issues. Consider setting this to 5 or even 1 if you experience issues during indexing.
  3. If desired, activate the Autosuggest Feature to provide typeahead functionality for search.
  4. If needed, activate Protected Content to index and search non-public content as text extracted via optical character recognition (OCR). This can be useful if the site operates in an intranet capacity with limited user access. NB: even if a site limits visitor access, creating a search experience that includes non-public content requires custom code in order to display non-public post status items outside of the WordPress Dashboard context. Additionally, when this feature is active, most archive lists and search results in the WordPress Dashboard will be powered by ElasticPress.
  5. Adjust weighting as needed in the Weighting Engine to ensure quality search results. For archival sites, some common improvements are:
    1. Including categories and tags in search results to expand document matches.
    2. If appropriate, unchecking all fields on non-Document post types to ensure that only documents will appear in search. NB: this can also be accomplished by creating a search bar limited to the Attachment custom post type (e.g. ?post_type=attachment).
    3. Enabling search in the Weighting Engine on the Content field of the Attachment post type will cause ElasticPress to search through the entirety of the uploaded document. While this might be useful in some cases, it can also cause a host of false positive results in other situations. The decision on whether to make this field searchable is highly dependent on what types of documents are being indexed and how they are being searched.
  6. If desired, add Synonyms in the WordPress Dashboard under ElasticPress -> Synonyms to map commonly-searched keywords to keywords used by the site.