Is it possible to sort search result using UTC meta tag in GSA - google-search-appliance

We have the following meta tag:
<meta name="date" value="2017-08-25T15:59:53.484Z"/>
Is it possible to sort search result using this tag? Or only the following list of formats is supported?
According to this link it is possible to define custom date format. Is it possible to configure document dates using UTC format?

Looking at the supported formats list %Y%m%d%H seems to be the one you should use since it results in purely numerical value that should be easy to sort.

Related

Elastic search Custom Sort with Nest Library

I have a data structure like:
And I want to do so sorting to the results based on the price but for a specific priceProfileId ex 1292
I am using the nest library for that and my query looks like as below:
But its not sorting?
Addition Information: About ItemPrice Mapping
One thing is instead of the Price.Value I changed to Price and used .Order(SortOrder.Descending
Correct Code:

Reference kibana's dashboard date range in custom search

Hello! Is it possible to reference dashboards date range inside a custom query or filter? eg:
somefield:[dashboard_ldate TO dashboard_hdate] Thank You!
This was covered on IRC. What you're looking for is adding a new index pattern to use the additional date fields.
Each visualization can use a different index pattern, so you can have a good mixture on a dashboard.

Using custom fields in freemarker

I am trying to print custom field in PDF template, got from a saved search with the naming syntax Bank Name(Custom). How to use this name in the freemarker pdf template ? I am not able to fetch the value using any of the below : subs.bankname where subs is the result of the saved search.
A NetSuite custom field is prefixed with "cust" (ie. custrecord, custentity, custbody, etc), so you need to find out the correct field's id in order to display it using the Freemarker syntax. Also, as "subs" is the result of a Saved Search, you might need to interact with all rows.
In your case it would be something like (to display the first row):
${subs[0].cust_bankname}
Or the following to interact with all rows:
<#list subs as sub>
${sub.cust_bankname}
</#list>
I hope it helps.

Elasticsearch date field: epoch millis input, string output?

Steps:
1. Define a date field in a mapping.
2. Insert a epoch millisecond (long) value into that field.
Can elastic search returns a string value (yyyy-MM-ddTHH:mm:SS) of that field for a search?
From what I understand of the date-format documentation of ElasticSearch, it will always accept a milliseconds-since-epoch input next to input in the format given by the format, and it will produce a String output using the (first) format given. If you don't provide a format, then the "date_optional_time" format will be used (yyyy-MM-dd’T'HH:mm:ss.SSSZZ).
If the time zone in there is a problem for you, you'd need to give ElasticSearch your intended format.
I don't have the code to hand, but in my testing I believe I managed to do the following:
I used the date formatter on the field and the query fields definition to do this:
curl -XGET 'http://localhost:9200/twitter/tweet/1?fields=title,date_field.date_time'
using the date formats specified here: http://www.elasticsearch.org/guide/reference/mapping/date-format/
If you want a full document returned, this may be onerous. In which case is it possible to use an alias 'view' mapping to get the result to return differently from your primary mapping? Possibly this has become a half-answer.

Google Search Appliance: Using entity recognition in tandem with document dates

Is it possible to use a defined entity as a document date for sorting?
I have created an entity which successfully shows up in dynamic navigation and also responds to the search:
inmeta:gsaentity_pubdate
I have entered a host pattern in the document dates section with a Locate Date In of Meta Tag, and Meta Tag Name of gsaentity_pubdate.
When checking the resulting search XML with sort=D:S:d1 or sort=D:L:d1, the results come back with no date:
<FS NAME="date" VALUE=""/>
I've come to the conclusion that it is not possible to use entity recognition-generated metadata in certain areas of the GSA as of firmware 7.0.
The getfields= parameter does not return gsaentity_ metadata fields in the results (except when using getfields=*, see Michael's comment); it only selects actual metadata fields from the original document. This indicates that there is a logical separation between these two types of metadata in the GSA, and type 2 metadata generated by entity recognition cannot be used in many places where type 1 metadata can.

Resources