Islandora / advanced_search

This module creates several blocks to support searching. It also enables the use of Ajax with search blocks, facets, and search results.
https://www.drupal.org/project/advanced_search
GNU General Public License v2.0
3 stars 9 forks source link

Search Use Cases for Doris #12

Open kstapelfeldt opened 2 years ago

kstapelfeldt commented 2 years ago
  1. Search for a word in the simple search box (at the top) and items where the term appears in metadata (for example, title) will appear first in the list.
  2. Relevance is a sorting field in the drop-down menu
  3. Advanced Search is either a separate page OR a block in the search view, but not both.
  4. Searching is "Fuzzy" - 'dor' brings back 'doris', 'MacCarthy' brings back 'McCarthy', 'Moderna' brings back 'Modena'

Resource:

kylehuynh205 commented 2 years ago

Comparison chart between Dismax, the eDismax vs Copyfield;

Use Cases Dismax eDismax Copyfield
Case insensitive Need modification in Solr config (Nat's work) Need modification in Solr config (Nat's work) Work by default
Wildcard (* and ?) By default dismax doesn't support wildcard characters (https://solr.apache.org/guide/6_6/the-dismax-query-parser.html#TheDisMaxQueryParser-TheqParameter) To solve this, added logic to check if there is wildcard characters, establish search field instead -- implemented as workaround instead of a solution By default eDismax support all Luncene search by default (include wildcard), so it works by default Work by default
Fuzzy Search Doesn't support by defaut (https://stackoverflow.com/questions/30909106/fuzzy-search-not-working-with-dismax-query-parser) - no workaround found By default eDismax support all Luncene search by default (include Fuzzy search), but need to apply a small logic of adding '~' at the end of keyword query Work by default, the intollerence of mistakes as not as good as eDismax
Relevance Sort work as default but dismax has ability to add custom boost field (ie. title, then description) work as default but edismax has ability to add custom boost field (ie. title, then description) work as default but no custom boost field

Since the eDismax can work with boolean search, plus mixed with field searching (example below), the "winner" so far is eDismax

Example of boolean search (mixed between edismax with field search): https://doris2.digital.utsc.utoronto.ca/search-results?type=dismax&a%5B0%5D%5Bf%5D=all&a%5B0%5D%5Bi%5D=IS&a%5B0%5D%5Bv%5D=maccarthy&a%5B1%5D%5Bc%5D=AND&a%5B1%5D%5Bf%5D=genre&a%5B1%5D%5Bi%5D=IS&a%5B1%5D%5Bv%5D=invitations&a%5B2%5D%5Bc%5D=AND&a%5B2%5D%5Bf%5D=fulltext_title&a%5B2%5D%5Bi%5D=IS&a%5B2%5D%5Bv%5D=Phillip%20K.%20Wood%20Gallery https://doris2.digital.utsc.utoronto.ca/search-results?a%5B0%5D%5Bf%5D=all&a%5B0%5D%5Bi%5D=IS&a%5B0%5D%5Bv%5D=modena&a%5B1%5D%5Bc%5D=AND&a%5B1%5D%5Bf%5D=title&a%5B1%5D%5Bi%5D=IS&a%5B1%5D%5Bv%5D=31C%20Via%20Modena

Note:

However, there is warning about edimax which may cause less result or no results or exception when come to site with multiple languages. We can re-valuate the use case when we encounter with site with multilanguages. https://www.drupal.org/docs/contributed-modules/search-api-solr/solr-query-parsers https://www.drupal.org/project/search_api_solr/issues/2948469