To enable Search Query Logging, follow these steps within the Enterprise Vault Admin Console (VAC):
To disable Search Query Logging, follow the same steps but select OFF in step 4.
Note that for search requests that target multiple index volumes, the StructuredQuery and Velocity query logs will create a separate XML file for each index volume, while the Elasticsearch query logs will create just one JSON file.
Note also that a single search may target an archive with several index volumes of different types, and therefore it is not alarming for many different index query logs to be generated from a single search.
Once the Search Query Logging is enabled, squery_*.xml files are generated in the configured location when a search is performed. This file contains the basic structure of a search query in a format internal to Enterprise Vault. It has the search terms, the search fields and conditions specified in the search criteria.
Sample Search Criteria 1:
|
FIELD |
OPERATOR |
SEARCH TERMS |
|
Subject |
contains all of |
ratify eclipse suspend |
|
From |
contains any of |
bill |
|
Content |
contains phrase |
snowy adventure |
Search Query Log generated in the squery_*.xml:
Sample Search Criteria 2:
|
FIELD |
OPERATOR |
SEARCH TERMS |
|
Date |
is between |
From 01/05/2005 To 01/01/2012 |
|
Subject or Content |
contains any of |
good old days |
Search Query Log generated in the squery_*.xml:
true
true
false
and
date
2005-01-05T05:00:00Z
2012-01-02T04:59:59Z
or
text
"good"
any
text
"old"
any
text
"days"
any
The following examples, contained within the log file, can be used to understand the search query better:
Once the Search query logging is enabled the velreq_*.xml files are generated in the configured location when a search is performed. This file contains the complete structure of a search query that is passed to the 64-bit indexing engine. The following are some of the major information that can be found in the velreq file,
Sample Search Criteria 1:
|
FIELD |
OPERATOR |
SEARCH TERMS |
|
Subject |
contains all of |
ratify eclipse suspend |
|
From |
contains any of |
bill |
|
Content |
contains phrase |
snowy adventure |
Search Query Log generated in the velreq_*.xml:
Sample Search Criteria 2:
|
FIELD |
OPERATOR |
SEARCH TERMS |
|
Date |
is between |
From 01/05/2005 To 01/01/2012 |
|
Subject or Content |
contains any of |
good old days |
Search Query Log generated in the velreq_*.xml:
The main lines to focus in the log and understand the search query are:
Once the Search query logging is enabled the elasticsearchreq_*.xml files are generated in the configured location when a search is performed. This file contains the complete structure of a search query that is passed to the Elasticsearch indexing engine. The following are some of the major information that can be found in the velreq file,
|
FIELD |
OPERATOR |
SEARCH TERMS |
|
Subject |
contains all of |
ratify eclipse suspend |
|
From |
contains any of |
bill |
|
Content |
contains phrase |
snowy adventure |
{
"_source": false,
"from": 0,
"query": {
"bool": {
"filter": [
{
"term": {
"indexVolumeName": {
"value": "17845af6064c96b4c80b01c41ec244919_153"
}
}
}
],
"must": [
{
"bool": {
"must": [
{
"bool": {
"must": [
{
"bool": {
"must": [
{
"bool": {
"should": [
{
"match_phrase": {
"fields.text.subj": {
"query": "ratify"
}
}
},
{
"match_phrase": {
"fields.text.a_subj": {
"query": "ratify"
}
}
},
{
"match_phrase": {
"fields.textsearchable.a_subj": {
"query": "ratify"
}
}
}
]
}
}
]
}
},
{
"bool": {
"must": [
{
"bool": {
"should": [
{
"match_phrase": {
"fields.text.subj": {
"query": "eclipse"
}
}
},
{
"match_phrase": {
"fields.text.a_subj": {
"query": "eclipse"
}
}
},
{
"match_phrase": {
"fields.textsearchable.a_subj": {
"query": "eclipse"
}
}
}
]
}
}
]
}
},
{
"bool": {
"must": [
{
"bool": {
"should": [
{
"match_phrase": {
"fields.text.subj": {
"query": "suspend"
}
}
},
{
"match_phrase": {
"fields.text.a_subj": {
"query": "suspend"
}
}
},
{
"match_phrase": {
"fields.textsearchable.a_subj": {
"query": "suspend"
}
}
}
]
}
}
]
}
}
]
}
},
{
"bool": {
"must": [
{
"bool": {
"should": [
{
"match_phrase": {
"fields.textsearchable.wrdn": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.textsearchable.wrsm": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.textsearchable.wrot": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.textsearchable.frdn": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.textsearchable.frsm": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.textsearchable.frot": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.text.ppdn": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.textsearchable.ppsm": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.textsearchable.ppot": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.textsearchable.jrfm": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.textsearchable.jrpp": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.textsearchable.jaen": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.text.a_wrdn": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.textsearchable.a_wrdn": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.text.a_wrsm": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.textsearchable.a_wrsm": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.text.a_wrot": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.textsearchable.a_wrot": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.text.a_frdn": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.textsearchable.a_frdn": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.text.a_frsm": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.textsearchable.a_frsm": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.text.a_frot": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.textsearchable.a_frot": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.text.a_ppdn": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.textsearchable.a_ppdn": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.text.a_ppsm": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.textsearchable.a_ppsm": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.text.a_ppot": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.textsearchable.a_ppot": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.text.a_jrfm": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.textsearchable.a_jrfm": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.text.a_jrpp": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.textsearchable.a_jrpp": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.text.a_jaen": {
"query": "bill"
}
}
},
{
"match_phrase": {
"fields.textsearchable.a_jaen": {
"query": "bill"
}
}
}
]
}
}
]
}
},
{
"bool": {
"must": [
{
"bool": {
"should": [
{
"match_phrase": {
"fields.textsearchable.originalcont": {
"query": "snowy adventure"
}
}
},
{
"match_phrase": {
"fields.textsearchable.a_originalcont": {
"query": "snowy adventure"
}
}
}
]
}
}
]
}
}
]
}
}
]
}
},
"size": 100,
"sort": [
{
"fields.datetime.date": {
"order": "desc",
"unmapped_type": "date"
}
},
{
"fields.integer.snum": {
"order": "asc",
"unmapped_type": "integer"
}
}
],
"stored_fields": [
"fields.text.msgc",
"fields.integer.natc",
"fields.text.auth",
"fields.text.subj",
"fields.datetime.date",
"fields.integer.size",
"fields.textretrievable.tags",
"fields.text.ppdn",
"fields.text.dtyp",
"fields.text.pvid",
"fields.integer.snum",
"fields.textretrievable.vlid",
"fields.text._Vault.MsgType",
"fields.intretrievable.itemexpiry",
"fields.text.keys",
"tags.text._evtag.category",
"tags.text._evtag.inclusion",
"tags.text._evtag.exclusion"
],
"timeout": "600s",
"track_total_hits": true
}
Sample Search Criteria 2:
|
FIELD |
OPERATOR |
SEARCH TERMS |
|
Date |
is between |
From 01/05/2005 To 01/01/2012 |
|
Subject or Content |
contains any of |
good old days |
{
"_source": false,
"from": 0,
"query": {
"bool": {
"filter": [
{
"term": {
"indexVolumeName": {
"value": "17845af6064c96b4c80b01c41ec244919_153"
}
}
}
],
"must": [
{
"bool": {
"must": [
{
"bool": {
"should": [
{
"range": {
"fields.datetime.date": {
"gte": "2005-01-05T05:00:00Z",
"lte": "2012-01-02T04:59:59Z"
}
}
},
{
"range": {
"fields.datetime.a_date": {
"gte": "2005-01-05T05:00:00Z",
"lte": "2012-01-02T04:59:59Z"
}
}
},
{
"range": {
"fields.datetimesearchable.a_date": {
"gte": "2005-01-05T05:00:00Z",
"lte": "2012-01-02T04:59:59Z"
}
}
}
]
}
},
{
"bool": {
"should": [
{
"bool": {
"must": [
{
"bool": {
"should": [
{
"match_phrase": {
"fields.textsearchable.originalcont": {
"query": "good"
}
}
},
{
"match_phrase": {
"fields.text.subj": {
"query": "good"
}
}
},
{
"match_phrase": {
"fields.textsearchable.a_originalcont": {
"query": "good"
}
}
},
{
"match_phrase": {
"fields.text.a_subj": {
"query": "good"
}
}
},
{
"match_phrase": {
"fields.textsearchable.a_subj": {
"query": "good"
}
}
}
]
}
}
]
}
},
{
"bool": {
"must": [
{
"bool": {
"should": [
{
"match_phrase": {
"fields.textsearchable.originalcont": {
"query": "old"
}
}
},
{
"match_phrase": {
"fields.text.subj": {
"query": "old"
}
}
},
{
"match_phrase": {
"fields.textsearchable.a_originalcont": {
"query": "old"
}
}
},
{
"match_phrase": {
"fields.text.a_subj": {
"query": "old"
}
}
},
{
"match_phrase": {
"fields.textsearchable.a_subj": {
"query": "old"
}
}
}
]
}
}
]
}
},
{
"bool": {
"must": [
{
"bool": {
"should": [
{
"match_phrase": {
"fields.textsearchable.originalcont": {
"query": "days"
}
}
},
{
"match_phrase": {
"fields.text.subj": {
"query": "days"
}
}
},
{
"match_phrase": {
"fields.textsearchable.a_originalcont": {
"query": "days"
}
}
},
{
"match_phrase": {
"fields.text.a_subj": {
"query": "days"
}
}
},
{
"match_phrase": {
"fields.textsearchable.a_subj": {
"query": "days"
}
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
},
"size": 100,
"sort": [
{
"fields.datetime.date": {
"order": "desc",
"unmapped_type": "date"
}
},
{
"fields.integer.snum": {
"order": "asc",
"unmapped_type": "integer"
}
}
],
"stored_fields": [
"fields.text.msgc",
"fields.integer.natc",
"fields.text.auth",
"fields.text.subj",
"fields.datetime.date",
"fields.integer.size",
"fields.textretrievable.tags",
"fields.text.ppdn",
"fields.text.dtyp",
"fields.text.pvid",
"fields.integer.snum",
"fields.textretrievable.vlid",
"fields.text._Vault.MsgType",
"fields.intretrievable.itemexpiry",
"fields.text.keys",
"tags.text._evtag.category",
"tags.text._evtag.inclusion",
"tags.text._evtag.exclusion"
],
"timeout": "600s",
"track_total_hits": true
}
The content of this document is referenced in the Enterprise Vault 10.0 Indexing Key Topics. Do not make changes to this article. If you would like changes to be made to this content, use the Information Manager feedback feature. Alternatively, you can send an e-mail to the owner or the Enterprise Vault Knowledge Management team DL-ARC-KM.