Jump to content

Help:WSSearchFront

From mediawiki.org
Revision as of 14:35, 27 August 2021 by Robis Koopmans (talk | contribs)

The WSSearchFront extension is a front-end for WSSearch written in Vue.js

Configuration

The WSSearchFront extension must be configured using the WSSearchFrontend parser function

Example configuration:

{{#WSSearchFrontend:
|size=10
|clear=term
|sort options=Title, Version
|title=Version
    #label=Label for table
    #highlight=true
    #urlstring=search
|layout=table
|@Title
    #display=ask combobox
    #query=[[Class::+]]
    #data=Title
    #text=name
    #search=true
|@Service
    #translation=Name
    #query=[[Class::Service]]
|@Version
    #display=combobox
|@Dictum
    #logic=or
    #sort=alphabetically
|@Modification date
  	#display=datepicker
    #label=Date
|@Rating
  	#display=range
	  #max=5
  	#step=1
|@Year
  #display=range
  #max=20
  #type=date
|?Version
|?Class
    #label=Page type
    #display=pill
    #highlight=true
    #logic=or
|?Users
    #display=link
|?Image
    #display=image
    #label=Page image
|?Rating
    #display=template
    #template=Special rating
}}

Available configuration options

settings

parameter parameter values settings setting values description example
size <number> defines how many results are shown per page size=10
size options <number>, <number> if set a drop-down with the defined size options will be shown size options=10, 20, 50
title <property> property that will be used for the search results title and link title=Title

#highlight=true

#urlstring=search

#label <text> sets a label for the title column in table layout
#highlight true highlights the search term in the title
#urlstring <text> adds search terms as an url parameter named by the value to the links href
sort options <property>, <property> if set a drop-down with sort options will be shown, default results will be sorted by relevance, optional a label for the property to sort on can be set by adding text before the property devised by : sort options=Version, Page name:Title
<text>:<property>,<text>:<property>
layout table changes the layout for the search results to a table layout=table
clear term if set, the 'clear all filters' button also clears the search term clear=term

Search result settings

parameter settings setting values description example
?<property> #display image
link
pill
template
#label <text>
#highlight true

for display template add #template=<template> template, passes and to the template

Facets filter settings

parameter settings setting values description example
@<property> #display combobox
ask combobox
search
datepicker
range
sorted
#label <text>
#logic or set logic to or, needs 'post filter properties' setting in back-end WSSearchConfig
#sort alphabetically sorts the facets alphabetically
#translation <property>
ask combobox
#display=ask combobox
setting values description example
#query <ask> ask query
@Tags
  #display=ask combobox
  #ask=[[Class::Tag]]
  #data=Tag ID
  #text=Tag name
#data <property> property for options
#text <property> label for options
#search true searches for typed term on enter key
Sorted
#display=sorted
setting values description example
#query <ask> ask query
@Tags
  #display=sorted
  #ask=[[Tag::+]][[-Has subobject.Type::Search Tag]]
  #data=-Has subobject.Name
  #text=Tag name
#data <property> property to sort on
#text <property> property for display
Translation
#translation
setting values decription example
#query <ask> ask query
@Service
   #translation=Name
   #query=[[Class::Service]]
Range
#display=range
setting values description example
#max <number> maximum number of ranges
@Year
  #display=range
  #max=20
  #type=date
#step <number> step for range
#type date type for date ranges