var SEARCH_TEMPLATES = SEARCH_TEMPLATES || {}; SEARCH_TEMPLATES.JURISDICTION_DROPDOWN = ''; SEARCH_TEMPLATES.CASELAW_COLLECTION_DROPDOWN = ''; SEARCH_TEMPLATES.DATE_DROPDOWN = ''; SEARCH_TEMPLATES.TOPICS_DROPDOWN = ''; SEARCH_TEMPLATES.SORT_DROPDOWN = ''; SEARCH_TEMPLATES.TREATMENT_DROPDOWN = ''; SEARCH_TEMPLATES.TYPE_MENU = ''; SEARCH_TEMPLATES.FIELDS_VIEW_TERM_ID = '
placeholder="<%= placeholder %>" aria-label="<%= placeholder %>" <% } else { %> placeholder="Case name, document title, file number, author or citation" aria-label="Search for Case name, document title, file number, author or citation" <% } %> value="<% if(id != null) { print(id.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """)); } %>" />
'; SEARCH_TEMPLATES.FIELDS_VIEW_TERM_TEXT = '
'; SEARCH_TEMPLATES.NOTE_UP = '<% _.each(noteups, function(noteUpValue) { %>
<% if(typeof noteUpValue != "undefined" && _.first(noteups) == noteUpValue) { %>
<% } else if(_.size(noteups) != 0) { %> <% } %> <% if(noteUpValue.isLegislation == true) { %>
<% if(typeof noteUpValue != "undefined") { %> <% } else { %> <% } %>
<% } else if(noteUpValue.isJudgment == true) { %>
<% if(typeof noteUpValue != "undefined") { %> <% } else { %> <% } %>
<% } else { %>
<% if(typeof noteUpValue != "undefined") { %> <% } else { %> <% } %>
<% } %>
<% }) %>
<% if(_.size(noteups) != 0) { %>
<% if(typeof noteUpValue != "undefined" && _.first(noteups) == noteUpValue) { %>
<% } else if(_.size(noteups) != 0) { %> <% } %>
<% if(typeof noteUpValue != "undefined") { %> <% } else { %> <% } %>
<% } else { %><% if(typeof noteUpValue != "undefined") { %> <% } else { %> <% } %> <% } %>
'; SEARCH_TEMPLATES.LEGISLATION_COLLECTION_DROPDOWN = ''; SEARCH_TEMPLATES.RESET = 'Clear filters'; SEARCH_TEMPLATES.VERSION_DROPDOWN = ''; SEARCH_TEMPLATES.DOCTRINE_WORK_TYPE_DROPDOWN = ''; SEARCH_TEMPLATES.DOCTRINE_SUBJECT_DROPDOWN = ''; SEARCH_TEMPLATES.DOCTRINE_DATE_DROPDOWN = ''; SEARCH_TEMPLATES.DOCTRINE_COLLECTION_DROPDOWN = ''; SEARCH_TEMPLATES.RESULTS = '<% if(results == undefined) { %>

Press Enter to search

<% } else if(results.length == 0) { %>

Your search did not match any documents.

Suggestions: <% } else { %>
    <% _.each(results, function(result) { %> <% if(result.templateName == "CanliiCaselawIndexedResult.ftl") { %>
  1. id="firstHit" <% } %>>
    <%= result.resultNumber %>.
    <% let withTz = new Date(Date.parse(result.firstSyncDate)); %> <% let fullLink = result.path + "?resultId=" + result.uUId + "&searchId=" + searchId; if(result.searchUrlHash != undefined && result.searchUrlHash != null && result.searchUrlHash !== "") { fullLink += "&searchUrlHash=" + result.searchUrlHash; } %>
    " data-lbh-noteup-origin="<%= result.path %>" data-lbh-noteup-url="<%= window.location.origin %>/<%= getLanguage() %>/#search/origin1=<%= result.path %>" >
    lang="<%= result.documentLocaleIfDifferent %>"<% } %>> <%= result.title %><% if(result.reference != null && result.reference !== "") { %>, <%= result.reference %><% } %><% if(result.popularTitle != null && result.popularTitle !== "") { %> [<%= result.popularTitle %>]<% } %> <% for (var i = 0; i < result.viibesFields.discussionWeight; i++) { %><% } %><% if(result.viibesFields.hasCriticizingNoteup == true) { %><% } %> <% if(result.viibesFields.discussionWeight != null && result.viibesFields.discussionWeight != 0) { %>Discussion intensity <%= result.viibesFields.discussionWeight %><% } %> <% if(result.viibesFields.hasCriticizingNoteup == true) { %>Unfavourable mention present<% } %><% if(result.parentPath != undefined && result.parentPath != null && result.parentPath !== "") { %> <% var compactOrigin = result.parentPath; %><% } else { %> <% var compactOrigin = result.path; %><% } %> <% if(result.citationCount != 0) { %> <% } %>
    <%= result.collectionTitle %> — <%= result.jurisdictionTitle %>
    <% if(result.parentPath != undefined && result.parentPath != null && result.parentPath !== "") { %> <% var origin = result.parentPath; %><% } else if(result.origin != undefined && result.origin != null && result.origin !== "") { %> <% var origin = result.origin; %><% } else if(result.id != undefined && result.id != null && result.id !== "") { %> <% var origin = result.id; %><% } else { %> <% var origin = result.path; %><% } %>
    <% if(result.judgmentDate != undefined && result.judgmentDate != null) { %> <%= result.judgmentDate %> <% } %> <% if(result.pagesCount != undefined && result.pagesCount != null && result.pagesCount != 0) { %> <% if(result.judgmentDate != undefined && result.judgmentDate != null) { %>  |  <% } %> <%= result.pagesCount %> page<% if(result.pagesCount != 1) { %>s<% } %> <% } %> <% if(result.citationCount != 0) { %> <% if((result.judgmentDate != undefined && result.judgmentDate != null) || (result.pagesCount != undefined && result.pagesCount != null && result.pagesCount != 0)) { %>  |  <% } %> cited by <%= result.citationCount %> <% if(result.citationCount == 1) { %>document<% } else { %>documents<% } %> <% } %>
    <% if(result.relatednessFields != null) { %> <% if(result.relatednessFields.scoreOnly == true) { %>
    score: <%= result.relatednessFields.rScore %>
    <% } else { %>
    score: <%= result.relatednessFields.rScore %>
    relatedness score: <%= result.relatednessFields.rRelatednessScore %>
    explain:
    <%= result.explain %>
    count: <%= result.relatednessFields.rCount %>
    fp: <%= result.relatednessFields.rForegroundPopularity %>
    bp: <%= result.relatednessFields.rBackgroundPopularity %>
    xgboost: <%= result.relatednessFields.rXgboostScore %>
    pct query: <%= (result.relatednessFields.totalCitingNumCount / result.relatednessFields.foreTotalNumCount * 100).toFixed(1) %>% (<%= result.relatednessFields.totalCitingNumCount %> / <%= result.relatednessFields.foreTotalNumCount %>)
    pct citations: <%= (result.relatednessFields.totalCitingNumCount / result.relatednessFields.totalCount * 100).toFixed(1) %>% (<%= result.relatednessFields.totalCitingNumCount %> / <%= result.relatednessFields.totalCount %>)
    <% if(result.resultNumber == "1") { %>
    canliiQuery: <%= result.relatednessFields.canliiQuery %>
    relatednessQuery: <%= result.relatednessFields.relatednessQuery %>
    conjunctionQuery: <%= result.relatednessFields.relatednessConjunctionQuery %>
    finalQuery: <%= result.relatednessFields.relatednessFinalQuery %>
    <% } %>
    <% } %><% } %> <% if ((result.keywords != null && result.keywords !== "") || (_.size(result.topics) != 0)) { %> <% if (result.keywordsType === "LEGACY" || result.keywordsType === "MANUAL") { %>
    lang="<%= result.documentLocaleIfDifferent %>"<% } %> aria-label="Keywords"><%= result.keywords %>
    <% if(_.size(result.topics) != 0) { %>
    <% _.each(result.topics, function(topic, index) { %> lang="en"<% } %> aria-label="Subject" class="name badge badge-pill"><%= topic %> <% }) %>
    <% } %> <% } else if (result.keywordsType.startsWith("LEXKEY")) { %>
    <% var splittedKeywords = result.keywords.split("|"); %> <% _.each(splittedKeywords, function(keyword, index) { %> lang="<%= result.documentLocaleIfDifferent %>"<% } %> aria-label="Keywords"><%= keyword %> AI experiment
    <% }) %>
    <% if(_.size(result.topics) != 0) { %>
    <% _.each(result.topics, function(topic, index) { %> lang="en"<% } %> aria-label="Subject" class="name badge badge-pill"><%= topic %> <% }) %>
    <% } %> <% } else if (result.keywordsType === "LLM") { %>
    AI-generated <% if(result.shortSummary != null && result.shortSummary !== "") { %>

    <%= result.shortSummary %>

    <% } %><% if(_.size(result.topics) != 0) { %>
    <% _.each(result.topics, function(topic, index) { %> lang="en"<% } %> aria-label="Subject" class="name badge badge-pill"><%= topic %> <% }) %>
    <% } %>
    <% var splittedKeywordLines = result.keywords.split("|"); %> <% _.each(splittedKeywordLines, function(keywordLine, index) { %>

    <% var splittedKeywords = keywordLine.split(" — "); %> <% _.each(splittedKeywords, function(keyword, index2) { %> <% if(index2 === 0) { %> <%= keyword %><% if(index2 !== (splittedKeywords.length -1)) { %> — <% } %> <% } else { %> <%= keyword %><% if(index2 !== (splittedKeywords.length -1)) { %> — <% } %> <% } %> <% }) %>

    <% }) %>
    <% } %> <% } %> <% if(result.snippet != null && result.snippet !== "") { %>
    lang="<%= result.documentLocaleIfDifferent %>"<% } %>> <%= result.snippet %>
    <% } %> <% if((result.keywordsType !== null && result.keywordsType === "LLM") || (result.snippet != null && result.snippet.includes("show-more snippet"))) { %>
    Show more
    <% } %>
  2. <% } else if (result.templateName == "CanliiDoctrineIndexedResult.ftl") { %>
  3. id="firstHit" <% } %>>
    <%= result.resultNumber %>.
    data-lbh-source="canlii-connects" data-lbh-external-path="<%= window.location.origin %><%= result.url %>" <% } %> data-lbh-document-url="<%= window.location.origin %><% if(result.isExternal == true) { %><%= result.url %><% } else { %><%= result.path %><% } %>" data-lbh-path="<% if(result.isExternal == true) { %><%= result.url %><% } else { %><%= result.path %><% } %>" data-lbh-title="<%= result.contributionTitle %>" data-lbh-citation="<%= result.citation %>" data-lbh-lang="<%= result.lang %>" data-lbh-first-sync-date="<%= result.formattedPubDate %>" data-lbh-authors="<%= result.authors %>" data-lbh-publisher="<%= result.publishers %>" data-lbh-keywords="<%= result.keywords %>" data-lbh-subjects="<%= result.subjects.join(" — ") %>" data-lbh-related-path="<%= result.bookUrl %>" data-lbh-noteup-origin="<%= result.citation.split(" ").join("") %>" data-lbh-noteup-url="<%= window.location.origin %>/<%= getLanguage() %>/#search/origin1=<%= result.citation.split(" ").join("") %>" >
    lang="<%= result.documentLocaleIfDifferent %>"<% } %>> <% if(result.isExternal == true) { %> <%= result.title %> page.commentary.external <% } else { %> <%= result.title %><% if(result.volume != null && result.volume !== "") { %>, <%= result.volume %><% } %><% if(result.bookCitation != null && result.bookCitation !== "") { %>, <%= result.bookCitation %> <% if(result.updateDateYear != null && result.updateDateYear != result.bookYear) { %>(updated in <%= result.updateDateYear %>)<% } %><% } %> <% } %> <% if(result.viibesFields != null) { %> <% for (var i = 0; i < result.viibesFields.discussionWeight; i++) { %><% } %><% if(result.viibesFields.hasCriticizingNoteup == true) { %><% } %> <% if(result.viibesFields.discussionWeight != null && result.viibesFields.discussionWeight != 0) { %>Discussion intensity <%= result.viibesFields.discussionWeight %><% } %> <% if(result.viibesFields.hasCriticizingNoteup == true) { %>Unfavourable mention present<% } %> <% } %><% if(result.parentPath != undefined && result.parentPath != null && result.parentPath !== "") { %> <% var compactOrigin = result.parentPath; %><% } else { %> <% var compactOrigin = result.path; %><% } %> <% if(result.citationCount != 0) { %> <% } %>
    <% if(_.size(result.editions) > 1) { %> <% var moreEditions = _.size(result.editions) -1; %> <% } %> <% if(result.canliiConnectsJudgmentUrl != null && result.canliiConnectsJudgmentUrl !== "") { %>
    <% if(result.externalType == "canlii-connects-summary") { %>Summary of <% } else { %>Commentary of <% } %><%= result.canliiConnectsJudgmentTitle %>, <%= result.canliiConnectsJudgmentCitation %>
    <% } %>
    <% if(result.isExternal == true) { %> <% if(result.contributionIndividuals != null && result.contributionIndividuals !== "") { %> <%= result.contributionIndividuals %> <% if((result.workOrganizations != null && result.workOrganizations !== "") || (result.bookUrl != null && result.bookUrl !== "")) { %> – <% } %> <% } %> <% if(result.workOrganizations != null && result.workOrganizations !== "") { %> <%= result.workOrganizations %> <% } %> <% if(result.bookUrl != null && result.bookUrl !== "") { %>  (<%= result.bookUrlDisplay %>) <% } %> <% if(result.canliiConnectsJudgmentUrl != null && result.canliiConnectsJudgmentUrl !== "") { %> – CanLII Connects CanLII Connects Logo <% } %> <% } else { %> <% if(result.contributionIndividuals != null && result.contributionIndividuals !== "") { %><%= result.contributionIndividuals %><% if((result.bookUrl != null && result.bookUrl !== "") || (result.workOrganizations != null && result.workOrganizations !== "") || (result.customText != null && result.customText !== "")) { %> –<% } %><% } %> <% if(result.bookUrl != null && result.bookUrl !== "") { %><%= result.bookTitle %><% if((result.workOrganizations != null && result.workOrganizations !== "") || (result.customText != null && result.customText !== "")) { %> –<% } %><% } %> <% if(result.workOrganizations != null && result.workOrganizations !== "") { %><%= result.workOrganizations %><% if(result.customText != null && result.customText !== "") { %> –<% } %><% } %> <% if(result.customText != null && result.customText !== "") { %><%= result.customText %><% } %> <% } %>
    <% if(result.parentPath != undefined && result.parentPath != null && result.parentPath !== "") { %> <% var origin = result.parentPath; %><% } else if(result.origin != undefined && result.origin != null && result.origin !== "") { %> <% var origin = result.origin; %><% } else if(result.id != undefined && result.id != null && result.id !== "") { %> <% var origin = result.id; %><% } else { %> <% var origin = result.path; %><% } %>
    <% if(result.judgmentDate != undefined && result.judgmentDate != null) { %> <%= result.judgmentDate %> <% } %> <% if(result.pagesCount != undefined && result.pagesCount != null && result.pagesCount != 0) { %> <% if(result.judgmentDate != undefined && result.judgmentDate != null) { %>  |  <% } %> <%= result.pagesCount %> page<% if(result.pagesCount != 1) { %>s<% } %> <% } %> <% if(result.citationCount != 0) { %> <% if((result.judgmentDate != undefined && result.judgmentDate != null) || (result.pagesCount != undefined && result.pagesCount != null && result.pagesCount != 0)) { %>  |  <% } %> cited by <%= result.citationCount %> <% if(result.citationCount == 1) { %>document<% } else { %>documents<% } %> <% } %>
    <% if(result.relatednessFields != null) { %> <% if(result.relatednessFields.scoreOnly == true) { %>
    score: <%= result.relatednessFields.rScore %>
    <% } else { %>
    score: <%= result.relatednessFields.rScore %>
    relatedness score: <%= result.relatednessFields.rRelatednessScore %>
    explain:
    <%= result.explain %>
    count: <%= result.relatednessFields.rCount %>
    fp: <%= result.relatednessFields.rForegroundPopularity %>
    bp: <%= result.relatednessFields.rBackgroundPopularity %>
    xgboost: <%= result.relatednessFields.rXgboostScore %>
    pct query: <%= (result.relatednessFields.totalCitingNumCount / result.relatednessFields.foreTotalNumCount * 100).toFixed(1) %>% (<%= result.relatednessFields.totalCitingNumCount %> / <%= result.relatednessFields.foreTotalNumCount %>)
    pct citations: <%= (result.relatednessFields.totalCitingNumCount / result.relatednessFields.totalCount * 100).toFixed(1) %>% (<%= result.relatednessFields.totalCitingNumCount %> / <%= result.relatednessFields.totalCount %>)
    <% if(result.resultNumber == "1") { %>
    canliiQuery: <%= result.relatednessFields.canliiQuery %>
    relatednessQuery: <%= result.relatednessFields.relatednessQuery %>
    conjunctionQuery: <%= result.relatednessFields.relatednessConjunctionQuery %>
    finalQuery: <%= result.relatednessFields.relatednessFinalQuery %>
    <% } %>
    <% } %><% } %> <% if(result.keywords != null && result.keywords !== "") { %>
    lang="<%= result.documentLocaleIfDifferent %>"<% } %> aria-label="Keywords"><%= result.keywords %>
    <% } %> <% if(_.size(result.subjects) != 0) { %>
    <% _.each(result.subjects, function(subject, index) { %> <%= subject %> <% }) %>
    <% } %> <% if(result.snippet != null && result.snippet !== "") { %>
    lang="<%= result.documentLocaleIfDifferent %>"<% } %>> <%= result.snippet %>
    <% } %>
  4. <% } else if (result.templateName == "CanliiSatalIndexedResult.ftl") { %>
  5. id="firstHit" <% } %>>
    <%= result.resultNumber %>.
    <% let fullLink = result.mainPath + "?resultId=" + result.uUId + "&searchId=" + searchId; if(result.searchUrlHash != undefined && result.searchUrlHash != null && result.searchUrlHash !== "") { fullLink += "&searchUrlHash=" + result.searchUrlHash; } %>
    data-lbh-type="ANNUAL_LAW" <% } else if (result.mainPath.includes("/latest") || result.mainPath.includes("/derniere")) { %> data-lbh-type="LEGISLATION" <% } else { %> data-lbh-type="VERSION" <% } %> data-lbh-document-url="<%= window.location.origin %><%= result.mainPath %>" <% if (result.mainPath.includes("/latest") || result.mainPath.includes("/derniere")) { %> data-lbh-path="<%= result.mainPath %>" data-lbh-title="<%= result.exactTitle %>" <% } else { %> data-lbh-path="<%= result.mainPath %>" data-lbh-title="<%= result.lexboxVersionTitle %>" data-lbh-latest-path="<%= result.path %>" data-lbh-latest-title="<%= result.exactTitle %>" <% } %> data-lbh-citation="<%= result.exactReference %>" data-lbh-lang="<%= result.lang %>" data-lbh-collection="<%= result.collectionTitle %>" data-lbh-jurisdiction="<%= result.jurisdictionTitle %>" data-lbh-legislation-id="<%= result.citationPath %>" data-lbh-noteup-origin="<%= result.path %>" data-lbh-noteup-url="<%= window.location.origin %>/<%= getLanguage() %>/#search/origin1=<%= result.path %>" <% if(result.collectionType != "ANNUAL_STATUTE") { %> data-lbh-amendment-url="<%= window.location.origin %><%= result.rssPath %>" <% } %> >
    lang="<%= result.documentLocaleIfDifferent %>"<% } %>> <%= result.title %>, <%= result.reference %><% if(result.popularTitle != null && result.popularTitle !== "") { %> [<%= result.popularTitle %>]<% } %><% if(result.legislationStatusDisplay != null && result.legislationStatusDisplay !== "") { %>, <%= result.legislationStatusDisplay %><% } %><% if(result.formatedEnablingStatutesDisplay != null && result.formatedEnablingStatutesDisplay !== "") { %>, <%= result.formatedEnablingStatutesDisplay %><% } %> <% if(result.parentPath != undefined && result.parentPath != null && result.parentPath !== "") { %> <% var compactOrigin = result.parentPath; %><% } else { %> <% var compactOrigin = result.path; %><% } %> <% if(result.citationCount != 0) { %> <% } %>
    <% if(_.size(result.replacingLegislations) != 0) { %>
    Replaced by : <% _.each(result.replacingLegislations, function(replacingLegislation, index) { %> <%= replacingLegislation.title %> <% if(index < _.size(result.replacingLegislations) -1) { %>, <% } %> <% }) %>
    <% } %> <% if(result.sections != null) { %>
    <% _.each(result.sections, function(legislationSection, index) { %> <% if(legislationSection.title != null) { %>
    <%= legislationSection.title %>
    <% } %> <% var childCounter = 1; %> <% _.each(legislationSection.sections, function(section, index2) { %>
    <% if(section.relatednessFields != null) { %>S: <%= section.relatednessFields.rScore %>, RS: <%= section.relatednessFields.rRelatednessScore %>, %Q: <%= (section.relatednessFields.totalCitingNumCount / section.relatednessFields.foreTotalNumCount * 100).toFixed(1) %>% (<%= section.relatednessFields.totalCitingNumCount %> / <%= section.relatednessFields.foreTotalNumCount %>),%C: <%= (section.relatednessFields.totalCitingNumCount / section.relatednessFields.totalCount * 100).toFixed(1) %>% (<%= section.relatednessFields.totalCitingNumCount %> / <%= section.relatednessFields.totalCount %>)<% } %>
    <% }) %> <% _.each(legislationSection.childrens, function(children, index2) { %> <% childCounter = 2; %>
    <%= children.title %>
    <% _.each(children.childrens, function(children, index) { %> <% childCounter = 3; %>
    <%= children.title %>
    <% _.each(children.childrens, function(children, index) { %> <% childCounter = 4; %>
    <%= children.title %>
    <% _.each(children.childrens, function(children, index) { %> <% childCounter = 5; %>
    <%= children.title %>
    <% _.each(children.sections, function(section, index) { %>
    <% if(section.relatednessFields != null) { %>S: <%= section.relatednessFields.rScore %>, RS: <%= section.relatednessFields.rRelatednessScore %>, %Q: <%= (section.relatednessFields.totalCitingNumCount / section.relatednessFields.foreTotalNumCount * 100).toFixed(1) %>% (<%= section.relatednessFields.totalCitingNumCount %> / <%= section.relatednessFields.foreTotalNumCount %>),%C: <%= (section.relatednessFields.totalCitingNumCount / section.relatednessFields.totalCount * 100).toFixed(1) %>% (<%= section.relatednessFields.totalCitingNumCount %> / <%= section.relatednessFields.totalCount %>)<% } %>
    <% }) %> <% }) %> <% _.each(children.sections, function(section, index) { %>
    <% if(section.relatednessFields != null) { %>S: <%= section.relatednessFields.rScore %>, RS: <%= section.relatednessFields.rRelatednessScore %>, %Q: <%= (section.relatednessFields.totalCitingNumCount / section.relatednessFields.foreTotalNumCount * 100).toFixed(1) %>% (<%= section.relatednessFields.totalCitingNumCount %> / <%= section.relatednessFields.foreTotalNumCount %>),%C: <%= (section.relatednessFields.totalCitingNumCount / section.relatednessFields.totalCount * 100).toFixed(1) %>% (<%= section.relatednessFields.totalCitingNumCount %> / <%= section.relatednessFields.totalCount %>)<% } %>
    <% }) %> <% }) %> <% _.each(children.sections, function(section, index) { %>
    <% if(section.relatednessFields != null) { %>S: <%= section.relatednessFields.rScore %>, RS: <%= section.relatednessFields.rRelatednessScore %>, %Q: <%= (section.relatednessFields.totalCitingNumCount / section.relatednessFields.foreTotalNumCount * 100).toFixed(1) %>% (<%= section.relatednessFields.totalCitingNumCount %> / <%= section.relatednessFields.foreTotalNumCount %>),%C: <%= (section.relatednessFields.totalCitingNumCount / section.relatednessFields.totalCount * 100).toFixed(1) %>% (<%= section.relatednessFields.totalCitingNumCount %> / <%= section.relatednessFields.totalCount %>)<% } %>
    <% }) %><% }) %><% _.each(children.sections, function(section, index) { %>
    <% if(section.relatednessFields != null) { %>S: <%= section.relatednessFields.rScore %>, RS: <%= section.relatednessFields.rRelatednessScore %>, %Q: <%= (section.relatednessFields.totalCitingNumCount / section.relatednessFields.foreTotalNumCount * 100).toFixed(1) %>% (<%= section.relatednessFields.totalCitingNumCount %> / <%= section.relatednessFields.foreTotalNumCount %>),%C: <%= (section.relatednessFields.totalCitingNumCount / section.relatednessFields.totalCount * 100).toFixed(1) %>% (<%= section.relatednessFields.totalCitingNumCount %> / <%= section.relatednessFields.totalCount %>)<% } %>
    <% }) %> <% }) %> <% }) %>
    <% } %> <% if(result.onlineVersions != null && _.size(result.onlineVersions) > 0 && _.size(result.onlineVersions[0].parts) != 1) { %> <% var moreParts = _.size(result.onlineVersions[0].parts) -1; %> <% var version = undefined; %> <% } %> <% if(_.size(result.onlineVersions) > 1) { %> <% var moreVersions = _.size(result.onlineVersions) -1; %> <% } %>
    <%= result.collectionTitle %> — <%= result.jurisdictionTitle %>
    <% if(result.parentPath != undefined && result.parentPath != null && result.parentPath !== "") { %> <% var origin = result.parentPath; %><% } else if(result.origin != undefined && result.origin != null && result.origin !== "") { %> <% var origin = result.origin; %><% } else if(result.id != undefined && result.id != null && result.id !== "") { %> <% var origin = result.id; %><% } else { %> <% var origin = result.path; %><% } %>
    <% if(result.judgmentDate != undefined && result.judgmentDate != null) { %> <%= result.judgmentDate %> <% } %> <% if(result.pagesCount != undefined && result.pagesCount != null && result.pagesCount != 0) { %> <% if(result.judgmentDate != undefined && result.judgmentDate != null) { %>  |  <% } %> <%= result.pagesCount %> page<% if(result.pagesCount != 1) { %>s<% } %> <% } %> <% if(result.citationCount != 0) { %> <% if((result.judgmentDate != undefined && result.judgmentDate != null) || (result.pagesCount != undefined && result.pagesCount != null && result.pagesCount != 0)) { %>  |  <% } %> cited by <%= result.citationCount %> <% if(result.citationCount == 1) { %>document<% } else { %>documents<% } %> <% } %>
    <% if(result.relatednessFields != null) { %> <% if(result.relatednessFields.scoreOnly == true) { %>
    score: <%= result.relatednessFields.rScore %>
    <% } else { %>
    score: <%= result.relatednessFields.rScore %>
    relatedness score: <%= result.relatednessFields.rRelatednessScore %>
    explain:
    <%= result.explain %>
    count: <%= result.relatednessFields.rCount %>
    fp: <%= result.relatednessFields.rForegroundPopularity %>
    bp: <%= result.relatednessFields.rBackgroundPopularity %>
    xgboost: <%= result.relatednessFields.rXgboostScore %>
    pct query: <%= (result.relatednessFields.totalCitingNumCount / result.relatednessFields.foreTotalNumCount * 100).toFixed(1) %>% (<%= result.relatednessFields.totalCitingNumCount %> / <%= result.relatednessFields.foreTotalNumCount %>)
    pct citations: <%= (result.relatednessFields.totalCitingNumCount / result.relatednessFields.totalCount * 100).toFixed(1) %>% (<%= result.relatednessFields.totalCitingNumCount %> / <%= result.relatednessFields.totalCount %>)
    <% if(result.resultNumber == "1") { %>
    canliiQuery: <%= result.relatednessFields.canliiQuery %>
    relatednessQuery: <%= result.relatednessFields.relatednessQuery %>
    conjunctionQuery: <%= result.relatednessFields.relatednessConjunctionQuery %>
    finalQuery: <%= result.relatednessFields.relatednessFinalQuery %>
    <% } %>
    <% } %><% } %> <% if(result.snippet != null && result.snippet !== "") { %>
    lang="<%= result.documentLocaleIfDifferent %>"<% } %>> <%= result.snippet %>
    <% } %>
  6. <% } else { %>
  7. id="firstHit" <% } %>>
    <%= result.resultNumber %>.
  8. <% } %> <% }) %>
<% } %>'; SEARCH_TEMPLATES.INFOBOX = '<% if(spellcheckItem != null || (errorType != null && errorType !== "") || (potentialSccCount != null && potentialSccCount !== "0")) { %>
Warning
    <% if(errorType != null && errorType !== "" && errorType === "INVALID_SYNTAX") { %>
  • There was an error in the boolean syntax of your query. Here are some results based on what we think you might have meant to write. Please consult the help page if you need assistance.
  • <% } %> <% if(spellcheckItem != null) { %>
  • Did you mean : <%= spellcheckItem.message %>
  • <% } %> <% if(errorType != null && errorType !== "" && errorType === "TOO_MANY_TERMS") { %>
  • Your search exceeds the maximum permitted number of search terms (30) or the maximum number of characters (500). Please reduce the complexity of your query.
  • <% } %> <% if(errorType != null && errorType !== "" && errorType === "QUERY_TOO_COMPLEX") { %>
  • Your search prefix query is too complex.
  • <% } %> <% if(includeSccJudgments !== "true" && potentialSccCount != null && potentialSccCount !== "0") { %> <% if(potentialSccCount == "1") { %>
  • There is <%= potentialSccCount %> decision from the Supreme Court of Canada that matches your search. Add it to your results.
  • <% } else { %>
  • There are <%= potentialSccCount %> decisions from the Supreme Court of Canada that match your search. Add them to your results.
  • <% } %> <% } %> <% if(includeSccJudgments == "true" && potentialSccCount != null && potentialSccCount !== "0") { %>
  • Your results contain Supreme Court of Canada decisions. Remove them.
  • <% } %>
<% } %>'; SEARCH_TEMPLATES.ICONS = '

You may create an RSS feed from your current search. This allows you to monitor new content on CanLII that matches your query.

If your browser supports RSS feeds you may subcribe to it by clicking on this link.

'; SEARCH_TEMPLATES.SEARCH_PAGE = '

Press Enter to search

'; SEARCH_TEMPLATES.RESULTS_DENSITY = ''; SEARCH_TEMPLATES.RESULTS_FRAME = ''; SEARCH_TEMPLATES.RESULTS_NAVIGATION = ''; SEARCH_TEMPLATES.LANG_DROPDOWN = '';