Feature "Case-insensitive concept disambiguation"

From FindAndLearn::Cookbook
C0362864013
Jump to: navigation, search




Any Keyword/Concept can stand for different things/entities.

Handling within your MediaWiki[edit | edit source]

Implementation[edit | edit source]

Entities declare {{#set:lcHasEntityTitle={{lc:{{{HasEntityTitle}}}}}}} (see Help:lc) through Template:METADATA.

Display[edit | edit source]

A Keyword/Concept page then does #ask:[[lcHasEntityTitle::{{lc:{{PAGENAME}}}}]] in Template:KeywordListItem revealing the different EntityTypes that Keyword/Concept represents.

The aspect page Keywords displays disambiguations per keyword.

Handling throughout your domain[edit | edit source]

Implementation[edit | edit source]

"searchResultSpecials": [
    {
      "conditions": {
        "must": {
          "HasEntityType": [""]
        }
      },
      "actions": [
        {
          "requestType": "actionRequest",
          "title": "Disambiguation",
          "query": {
            "queryName": "must_match_directField",
            "params": {
              "index": "general",
              "directField": {
                "name": "HasEntityName",
                "value": ".search-result@@@hasentityname"
              }
            },
            "return": "hit"
          },
          "view": "disambiguation-for-entityname",
          "show_button": {
            "conditions": {
              "always": false
            }
          },
          "execute": true
        }
      ]
    }
  ]