Reindex programatically ais_search Indexed Sources
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2024 06:48 AM - edited 05-06-2024 06:50 AM
Due to some problems we are observing in some of our indexed sources, we see the necessity, to launch "Index Selected Tables" with some frequency manually.
We are wondering if, it is possible to run it via Scheduled Job, meanwhile we stabilize the traffic on this indexed source.
We were able to find the "Modal" which executes a GlideAjax Call to "AisConfigurationAjax", which, supossely, will call "AisConfigurationUtil", but since this code is protected, we can't guess which method in Server Side we need to call.
function index() {
var table = gel('table').value;
var gm = GlideModal.prototype.get('ais_index_single_table');
var sysId = gm.getPreference('sys_id');
var datasource = gm.getPreference('datasource');
if (!table) {
alert(new GwtMessage().getMessage("Please select a table to be indexed"));
return false;
}
var ga = new GlideAjax('AisConfigurationAjax');
ga.addParam('sysparm_name', 'indexSingleTableNoBlocking');
ga.addParam('sysparm_ais_datasource', datasource);
ga.addParam('sysparm_ais_table', table);
ga.getXML(function(response) {
var id = response.responseXML.documentElement.getAttribute("answer");
if (id) {
var url = '/ais_ingest_datasource_stats.do?sys_id='; url += id;
window.location = url;
}
// ...
If you can help us, it will be really useful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2024 08:44 AM
Hi @German Alvarez1
Were you able to find a way to schedule indexing? Or was there any other workaround?
I have a similar requirement as well. Will be helpful if I could get any idea.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2024 07:48 AM
Any Update on this question?
Were you able to find a way to schedule indexing? Or was there any other workaround?
I have a similar requirement as well. Will be helpful if I could get any idea.