@@ -15,13 +15,13 @@ describe("sinopia resource search", () => {
1515 _index : "sinopia_resources" ,
1616 _type : "sinopia" ,
1717 _id : "resource/cornell/34ef053e-f558-4299-a8a7-c8b79a598d99" ,
18- _score : 0.2876821 ,
19- _source : {
20- title : [ "foo bar" ] ,
21- uri : "http://platform:8080/resource/cornell/34ef053e-f558-4299-a8a7-c8b79a598d99" ,
22- label : "foo bar" ,
23- type : [ "http://id.loc.gov/ontologies/bibframe/AbbreviatedTitle" ] ,
24- group : "cornell " ,
18+ uri : "http://platform:8080/resource/cornell/34ef053e-f558-4299-a8a7-c8b79a598d99" ,
19+ data : {
20+ title : {
21+ mainTitle : "foo bar"
22+ } ,
23+ "@ type" : [ "http://id.loc.gov/ontologies/bibframe/AbbreviatedTitle" ] ,
24+ group : "blue core " ,
2525 created : "2019-11-27T19:05:50.496Z" ,
2626 modified : "2019-11-27T19:05:50.496Z" ,
2727 } ,
@@ -31,13 +31,13 @@ describe("sinopia resource search", () => {
3131 _index : "sinopia_resources" ,
3232 _type : "sinopia" ,
3333 _id : "resource/cornell/a96f16c1-a15c-4f4f-8a25-7ed49ba1eebe" ,
34- _score : 0.2876819 ,
35- _source : {
36- title : [ "foo" ] ,
37- uri : "http://platform:8080/resource/cornell/a96f16c1-a15c-4f4f-8a25-7ed49ba1eebe" ,
38- label : "foo" ,
39- type : [ "http://id.loc.gov/ontologies/bibframe/AbbreviatedTitle" ] ,
40- group : "cornell " ,
34+ uri : "http://platform:8080/resource/cornell/a96f16c1-a15c-4f4f-8a25-7ed49ba1eebe" ,
35+ data : {
36+ title : {
37+ mainTitle : "foo"
38+ } ,
39+ "@ type" : [ "http://id.loc.gov/ontologies/bibframe/AbbreviatedTitle" ] ,
40+ group : "blue core " ,
4141 created : "2019-11-27T19:05:52.496Z" ,
4242 modified : "2019-11-27T19:05:52.496Z" ,
4343 } ,
@@ -48,12 +48,13 @@ describe("sinopia resource search", () => {
4848 _type : "sinopia" ,
4949 _id : "resource/stanford/a96f16c1-a15c-4f4f-8a25-7ed49ba1eebe" ,
5050 _score : 0.2876822 ,
51- _source : {
52- title : [ "baz" ] ,
53- uri : "http://platform:8080/resource/stanford/d7b0eb50-17bb-4258-83be-2cef2e9fc3ad" ,
54- label : "baz" ,
55- type : [ "http://id.loc.gov/ontologies/bibframe/Title" ] ,
56- group : "stanford" ,
51+ uri : "http://platform:8080/resource/stanford/d7b0eb50-17bb-4258-83be-2cef2e9fc3ad" ,
52+ data : {
53+ title : {
54+ mainTitle : "baz"
55+ } ,
56+ "@type" : [ "http://id.loc.gov/ontologies/bibframe/Title" ] ,
57+ group : "blue core" ,
5758 created : "2019-11-27T19:05:48.496Z" ,
5859 modified : "2019-11-27T19:05:48.496Z" ,
5960 } ,
@@ -68,11 +69,8 @@ describe("sinopia resource search", () => {
6869 skipped : 0 ,
6970 failed : 0 ,
7071 } ,
71- hits : {
72- total : { value : 3 } ,
73- max_score : 0.2876821 ,
74- hits : [ fooBarHit , fooHit , bazHit ] ,
75- } ,
72+ results : [ fooBarHit , fooHit , bazHit ] ,
73+ total : 3 ,
7674 }
7775
7876 const successResultResorted = {
@@ -84,11 +82,12 @@ describe("sinopia resource search", () => {
8482 skipped : 0 ,
8583 failed : 0 ,
8684 } ,
87- hits : {
88- total : { value : 3 } ,
89- max_score : 0.2876821 ,
90- hits : [ bazHit , fooBarHit , fooHit ] ,
91- } ,
85+ results : [ bazHit , fooBarHit , fooHit ] ,
86+ // hits: {
87+ // total: { value: 3 },
88+ // max_score: 0.2876821,
89+ // results: [bazHit, fooBarHit, fooHit],
90+ // },
9291 }
9392
9493 const successResultPage1 = {
0 commit comments