Params in search method of IM.js

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Params in search method of IM.js

Aman Dwivedi
Hey Interminers,

I'm trying to use IM.js library for searching Intermines based on some keywords/terms. For searching based on terms in Intermines, we have two options,

1) Using Intermine Quick Search API Endpoint

(it accepts three params here: q, start, size. So, it allows to set the number of items which we want in the API response and works correctly)

2) Using IM.js library,


I wish to use the second approach, i.e. using IM.js library. But, it looks as if it doesn't support the params 'size' and 'start'. I'm using this code, but it doesn't work for me (it fetches a set of 100 items in result instead of returning 50 items). Even the documentation also doesn't specify the params 'start' and 'size'.

var intermine = require('imjs')
var flymine = new intermine.Service({root:
'www.flymine.org/query'})
var options = {
q: this.searchTerm,
size: 50,
start: 100
}
flymine.search(options).then((data) => {
console.log(data)
})

Thanks,

Aman

_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev