Background:
We’re using swiftype in a documentation web built with Jekyll. I build
and test the web locally on my Mac; when release time comes, I upload it to
doc.splicemachine .com for customers, or to docstest.splicemachine .com for
internal use. For this effort, I’m building and working with the docstest
version.
Searches in my local version are linking to the previously-crawled
docstest engine (recrawled yesterday).
Test Goal:
I want to limit search results to only pages that have a specific value
(2.7) in the ‘buildversion’ metatag.
Method:
On docstest.splicemachine.com, add this tag to just a handful of pages:
Is on these pages on docstest.splicemachine .com:
docstest.splicemachine .com/sqlref_statements_altertable.html
docstest.splicemachine .com/sqlref_statements_createrole.html
docstest.splicemachine .com/sqlref_statements_revoke.html
docstest.splicemachine .com/tutorials_connect_cognos.html
docstest.splicemachine .com/developers_fundamentals_triggers.html
docstest.splicemachine .com/cmdlineref_run.html
docstest.splicemachine .com/dbaas_cmd_initialstartup.html
docstest.splicemachine .com/onprem_install_cloudera.html
The other 500+ pages do not contain that tag.
After adding those tags last night, I re-indexed each of those 8 pages.
In the local build (on my mac, not live on docstest), every page contains
this swiftype script:
<script type="text/javascript">
(function(w,d,t,u,n,s,e){w['SwiftypeObject']=n;w[n]=w[n]||function(){
(w[n].q=w[n].q||[]).push(arguments);};s=d.createElement(t);
e=d.getElementsByTagName(t)[0];s.async=1;s.src=u;e.parentNode.insertBefore(s,e);
})(window,document,‘script’,‘//s.swiftypecdn.com/install/v2/st.js
‘,’_st’);
_st('install','<docstest engine id is here>','2.0.0', {
install: {
hooks: {
query_filter: function(query) {
query.setFilterDataByDocumentTypeSlugAndFilterField('page',
‘buildversion’, { values: [ ‘2.7’], type: “and” });
return query;
}
}
}
});
</script>
According to my understanding, when I search in my local build with this
script in place, the search results should only include pages that contain
the ‘buildversion’ metatag set to value=‘2.7’.
But what I’m seeing is that the results of local searches are including all
pages. Either I’m missing something, or my understanding of what should
happen is wrong.
Can you help?