You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ELog server allows in the search interface to search across all logbooks. Technically this works by adding the &all=1 flag to the query. For example: https://elog.psi.ch/elogs/Linux+Demo/?mode=summary&Author=SR&all=1
In this situation, there is a new first column on the result page listing the logbook name. For the actual links etc it doesn't matter, since every link always includes the relative path to the specific logbook
I am very interested in implementing this feature also for the py_elog module. Right now you can manually add the all=1 to your search query by adding it to the input dictionary:
test = Logbook("https://elog.psi.ch/elogs/Linux+Demo")
ids = test.search({"Author": "SR", "all": 1})
The result is that ids has now all the IDs also from other logbooks, which is not ideal.
One possible implementation would be as an optional parameter: def search(self, search_term, n_results=20, scope="subtext", all=False):
But the return can obviously not be only a list of ints, so this would probably break to much.
Maybe then add a new method: def search_all(self, search_term, n_results=20, scope="subtext") ?
Here the return code be:
dict with logbook name as key and list of ids als value
tuple with first value same as search: list of ids and second value a dict similar to 1. but with all IDs NOT in the current logbook
Opinions?
The text was updated successfully, but these errors were encountered:
The ELog server allows in the search interface to search across all logbooks. Technically this works by adding the
&all=1
flag to the query. For example:https://elog.psi.ch/elogs/Linux+Demo/?mode=summary&Author=SR&all=1
In this situation, there is a new first column on the result page listing the logbook name. For the actual links etc it doesn't matter, since every link always includes the relative path to the specific logbook
I am very interested in implementing this feature also for the py_elog module. Right now you can manually add the all=1 to your search query by adding it to the input dictionary:
The result is that
ids
has now all the IDs also from other logbooks, which is not ideal.One possible implementation would be as an optional parameter:
def search(self, search_term, n_results=20, scope="subtext", all=False):
But the return can obviously not be only a list of ints, so this would probably break to much.
Maybe then add a new method:
def search_all(self, search_term, n_results=20, scope="subtext")
?Here the return code be:
Opinions?
The text was updated successfully, but these errors were encountered: