Multiple terms: term1 term2
red apples
returns results with all terms like:
Fructose levels in red and green apples
Precise match in quotes: "term1 term2"
"red apples"
returns results matching exactly like:
Anthocyanin biosynthesis in red apples
Exclude a term with -: term1 -term2
apples -red
returns results containing apples but not red:
Malic acid in green apples
There are no results for your search term.
Network problems
We are sorry, but your search could not be completed due to network problems. Please try again later.
Server timeout
We are sorry, but your search could not be completed due to server timeouts. Please try again later.
Empty search term
You have applied the search with an empty search term. Please revisit and try again.
Too many requests
We are sorry, but we have received too many parallel search requests. Please try again later.
',
title: "Search tips",
});
$(document).click(function (e) {
let t = $(e.target);
let a = t && t.attr("data-toggle")!=="popover" && t.parent().attr("data-toggle")!=="popover";
let b = t && $(".popover").has(t).length===0;
if(a && b)
{
$('#templateSearchInfoBtn').popover('hide');
$('#modalSearchInfoBtn').popover('hide');
}
});
$('#templateSearchInfoBtn').on('shown.bs.popover', function () {
$("#templateSearchInfoClose").click(function(e){
$('#templateSearchInfoBtn').popover('hide');
e.stopPropagation();
e.stopImmediatePropagation();
return false;
});
})
$('#templateSearchResultModal').on('hidden.bs.modal', function(e) {
$('body').off('click', '#templateSearchResultContainer .paperlist-avatar img');
var pswpElement = document.querySelectorAll('.pswp')[0];
var gallery = null;
var paperListAvatar = [];
var paperListAvatarThumb = [];
$('.paperlist-avatar img').each(function(){
var webversion = $(this).attr('data-web');
var width = $(this).attr('data-width');
var height = $(this).attr('data-height');
var caption =$(this).attr('data-caption');
var figure = {
src:webversion,
w:width,
h:height,
title:caption
};
paperListAvatarThumb.push($(this)[0]);
paperListAvatar.push(figure);
});
$('body').on('click', '.paperlist-avatar img', function (e) {
if(paperListAvatarThumb.length === 0 && paperListAvatar.length === 0){
$('.paperlist-avatar img').each(function(){
var webversion = $(this).attr('data-web');
var width = $(this).attr('data-width');
var height = $(this).attr('data-height');
var caption =$(this).attr('data-caption');
var figure = {
src:webversion,
w:width,
h:height,
title:caption
};
paperListAvatarThumb.push($(this)[0]);
paperListAvatar.push(figure);
});
}
var target = $(this);
var index = $('.paperlist-avatar img').index(target);
var options = {
showHideOpacity:true,
bgOpacity:0.8,
index:index,
spacing:0.15,
getThumbBoundsFn: function(index) {
var thumbnail = paperListAvatarThumb[index];
var pageYScroll = window.pageYOffset || document.documentElement.scrollTop;
var rect = thumbnail.getBoundingClientRect();
return {x:rect.left, y:rect.top + pageYScroll, w:rect.width};
}
};
gallery = new PhotoSwipe( pswpElement, PhotoSwipeUI_Default,[paperListAvatar[index]],options);
gallery.init();
});
});
$('#templateSearchResultModal').on('hide.bs.modal', function(e) {
$("#templateRefineSearch").removeClass('d-block').addClass('d-none');
$("#refineSearchModalHide").removeClass('d-block').addClass('d-none');
$("#refineSearchModal").removeClass('d-none').addClass('d-block');
offset = INITIAL_OFFSET;
})
$(document).on("click", "#showMore", function(e){
offset+=INITIAL_OFFSET;
runSearchModal()
e.stopPropagation();
e.stopImmediatePropagation();
return false;
});
$(document).ready(function() {
$(document).on("click", "#refineSearchModal", function (e) {
$("#templateRefineSearch").removeClass('d-none').addClass('d-block');
$(this).removeClass('d-block').addClass('d-none');
$("#refineSearchModalHide").removeClass('d-none').addClass('d-block');
});
$(document).on("click", "#refineSearchModalHide", function (e) {
$("#templateRefineSearch").removeClass('d-block').addClass('d-none');
$(this).removeClass('d-block').addClass('d-none');
$("#refineSearchModal").removeClass('d-none').addClass('d-block');
});
$(document).on("click", "#modal_start_site_search", function (e) {
runSearchModal();
e.stopPropagation();
e.stopImmediatePropagation();
return false;
});
});
}
function runSearchModal()
{
var projectID = document.querySelector('meta[name="global_projectID"]').content;
var queryString = $('#library-filters').serialize();
var term = _searchTrimInput($('#modal_search_query').val());
term+='&'+queryString;
if(term.length > 0)
{
_sendAjax(projectID, term);
}
else
{
showError(2, 'Empty search term')
}
}
if(document.getElementById('search_query_solr'))
{
run();
}