@@ -4,7 +4,7 @@ import TypesenseInstantSearchAdapter from "typesense-instantsearch-adapter";
4
4
5
5
const typesenseInstantsearchAdapter = new TypesenseInstantSearchAdapter ( {
6
6
server : {
7
- apiKey : "Sjkob6WIxE5vfpVK3Dp4FYPYFjRdWfBl " , // Be sure to use the search-only-api-key
7
+ apiKey : "F3vRyCOqztwtTQqk2MK3WiUHuveNczoa " , // Be sure to use the search-only-api-key
8
8
nodes : [
9
9
{
10
10
host : "144.92.48.217" ,
@@ -24,15 +24,35 @@ const typesenseInstantsearchAdapter = new TypesenseInstantSearchAdapter({
24
24
} ) ;
25
25
const searchClient = typesenseInstantsearchAdapter . searchClient ;
26
26
27
+ /* search.addWidget(
28
+ instantsearch.widgets.sortBySelector({
29
+ container: '#search-panel',
30
+ indicies: [
31
+ {name: 'imagej-wiki', label: 'imagej-wiki'},
32
+ {name: 'imagej-tutorials', label: 'imagej-tutorials'},
33
+ {name: 'imagej-website', label: 'imagej-websites'}
34
+ ]
35
+ })
36
+ ) */
37
+
27
38
const search = instantsearch ( {
28
39
searchClient,
29
- indexName : "imagej-wiki "
40
+ indexName : "imagej-tutorials "
30
41
} ) ;
31
42
32
43
search . addWidgets ( [
33
44
instantsearch . widgets . searchBox ( {
34
45
container : '#search-box' ,
35
46
} ) ,
47
+ // this is an attempt to add a dropdown selector to choose between collection options
48
+ /* instantsearch.widgets.sortBySelector({
49
+ container: '#search-dropdown', // I created search-dropdown in the html to try to add a place for the dropdown
50
+ indicies: [
51
+ {name: 'imagej-wiki', label: 'imagej-wiki'},
52
+ {name: 'imagej-tutorials', label: 'imagej-tutorials'},
53
+ {name: 'imagej-website', label: 'imagej-websites'}
54
+ ]
55
+ }), */
36
56
instantsearch . widgets . hits ( {
37
57
container : '#search-hits' ,
38
58
templates : {
0 commit comments