Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For these examples, we use https://demo.datafari.com/ to illustrate another configuration and see how parameters can vary.

Empty search

Here is the default request sent to the Datafari API for an empty input in the search bar:

https://datafariui.datafari.com/Datafari/rest/v2.0/search/select q: *:* fl: title,url,id,extension,preview_content,last_modified,crawl_date,author,original_file_size,emptied,repo_source sort: score desc q.op: AND rows: 10 start: 0 aggregator: facet: true facet.field: {!ex=author}author facet.field: {!ex=repo_source}repo_source facet.field: {!ex=extension}extension facet.field: {!ex=entity_phone_present}entity_phone_present facet.field: {!ex=entity_special_present}entity_special_present facet.field: {!ex=language}language facet.field: {!ex=urlHierarchy}urlHierarchy facet.query: {!key=date__lastmodified_facet_0}last_modified:[NOW/DAY TO NOW] facet.query: {!key=date__lastmodified_facet_1}last_modified:[NOW/DAY-7DAY TO NOW/DAY] facet.query: {!key=date__lastmodified_facet_2}last_modified:[NOW/DAY-30DAY TO NOW/DAY-8DAY] facet.query: {!key=date__lastmodified_facet_3}last_modified:([1970-09-01T00:01:00Z TO NOW/DAY-31DAY] || [* TO 1970-08-31T23:59:59Z]) facet.query: {!key=date__lastmodified_facet_4}last_modified:[1970-09-01T00:00:00Z TO 1970-09-01T00:00:00Z]

Pay attention to the bold parameter in the query. This is the only parameter that will be modified when searching for one or several words.

See also facet.field parameters. The entity_phone_present and entity_special_present values reflect the new facets present in this Datafari. See below its ui-config.json:

...

titleExpand to see ui-config.json...

...

languagejson

...

See below its ui-config.json:

Expand
titleExpand to see ui-config.json...
Code Block
languagejson
{
  "left": [
    {
      "type": "QueryFacet",
      "title": "Modification Date",
      "queries": [
        "last_modified:[NOW/DAY TO NOW]",
        "last_modified:[NOW/DAY-7DAY TO NOW/DAY]",
        "last_modified:[NOW/DAY-30DAY TO NOW/DAY-8DAY]",
        "last_modified:([1970-09-01T00:01:00Z TO NOW/DAY-31DAY] || [* TO 1970-08-31T23:59:59Z])",
        "last_modified:[1970-09-01T00:00:00Z TO 1970-09-01T00:00:00Z]"
      ],
      "labels": ["Today", "From Yesterday Up To 7 days", "From 8 Days Up To 30 days", "Older than 31 days", "No date"],
      "id": "date__lastmodified_facet",
      "minShow": 5,
      "show": true,
      "variant": "children_only",
      "children": [
        {
          "type": "DateFacetModificationDateCustom"
        }
      ]
    },
    {
      "type": "FieldFacet",
      "title": "Authors",
      "field": "author",
      "op": "OR",
      "variant": "autocomplete",
      "minShow": 3,
      "maxShow": 15,
      "show": true
    },
    {
      "type": "FieldFacet",
      "title": "Source",
      "field": "repo_source",
      "typeop": "QueryFacetOR",
      "titleminShow": "Modification Date"2,
      "queriesmaxShow": [5,
      "show":  "last_modified:[NOW/DAY TO NOW]",true
    },
    {
    "last_modified:[NOW/DAY-7DAY TO NOW/DAY]  "type": "FieldFacet",
        "last_modified:[NOW/DAY-30DAY TO NOW/DAY-8DAY]"title": "Extension",
      "field":  "last_modified:([1970-09-01T00:01:00Z TO NOW/DAY-31DAY] || [* TO 1970-08-31T23:59:59Z])"extension",
      "op": "OR",
      "minShow": 3,
  "last_modified:[1970-09-01T00:00:00Z TO 1970-09-01T00:00:00Z]"
    "maxShow": 15
    },
     ],{
      "labelstype": ["TodayFieldFacet",
"From  Yesterday Up To 7 days"title",: "FromPhone 8numbers Dayspresent",
Up To 30 days", "Older than 31 days", "No date"]"field": "entity_phone_present",
      "idop": "date__lastmodified_facetOR",
      "minShow": 53,
      "showmaxShow": true 15
    },
    {
      "varianttype": "children_onlyFieldFacet",
      "childrentitle": ["Email addresses present",
      {
 "field": "entity_special_present",
        "typeop": "DateFacetModificationDateCustomOR",
      "minShow": 3,
}      "maxShow": ]15
    },
    {
      "type": "FieldFacet",
      "title": "AuthorsLanguage",
      "field": "authorlanguage",
      "op": "OR",
      "variant": "autocomplete",
      "minShow": 3,
      "maxShow": 15,
      "show": true
    },
    {
      "type": "FieldFacetQueryFacet",
      "title": "SourceCreation Date",
      "fieldqueries": "repo_source", [
       "op": "ORcreation_date:[NOW/DAY TO NOW]",
      "minShow": 2  "creation_date:[NOW/DAY-7DAY TO NOW/DAY]",
      "maxShow": 5  "creation_date:[NOW/DAY-30DAY TO NOW/DAY-8DAY]",
      "show": true
    }  "creation_date:([1970-09-01T00:01:00Z TO NOW/DAY-31DAY] || [* TO 1970-08-31T23:59:59Z])",
    {    "creation_date:[1970-09-01T00:00:00Z   "type": "FieldFacet",TO 1970-09-01T00:00:00Z]"
      "title": "Extension"],
      "fieldlabels": ["extensionToday", "From Yesterday Up To 7  "op": "OR"days", "From 8 Days Up To 30 days", "Older than 31 days", "No date"],
      "minShowid": 3"date_facet",
      "maxShowminShow": 15
5,
   },   "show": false,
 {       "typevariant": "FieldFacetchildren_only",
      "titlechildren": "Phone numbers present",[
        {
  "field": "entity_phone_present",       "optype": "ORDateFacetCustom",
      "minShow": 3, }
     "maxShow": 15]
    },
    {
      "type": "FieldFacetQueryFacet",
      "title": "EmailFile addresses presentsize",
      "fieldqueries": "entity_special_present", [
        "op": "OR"original_file_size:[0 TO 102400]",
      "minShow": 3  "original_file_size:[102400 TO 10485760]",
      "maxShow": 15
  "original_file_size:[10485760 TO *]"
   },   ],
 {       "typelabels": "FieldFacet["Less than 100 KB", "From 100 KB to 10 MB", "title": "Language"More than 10 MB"],
      "fieldid": "languagefilesize_facet",
      "opminShow": "OR"5,
      "minShowshow": 3false,
      "maxShowchildren": 15, [
        {
          "showtype": true "FileSizeFacetCustom"
        }
      ]
    },
    {
      "type": "QueryFacetHierarchicalFacet",
      "titlefield": "Creation DateurlHierarchy",
      "queriestitle": ["hierarchical facet",
       "show"creation_date:[NOW/DAY TO NOW]" false,
        "creation_date:[NOW/DAY-7DAY TO NOW/DAY]",
 "separator": "/"
    },
    {
      "type"creation_date:[NOW/DAY-30DAY TO NOW/DAY-8DAY]",
 : "AggregatorFacet",
      "title": "Aggregator facet",
      "show"creation_date:([1970-09-01T00:01:00Z TO NOW/DAY-31DAY] || [* TO 1970-08-31T23:59:59Z])": false
    }
  ],
  "center": {
    "creation_datemain":[1970-09-01T00:00:00Z TO 1970-09-01T00:00:00Z]" [
      {
 ],       "labelstype": ["TodayNotConnectedUser", "From 
Yesterday Up To 7 days", "From 8 Days Up To 30 days", "Older than 31 days", "No date"],    "displayNotConnectedUserWarning": true
      },
      {
        "idtype": "date_facetSearchInformation",
        "minShowdata": 5["filters", "facets"]
     "show": false},
      {
        "varianttype": "children_onlyResultsList",
        "childrendata": ["title", "url", "logo", "previewButton", "extract"],
    {    "folderLinkSources": ["enron"],
        "typefolderTarget": "DateFacetCustom_blank",
        "previewTarget": "_self"
  }    }
  ]  ]
  },
  "right": [
    {
      "type": "QueryFacetDirectLinksWidget",
      "title": "FileDirect sizeLinks",
      "queriesshow": [true,
        "original_file_size:[0 TO 102400]","visible": 1
    },
    "original_file_size:[102400 TO 10485760]",{
          "original_file_size:[10485760 TO *]"
      ]"type": "YellowPagesWidget",
      "labelstitle": ["Less than 100 KBYellow Pages",
"From  100 KB to 10 MB", show"More than 10 MB"]: true,
      "idvisible": "filesize_facet",1
    }
 "minShow": 5],
      "showsearchBar": false,{
      "childrensuggesters": [
        {
 
        "type": "FileSizeFacetCustomBASIC",
        "props": }{
      ]    "maxSuggestion": }5,
    {       "typetitle": "HierarchicalFacetSUGGESTED QUERIES",
          "fieldsubtitle": "urlHierarchy",Queries extending your current query terms"
 "title": "hierarchical facet",     },
 "show": false,       "separatoraggregator": "/"false
      },
      {
        "type": "AggregatorFacetENTITY",
        "titleprops": {
"Aggregator facet",          "showfield": false"entity_person",
    }   ],   "centersuggester": {
    "main": [
      {"suggestEntityAuthors",
          "typedictionary": "NotConnectedUsersuggesterEntityAuthors",
          "displayNotConnectedUserWarningasFacet": truefalse,
      },    "maxSuggestion": 5,
 {         "typetitle": "SearchInformationAuthors suggested",
          "datasubtitle": ["filters", "facets"]"Queries extending your current query terms"
      },  }
    {  }
    ]
 "type": "ResultsList" },
  "queryParams": {
    "datafields": [
      "title",
      "url",
      "logoid",
"previewButton      "extension",
"extract"],      "preview_content",
      "last_modified",
     "folderLinkSources": ["enroncrawl_date"],
      "author",
   "folderTarget":   "original_blankfile_size",
 
      "previewTargetemptied":,
"_self"       }"repo_source"
    ]
  },
  "righthotkeys": [
    {
 
    "typeactiveSearchBar": "DirectLinksWidget",{
      "titlecmd": "Direct Linksshift",
      "showkey": true"S",
      "visibleenable": 1false
    },
    "deactiveSearchBar": {
      "typecmd": "YellowPagesWidgetescape",
      "titleenable": "Yellow Pages",false
    }
  },
  "showexportResults": true,
{
     "visibleexcel": 1
 {
  }   ],   "searchBarminResults": {1,
    "suggesters": [
      {
        "type"maxResults": "BASIC"5000,
 
      "propsdefaultResults": {100
    }
  },
  "maxSuggestionssoForcedAuthentication": 5,{
          "title"enable": "SUGGESTEDfalse
QUERIES",  },
  "devMode": {
    "subtitleenable": "Queriesfalse,
extending your current query terms"banner":  {
      },
        "aggregator"location": false
      },
      {
"BOTTOM",
       "typecontent": "ENTITYDev mode banner content",
        "props": {
 
        "fieldbackgroundColor": "entity_personorange",
      }
   "suggester": "suggestEntityAuthors", }
  }
       "dictionary": "suggesterEntityAuthors",
          "asFacet": false,
          "maxSuggestion": 5,
          "title": "Authors suggested",
          "subtitle": "Queries extending your current query terms"
        }
      }
    ]
  },
  "queryParams": {
    "fields": [
      "title",
      "url",
      "id",
      "extension",
      "preview_content",
      "last_modified",
      "crawl_date",
      "author",
      "original_file_size",
      "emptied",
      "repo_source"
    ]
  },
  "hotkeys": {
    "activeSearchBar": {
      "cmd": "shift",
      "key": "S",
      "enable": false
    },
    "deactiveSearchBar": {
      "cmd": "escape",
      "enable": false
    }
  },
  "exportResults": {
    "excel": {
      "minResults": 1,
      "maxResults": 5000,
      "defaultResults": 100
    }
  },
  "ssoForcedAuthentication": {
    "enable": false
  },
  "devMode": {
    "enable": false,
    "banner": {
      "location": "BOTTOM",
      "content": "Dev mode banner content",
      "props": {
        "backgroundColor": "orange"
      }
    }
  }
}
}

Empty search

Here is the default request sent to the Datafari API for an empty input in the search bar:

https://datafariui.datafari.com/Datafari/rest/v2.0/search/select q: *:* fl: title,url,id,extension,preview_content,last_modified,crawl_date,author,original_file_size,emptied,repo_source sort: score desc q.op: AND rows: 10 start: 0 aggregator: facet: true facet.field: {!ex=author}author facet.field: {!ex=repo_source}repo_source facet.field: {!ex=extension}extension facet.field: {!ex=entity_phone_present}entity_phone_present facet.field: {!ex=entity_special_present}entity_special_present facet.field: {!ex=language}language facet.field: {!ex=urlHierarchy}urlHierarchy facet.query: {!key=date__lastmodified_facet_0}last_modified:[NOW/DAY TO NOW] facet.query: {!key=date__lastmodified_facet_1}last_modified:[NOW/DAY-7DAY TO NOW/DAY] facet.query: {!key=date__lastmodified_facet_2}last_modified:[NOW/DAY-30DAY TO NOW/DAY-8DAY] facet.query: {!key=date__lastmodified_facet_3}last_modified:([1970-09-01T00:01:00Z TO NOW/DAY-31DAY] || [* TO 1970-08-31T23:59:59Z]) facet.query: {!key=date__lastmodified_facet_4}last_modified:[1970-09-01T00:00:00Z TO 1970-09-01T00:00:00Z]

Pay attention to the bold parameter in the query. This is the only parameter that will be modified when searching for one or several words.

See also facet.field parameters. The entity_phone_present and entity_special_present values reflect the new facets present in this Datafari (refer to the ui-config.json provided above).

Response:

...

image-20240614-083343.png

In the detailed response below, you find the first 10 documents in the response.docs objects with response.numFound=14. This last value is used to display the number of pages. 10 documents because of the default number of rows to be retrieved, which you will find the value in parameter rows in the query.

...