Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
excludeclass
maxLevel6
minLevel1maxLevel6
include
outlinefalse
indent
exclude
stylenone
typelist
printabletrue
class

Query description

The Search Query is sent when searching in Datafari and pressing the “Enter” key or clicking on the magnifying glass:

...

Parameter

Value

Description

Data Type

q

User input (default: *:*)

The user input from search bar.

When the user does not enter any term in the search bar, use the default value “*:*” to retrieve all documents indexed in Datafari.

String

fl

List from ui-config.json

Used to display items on the search page about the document, like title, preview content, url, etc...

The list of values from "queryParams": { "fields": [ ] } in the configuration file: ui-config.json. The default values in this file are:

Code Block
languagejson
  "queryParams": {
    "fields": [
      "title",
      "url",
      "id",
      "extension",
      "preview_content",
      "last_modified",
      "crawl_date",
      "author",
      "original_file_size",
      "emptied",
      "repo_source"
    ]
  },

String

sort

score desc

Fixed value to sort the result list of documents.

String

q.op

AND

Fixed value that configure the type of search in Solr.

String

rows

10

Number of documents retrieved by the query. Fixed value.

number

start

Computed value

Is used to retrieve next page of result list. The search query must be sent with a value computed as follow: page_index * rows.

image-20240611-131205.png

Starts with 0. To have the first result page start=0, then second page is start=1*10, etc…

number

aggregator

From ui-config.json

The value of this parameter must be retrieved from this object in the ui-config.json file:

image-20240611-131738.png

“aggregator” value from searchBar.suggesters[x].type=”BASIC”.aggregator.

boolean

facet

true

Always true for filtering results with facet selections.

boolean

facet.field

{!ex=field_name}field_name

made from ui-config.json

This parameter is used for result arrangement into categories (Solr functionality).

It is made with all objects of type FieldFacet and the object of type HierarchicalFacet in ui-config.json:

image-20240612-081611.png

All objects left[x].type="FieldFacet" and left[x].type="HierarchicalFacet" are used to create parameters facet.field={!ex=field_name}field_name. field_name = left[x].type="FieldFacet".field.

With the current ui-config.json content the parameters to generate are:

Code Block
&facet.field={!ex=author}author
&facet.field={!ex=repo_source}repo_source
&facet.field={!ex=extension}extension
&facet.field={!ex=language}language
&facet.field={!ex=urlHierarchy}urlHierarchy

String multiple

facet.query

{!key=id_index}query

made from ui-config.json

This parameter is used for result arrangement into categories (Solr functionality).

It is made with one object of type QueryFacet in ui-config.json:

image-20240612-095806.png

The object left[x].id="date__lastmodified_facet"is used to create multiple parameters: facet.query={!key=id_index}query. To do this, browse the "queries" table of the object.

  • id: date__lastmodified_facet

  • index: an index for making the “key” unique. Start with 0.

  • query: is a query item in "queries" table.

String multiple

...

facet_fields : This object is linked to "FieldFacet" objects in ui-config.json. It is used to fill the corresponding facets on the result page (7-Facets). Each item of this object is as follow:

...

“field” will have the value of “field” attribute of the "FieldFacet" object in ui-config.json (i.e. left[x].type="FieldFacet")). For example, it is "extension" with this defined in ui-config.json:
"left": [ ...
{
"type": "FieldFacet",
"title": "Extension",
"field": "extension",
"op": "OR",
"minShow": 3,
"maxShow": 15
}, ...
]

...