API - sort by relevance

32 views
Skip to first unread message

abe...@utoronto.ca

unread,
Apr 2, 2019, 2:56:03 PM4/2/19
to AtoM Users
Hi,

I'm just going through the documentation and I noticed the API doesn't allow you to sort the results by relevance.

Do you have any plans in making it available in the future?

Thank you.

Abe

Dan Gillean

unread,
Apr 8, 2019, 11:57:24 AM4/8/19
to ICA-AtoM Users
Hi Abe, 

First, this is a browse endpoint, not a search endpoint, so what would the "relevance" criteria be exactly?

More importantly, we would love to expand upon the current API endpoint functionality, but as you may know, we rely on our community for feature development, via development sponsorship and/or community-submitted pull requests. You can read more about our philosophy, business model, and maintenance model for AtoM here: 
If your institution is interested in sponsoring API development, please feel free to contact me off-list so we can discuss requirements. Alternatively, if you are interested in extending the API functionality yourself or with local developers, please be sure to review our community Development resources. In terms of submitting a pull request to the public project, be sure to see the Community development recommendations wiki page. 

As an aside - I haven't forgotten about your other question about Elasticsearch. I'm trying to get some developer time to have them respond to you. 

Cheers,  

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at https://groups.google.com/group/ica-atom-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/bbff5969-4fe2-483a-9d8b-28fa83b7d657%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

abe...@utoronto.ca

unread,
Apr 8, 2019, 12:50:27 PM4/8/19
to AtoM Users
Hi Dan,

That's interesting.  I thought the behavior in the API would be more or less like the advanced search since they both use the same set of parameters.

Going back to your question, I guess the "relevance" criteria would be based on the boolean criteria parameters (sq/so/sf), similar to the advanced search form.

I didn't know the API is intended for browsing over searching, because it sounds more like the latter in the documentation.

Thank you for the clarification and looking forward to hear from you about ES.

Abe


On Monday, April 8, 2019 at 11:57:24 AM UTC-4, Dan Gillean wrote:
Hi Abe, 

First, this is a browse endpoint, not a search endpoint, so what would the "relevance" criteria be exactly?

More importantly, we would love to expand upon the current API endpoint functionality, but as you may know, we rely on our community for feature development, via development sponsorship and/or community-submitted pull requests. You can read more about our philosophy, business model, and maintenance model for AtoM here: 
If your institution is interested in sponsoring API development, please feel free to contact me off-list so we can discuss requirements. Alternatively, if you are interested in extending the API functionality yourself or with local developers, please be sure to review our community Development resources. In terms of submitting a pull request to the public project, be sure to see the Community development recommendations wiki page. 

As an aside - I haven't forgotten about your other question about Elasticsearch. I'm trying to get some developer time to have them respond to you. 

Cheers,  

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory


On Tue, Apr 2, 2019 at 2:56 PM <abe...@utoronto.ca> wrote:
Hi,

I'm just going through the documentation and I noticed the API doesn't allow you to sort the results by relevance.

Do you have any plans in making it available in the future?

Thank you.

Abe

--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-ato...@googlegroups.com.

Dan Gillean

unread,
Apr 8, 2019, 1:23:04 PM4/8/19
to ICA-AtoM Users
Hi Abe, 

Ha, it's been a bit since I've looked at the API - you're right, I can see that relevance would be useful. It is called the "browse information objects endpoint," but I see now that it can essentially be used as a search query with the various paremeters that can be passed. My apologies for that!  

Have you tried simply adding it in a query for the sort parameter (e.g. as sort=relevance)? It may actually work  - it could be that we haven't updated the documentation properly. I'll try to find some time to refamiliarize myself with this and test it myself, but if you get a chance, let me know how it goes. 


Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory


To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.

To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at https://groups.google.com/group/ica-atom-users.

abe...@utoronto.ca

unread,
Apr 8, 2019, 5:22:14 PM4/8/19
to AtoM Users
Hi Dan,

No worries.  It's good that we are on the same page.

Yes, I tried that but didn't work unfortunately.  I took a glance at the code and seems like that specific case is missing.

Perhaps your developers could take a look at it and see if it can be done?

Thank you.

Abe

Dan Gillean

unread,
Apr 11, 2019, 10:27:07 AM4/11/19
to ICA-AtoM Users
Hi Abe, 

It can certainly be done, but unfortunately it's a bit more work to figure out than what we can provide via the forum. These other cases are all able to sort on a specific field in the index, but with relevance sorting, we actually need some kind of additional function to calculate the relevance. 

I did find a couple examples that might be used as a reference where relevance is invoked elsewhere - it appears to fetch the Elasticsearch _score and use that for sorting. See for example: 
I don't know if these links will help you figure this out, but if you do, please let us know! 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory


To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.

To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at https://groups.google.com/group/ica-atom-users.
Reply all
Reply to author
Forward
0 new messages