{"id":26,"date":"2026-10-20T20:48:54","date_gmt":"2026-10-20T20:48:54","guid":{"rendered":"https:\/\/indexa.id-host.org\/?page_id=26"},"modified":"2026-10-20T20:48:54","modified_gmt":"2026-10-20T20:48:54","slug":"iris-search","status":"publish","type":"page","link":"https:\/\/indexa.id-host.org\/?page_id=26","title":{"rendered":"Repository Database Search"},"content":{"rendered":"\n<div class=\"indexa-frontend-nav\">\n    <div class=\"indexa-nav-logo\">\n        <span class=\"logo-icon\">\ud83d\udd0d<\/span> INDEXA\n    <\/div>\n    <div class=\"indexa-nav-links\">\n        <a href=\"https:\/\/indexa.id-host.org\/indexa-dashboard\/\" class=\"nav-item active\">\n            \ud83d\uddbf Dashboard        <\/a>\n        <a href=\"https:\/\/indexa.id-host.org\/indexa-upload\/\" class=\"nav-item \">\n            \ud83d\ude80 Upload        <\/a>\n        <a href=\"https:\/\/indexa.id-host.org\/indexa-comparator\/\" class=\"nav-item \">\n            \ud83d\udcc4 Comparator        <\/a>\n        <a href=\"https:\/\/indexa.id-host.org\/indexa-analytics\/\" class=\"nav-item \">\n            \ud83d\udcc8 Analytics        <\/a>\n        <a href=\"https:\/\/indexa.id-host.org\/indexa-journals\/\" class=\"nav-item \">\n            \ud83d\udcda Journals &amp; API        <\/a>\n        <a href=\"https:\/\/indexa.id-host.org\/indexa-billing\/\" class=\"nav-item \">\n            \ud83d\udcb3 Billing &amp; Quota        <\/a>\n    <\/div>\n    <div class=\"indexa-nav-user\">\n        <span class=\"user-quota-pill\" title=\"Available scanning credits\">\n            \ud83e\ude99 0 Credits        <\/span>\n        <span class=\"user-name-label\">\n            \ud83d\udc64         <\/span>\n    <\/div>\n<\/div>\n        <div class=\"indexa-dashboard-container indexa-search-container\" style=\"margin-top: 25px;\">\n            <div class=\"indexa-dashboard-header\">\n                <div class=\"indexa-dashboard-welcome\">\n                    <h2>Repository Search<\/h2>\n                    <p>Search the internal repository database for manuscripts, authors, titles, or publications.<\/p>\n                <\/div>\n            <\/div>\n\n            <div class=\"indexa-card-panel\" style=\"background: rgba(30, 41, 59, 0.4); border: 1px solid rgba(255, 255, 255, 0.05); padding: 30px; border-radius: 20px;\">\n                <form id=\"indexa-search-form\" style=\"display: flex; gap: 15px; width: 100%; flex-wrap: wrap;\">\n                    <div style=\"flex: 1; min-width: 250px; position: relative;\">\n                        <input type=\"text\" id=\"indexa-search-query\" placeholder=\"Enter search query (keywords, title, contents...)\" style=\"width: 100%; padding: 14px 20px; border-radius: 12px; background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(255, 255, 255, 0.1); color: #fff; font-size: 1rem;\" required \/>\n                    <\/div>\n                    <button type=\"submit\" class=\"indexa-btn-glow\" style=\"min-width: 150px; justify-content: center; height: 50px;\">\n                        <span>\ud83d\udd0d<\/span> Search                    <\/button>\n                <\/form>\n            <\/div>\n\n            <!-- Results container -->\n            <div id=\"indexa-search-results\" class=\"indexa-billing-section\" style=\"margin-top: 30px;\">\n                <div class=\"indexa-empty-state\" style=\"padding: 40px 20px;\">\n                    <div class=\"empty-icon\" style=\"font-size: 3rem;\">\ud83d\udd0e<\/div>\n                    <h4>Ready to Search<\/h4>\n                    <p>Enter keywords above to query the repository database.<\/p>\n                <\/div>\n            <\/div>\n        <\/div>\n\n        <script>\n        jQuery(document).ready(function($) {\n            $('#indexa-search-form').on('submit', function(e) {\n                e.preventDefault();\n                var query = $('#indexa-search-query').val().trim();\n                if (query.length < 2) {\n                    alert('Please enter a search query (minimum 2 characters).');\n                    return;\n                }\n\n                var $results = $('#indexa-search-results');\n                $results.html('<div class=\"indexa-loading\">\ud83d\udd04 Searching database...<\/div>');\n\n                $.post('https:\/\/indexa.id-host.org\/wp-admin\/admin-ajax.php', {\n                    action: 'indexa_search_repository',\n                    query: query,\n                    _wpnonce: '733b46b605'\n                }, function(res) {\n                    if (res.success) {\n                        var documents = res.data;\n                        if (documents.length === 0) {\n                            $results.html(\n                                '<div class=\"indexa-empty-state\">' +\n                                '<div class=\"empty-icon\">\u2715<\/div>' +\n                                '<h4>No Matches Found<\/h4>' +\n                                '<p>No matching documents were found in the internal repository database.<\/p>' +\n                                '<\/div>'\n                            );\n                            return;\n                        }\n\n                        var html = '<h3 style=\"margin-bottom: 20px; font-size: 1.4rem; font-weight: 600; color: #fff;\">' + documents.length + ' Matches Found<\/h3>';\n                        documents.forEach(function(doc) {\n                            var snippet = doc.text || '';\n                            if (snippet.length > 300) {\n                                snippet = snippet.substr(0, 300) + '...';\n                            }\n                            snippet = highlightKeywords(snippet, query);\n\n                            var docTitle = highlightKeywords(doc.title || 'Untitled Manuscript', query);\n\n                            html += '<div class=\"indexa-card-panel\" style=\"padding: 20px; margin-bottom: 15px; background: rgba(30, 41, 59, 0.4); border: 1px solid rgba(255, 255, 255, 0.05);\">';\n                            html += '<div style=\"display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 10px;\">';\n                            html += '<div>';\n                            html += '<h4 style=\"margin: 0 0 5px 0; font-size: 1.25rem; font-weight: 600; color: #fff;\">' + docTitle + '<\/h4>';\n                            html += '<p style=\"margin: 0 0 15px 0; font-size: 0.85rem; color: var(--indexa-text-secondary);\">';\n                            html += 'ID: #' + doc.id + ' \u2022 ' + (doc.word_count || 0) + ' words \u2022 Indexed: ' + (doc.created_at || '');\n                            html += '<\/p>';\n                            html += '<\/div>';\n                            html += '<\/div>';\n                            html += '<div style=\"font-size: 0.95rem; line-height: 1.6; color: #cbd5e1; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 12px; font-style: italic;\">';\n                            html += snippet;\n                            html += '<\/div>';\n                            html += '<\/div>';\n                        });\n\n                        $results.html(html);\n                    } else {\n                        $results.html('<div class=\"indexa-alert error\">\u2715 ' + (res.data || 'Search failed.') + '<\/div>');\n                    }\n                }).fail(function() {\n                    $results.html('<div class=\"indexa-alert error\">\u2715 Connection error.<\/div>');\n                });\n            });\n\n            function highlightKeywords(text, query) {\n                if (!text) return '';\n                var words = query.split(\/\\s+\/);\n                var escapedWords = [];\n                words.forEach(function(word) {\n                    if (word.length > 1) {\n                        escapedWords.push(word.replace(\/[-\\\/\\\\^$*+?.()|[\\]{}]\/g, '\\\\$&'));\n                    }\n                });\n                if (escapedWords.length === 0) return text;\n\n                var regex = new RegExp('(' + escapedWords.join('|') + ')', 'gi');\n                return text.replace(regex, '<span style=\"background-color: #fef08a; color: #000; padding: 2px 4px; border-radius: 4px; font-weight: bold;\">$1<\/span>');\n            }\n        });\n        <\/script>\n        \n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-26","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/indexa.id-host.org\/index.php?rest_route=\/wp\/v2\/pages\/26","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/indexa.id-host.org\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/indexa.id-host.org\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/indexa.id-host.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/indexa.id-host.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=26"}],"version-history":[{"count":0,"href":"https:\/\/indexa.id-host.org\/index.php?rest_route=\/wp\/v2\/pages\/26\/revisions"}],"wp:attachment":[{"href":"https:\/\/indexa.id-host.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}