Open OlesjaSenkiv opened 7 years ago
Bug2. lookuptype IN is giving wrong result with multisearch. 760 criteria do not contains at all in fields:specimen_nr,specimen_id
Bug4. Specimen >>specimen related_data do not contain image_data but if make request by specimen_id you will get it!
Impl1. Doi detail form geolocation table>> so that i can refer to geolocation API must return locality id "doi_geolocation": [ { "localitylocality": "Pavilosta 51 puurauk", "point": "56.88 21.2", "localitylocality_en": "Pavilosta 51 borehole", "place": "Pavilosta 51 borehole, Kurzeme, Latvia" } ]
also there is no info about Bounding box and Relation (if u want to see that fields)
Related identifiers table >> if u want to see remark and link please add them to API "doi_related_identifier": [ { "value": "10.3176/earth.2015.33", "identifier_type__value": "DOI", "relation_type__value": "IsSupplementTo" } ],
Files table >> at the moment there is no description and formats can be separate for each file object (formats text is not at the same order as files)
Preview data (for text files only) cannot be implemented there is no related data
Impl2. Doi main search
Search by departmets is not possible due to missing field as database__acronym https://api.arendus.geokogud.info/doi/?paginate_by=30&page=1&order_by=-id&format=json&or_search=database__acronym__exact:GIT;database__acronym__exact:TUG;database__acronym__exact:ELM;database__acronym__exact:TUGO;database__acronym__exact:MUMU;database__acronym__exact:EGK
Impl3. Soil site main search Sorting by isik/asutus is not implemented. Map loading is working but it is not possible to open locality due to missing locality_id field
Bug5. PhotoArchive >> search by date is not possible due to 500 error https://api.arendus.geokogud.info/image/?paginate_by=30&page=1&order_by=-id&format=json&date_taken__gte=2017-03-31T21:00:00.000Z&date_taken__lte=2017-04-26T21:00:00.000Z
Multi_search seems to have problems with most lookuptypes, I will work on that.
bug4: there seems to be a duplicate specimen with specimen_id 663-6 as this is not a unique field. One of two has images but this one has a primary key 157937
Impl1: locality_id added to doi_geolocation remarks added to doi_related_identifier. Can you create the link using 'value' field or must it come from database? attachment added to related_data
Impl2: database__acronym added to API
Impl3: tables soil_site and locality are not related at db level, as far as I know
Bug5 date_taken is a Date field (without time part), you should query https://api.arendus.geokogud.info/image/?paginate_by=30&page=1&order_by=-id&format=json&date_taken__gte=2017-03-31&date_taken__lte=2017-04-26
Bug6. Since 24.04 Soil site detail form is not working due to API request broken. https://api.arendus.geokogud.info/soil_site/3513?related_data=sample&related_data=soil_horizon
Bug6 fixed
Bug3 fixed. If filtering on related table primary key (e.g. collection ID), use double underscore: coll__id. It is only for filtering, the field itself can be retrieved in the form coll_id or coll__id.
The problem may be actual for all tables, I will add corresponding *__id fields to API
Bug 1&2 fixed. Lookuptypes should now work, except __hierarchy that needs more effort. Use value:!$value as exclude criterion As for bug2: if using in or range lookuptype, give a list of values separated by comma. If one value is given (eg. 760), it searches for 7, 6 and 0 separately. Updated API index page with additional instructions on multi_search use
impl4. Drillcore box detail. Samples from this box > Samples related_data can be added to API
impl5. Preparation. It is not possible to set following search criterias: by description, taxon name, taxon friquency. Fields are missing in preparation table. Current solution to hide them.
impl6. Preparation search > it would be nice if API returns locality_id. It will allow user to click on locality field and see locality information in detail form
Bug7. Analysis > search criteria by number(sample nr) is not possible due to 500 ERROR https://api.arendus.geokogud.info/analysis/?paginate_by=30&page=1&order_by=-id&format=json&sample__icontains=135311
Impl6: added locality__id
Bug7: same as bug3- use sampleidicontains for filtering
Bug8. It seams that API contantans following fields for specimen //"specimenidentificationtaxonauthor_year", //"specimenidentificationtaxonparenttaxon", //"specimenidentificationtaxon__fossil_group__taxon",
But i get an error https://api.arendus.geokogud.info/specimen/281121?fields=specimenidentification__taxon__fossil_group__taxon,specimenidentification__taxon__author_year
Bug9. specimen_image search is working somehow wrong. Following result shows that there is no images. https://api.arendus.geokogud.info/specimen/281092?fields=id,specimen_id&related_data=specimen_identification&related_data=specimen_image&related_data=specimen_reference
Api request do now allow to search by specimen actual ID but it uses specimen_id. So i add to request previous specimen_id and i've got result with wrong specimen_id. It doesn't match with previous one. https://api.arendus.geokogud.info/specimen_image/?paginate_by=2&page=1&order_by=id&format=json&specimen__specimen_id__exact=663-6
Bug8: please refer to available field list on API index page on api.arendus.geokogud.info. These fields are not included. I will add them if needed.
Bug9: please see my answer for bug4. specimen_id is not a unique value (kind of old numbering), there are two specimen objects (ids or primary keys 157937 and 281092) with the same specimen_id value
BUG8(comment). Before 24.04 those fields were available. But OK... if they are not important to show
impl 7. So that image search can be normally performed in specimen search it would be nice if specimen table will have some boolean field whether it has picture or not. Or even more better for each specimen that has at least one pic randomly add specimen_image_url that i will use as preview picture
bug10: this is again the double underscore issue: use coll__id in multi_search
bug8: added fields to API- I think they may be needed in specimen search
impl5: added taxontaxon, preparationtaxaname, preparationtaxa__frequency
@urtson It would be great if you could fix group_by parameter!
The problem here is that there is a one-to-many relation between specimen and specimen_identification which causes duplicates. The thing is that we do need to get data from specimen_identification to show it in search results and not to have duplicated rows. Unfortunately, group_by=id has no effect on retrieved result.
group_by may not be a solution, as it will still display duplicates inside groups. Moreover, group_by function is currently adjusted only for retrieving contents for combo boxes.
Alternatively, you can get the needed fields as related data Add this to the end of query string: related_data=specimen_identification¤t=true&fields=name,taxon__taxon,taxon_id
It shows only one specimen_identification per specimen that is marked as current. related_data now works also for multiple object search requests, not only for single object requests by id as before
Okay thanks, fixed it as you suggested.
Bug1. Does not contain and Do not exact is not working with MultiSearch (API bug). Current solution: all fields that use multisearch will not contain this search criteria