AtlasOfLivingAustralia / biocache-service

Occurrence & mapping webservices
https://biocache-ws.ala.org.au/ws/
Other
9 stars 26 forks source link

Autocomplete search fails to include results when used with fq parameter #252

Closed ansell closed 6 years ago

ansell commented 6 years ago

The following autocomplete search is failing to include any results (although the totalRecords appears to be the same) on biocache-service-2.x and working on biocache-service-1.x:

Broken (biocache-service-2.x)

https://biocache-clustered.ala.org.au/ws/autocomplete/search?q=shark&fq=species_habitats%3A%22Marine%22
{
  "searchResults": {
    "startIndex": 0,
    "totalRecords": 279,
    "query": "shark",
    "pageSize": 10,
    "sort": "score",
    "dir": "desc",
    "results": [],
    "status": "OK"
  }
}

Working (biocache-service-1.x):

https://biocache-lb.ala.org.au/ws/autocomplete/search?q=shark&fq=species_habitats%3A%22Marine%22
{
  "searchResults": {
    "startIndex": 0,
    "totalRecords": 279,
    "query": "shark",
    "pageSize": 10,
    "sort": "score",
    "dir": "desc",
    "results": [
      {
        "imageCount": 0,
        "commonName": [
          "chimaeras",
          "skates",
          "sharks",
          "rays",
          "sharks, rays, skates, chimaeras"
        ],
        "idxType": "TAXON",
        "nameComplete": "CHONDRICHTHYES",
        "hasChildren": false,
        "isExcluded": false,
        "distributionsCount": 0,
        "commonNameSingle": "sharks",
        "score": 0.0069480967,
        "highlight": "<strong>shark</strong>s",
        "tracksCount": 0,
        "linkIdentifier": "urn:lsid:biodiversity.org.au:afd.taxon:6f1093ab-9b44-4a55-9066-7daa2f902093",
        "rank": "class",
        "checklistsCount": 0,
        "isAustralian": "recorded",
        "right": "87906",
        "kingdom": "Animalia",
        "phylum": "Chordata",
        "classs": "Chondrichthyes",
        "rawRank": "CLASS",
        "left": "86710",
        "rankId": 3000,
        "parentGuid": "urn:lsid:biodiversity.org.au:afd.taxon:065f1da4-53cd-40b8-a396-80fa5c74dedd",
        "name": "CHONDRICHTHYES",
        "guid": "urn:lsid:biodiversity.org.au:afd.taxon:6f1093ab-9b44-4a55-9066-7daa2f902093",
        "occCount": 171143
      },
      {
        "imageCount": 0,
        "idxType": "TAXON",
        "nameComplete": "Neocyclops sharkbayensis",
        "hasChildren": false,
        "isExcluded": false,
        "distributionsCount": 0,
        "score": 0.011608672,
        "highlight": "Neocyclops <strong>shark</strong>bayensis",
        "tracksCount": 0,
        "linkIdentifier": "urn:lsid:biodiversity.org.au:afd.taxon:91923901-bfe6-4cf5-b9a1-310284f5c90b",
        "rank": "species",
        "checklistsCount": 0,
        "order": "Cyclopoida",
        "author": "Karanovic, 2008",
        "isAustralian": "recorded",
        "right": "186012",
        "kingdom": "Animalia",
        "phylum": "Arthropoda",
        "classs": "Maxillopoda",
        "rawRank": "SPECIES",
        "left": "186012",
        "genus": "Neocyclops",
        "rankId": 7000,
        "parentGuid": "urn:lsid:biodiversity.org.au:afd.taxon:c3187a39-fdbe-413a-ac20-f02ac72b89d4",
        "name": "Neocyclops sharkbayensis",
        "guid": "urn:lsid:biodiversity.org.au:afd.taxon:91923901-bfe6-4cf5-b9a1-310284f5c90b",
        "family": "Cyclopidae",
        "occCount": 2
      },
      {
        "imageCount": 0,
        "commonName": [
          "Sharksuckers",
          "Discfishes",
          "Suckerfishes",
          "remoras",
          "diskfishes",
          "shark suckers"
        ],
        "idxType": "TAXON",
        "nameComplete": "ECHENEIDAE",
        "hasChildren": false,
        "isExcluded": false,
        "distributionsCount": 0,
        "commonNameSingle": "shark suckers",
        "score": 0.0069480967,
        "highlight": "<strong>shark</strong> suckers",
        "tracksCount": 0,
        "linkIdentifier": "urn:lsid:biodiversity.org.au:afd.taxon:775d33b0-a7cd-477a-a8ef-be39ebce2107",
        "rank": "family",
        "checklistsCount": 0,
        "order": "Perciformes",
        "isAustralian": "recorded",
        "right": "95707",
        "kingdom": "Animalia",
        "phylum": "Chordata",
        "classs": "Actinopterygii",
        "rawRank": "FAMILY",
        "left": "95687",
        "rankId": 5000,
        "parentGuid": "urn:lsid:biodiversity.org.au:afd.taxon:e3fda0ff-4705-4a40-8991-1dfabdadcfae",
        "name": "ECHENEIDAE",
        "guid": "urn:lsid:biodiversity.org.au:afd.taxon:775d33b0-a7cd-477a-a8ef-be39ebce2107",
        "family": "Echeneidae",
        "occCount": 2648
      },
      {
        "imageCount": 0,
        "commonName": [
          "freshwater filletes",
          "pangas catfishes",
          "shark catfishes",
          "Pacific dories"
        ],
        "idxType": "TAXON",
        "nameComplete": "Pangasiidae",
        "hasChildren": false,
        "isExcluded": false,
        "distributionsCount": 0,
        "commonNameSingle": "shark catfishes",
        "score": 0.0069480967,
        "highlight": "<strong>shark</strong> catfishes",
        "tracksCount": 0,
        "linkIdentifier": "37177000",
        "rank": "family",
        "checklistsCount": 0,
        "order": "Siluriformes",
        "isAustralian": "recorded",
        "right": "103400",
        "kingdom": "Animalia",
        "phylum": "Chordata",
        "classs": "Actinopterygii",
        "rawRank": "FAMILY",
        "left": "103382",
        "rankId": 5000,
        "parentGuid": "urn:lsid:biodiversity.org.au:afd.taxon:ac9af7b3-541d-4ec3-8ca3-2af8e7b7780f",
        "name": "Pangasiidae",
        "guid": "37177000",
        "family": "Pangasiidae",
        "occCount": 40
      },
      {
        "imageCount": 0,
        "commonName": [
          "Shark Rays",
          "wedgefishes",
          "Sharkfin Guitarfishes"
        ],
        "idxType": "TAXON",
        "nameComplete": "RHINIDAE",
        "hasChildren": false,
        "isExcluded": false,
        "distributionsCount": 0,
        "commonNameSingle": "Sharkfin Guitarfishes",
        "score": 0.0069480967,
        "highlight": "<strong>Shark</strong>fin Guitarfishes",
        "tracksCount": 0,
        "linkIdentifier": "urn:lsid:biodiversity.org.au:afd.taxon:58a6024e-cbb1-42f8-a8fe-fed7b4d07b91",
        "rank": "family",
        "checklistsCount": 0,
        "order": "Rhinobatiformes",
        "isAustralian": "recorded",
        "right": "87017",
        "kingdom": "Animalia",
        "phylum": "Chordata",
        "classs": "Chondrichthyes",
        "rawRank": "FAMILY",
        "left": "87013",
        "rankId": 5000,
        "parentGuid": "urn:lsid:biodiversity.org.au:afd.taxon:82f9f1a5-3ba3-49fa-aa5c-3f1c3aebbe50",
        "name": "RHINIDAE",
        "guid": "urn:lsid:biodiversity.org.au:afd.taxon:58a6024e-cbb1-42f8-a8fe-fed7b4d07b91",
        "family": "Rhinidae",
        "occCount": 127
      },
      {
        "imageCount": 0,
        "commonName": [
          "Shark Bay sea snake"
        ],
        "idxType": "TAXON",
        "nameComplete": "Aipysurus pooleorum",
        "hasChildren": false,
        "isExcluded": false,
        "distributionsCount": 0,
        "commonNameSingle": "Shark Bay sea snake",
        "score": 0.0069480967,
        "highlight": "<strong>Shark</strong> Bay sea snake",
        "tracksCount": 0,
        "linkIdentifier": "urn:lsid:biodiversity.org.au:afd.taxon:81cd5571-2272-4e9b-a668-1b68426fbdbb",
        "rank": "species",
        "checklistsCount": 0,
        "order": "Squamata",
        "author": "Smith, 1974",
        "isAustralian": "recorded",
        "right": "85723",
        "kingdom": "Animalia",
        "phylum": "Chordata",
        "classs": "Reptilia",
        "rawRank": "SPECIES",
        "left": "85723",
        "genus": "Aipysurus",
        "rankId": 7000,
        "parentGuid": "urn:lsid:biodiversity.org.au:afd.taxon:d8c4316b-2265-47d4-93e2-6a443ef25a95",
        "name": "Aipysurus pooleorum",
        "guid": "urn:lsid:biodiversity.org.au:afd.taxon:81cd5571-2272-4e9b-a668-1b68426fbdbb",
        "family": "Elapidae",
        "occCount": 15
      },
      {
        "imageCount": 0,
        "commonName": [
          "Nervous Shark",
          "Sharks Bay Whaler Shark"
        ],
        "idxType": "TAXON",
        "nameComplete": "Carcharhinus cautus",
        "hasChildren": false,
        "isExcluded": false,
        "distributionsCount": 1,
        "commonNameSingle": "Sharks Bay Whaler Shark",
        "score": 0.0069480967,
        "highlight": "<strong>Shark</strong>s Bay Whaler Shark",
        "tracksCount": 0,
        "linkIdentifier": "urn:lsid:biodiversity.org.au:afd.taxon:ec034854-46f0-4f12-8ba1-98cd6c9ff5b7",
        "rank": "species",
        "checklistsCount": 0,
        "order": "Carcharhiniformes",
        "author": "(Whitley, 1945)",
        "isAustralian": "recorded",
        "right": "87737",
        "kingdom": "Animalia",
        "phylum": "Chordata",
        "classs": "Chondrichthyes",
        "rawRank": "SPECIES",
        "left": "87737",
        "genus": "Carcharhinus",
        "rankId": 7000,
        "parentGuid": "urn:lsid:biodiversity.org.au:afd.taxon:f8363497-74a7-4c38-801b-c342a151f3a6",
        "name": "Carcharhinus cautus",
        "guid": "urn:lsid:biodiversity.org.au:afd.taxon:ec034854-46f0-4f12-8ba1-98cd6c9ff5b7",
        "family": "Carcharhinidae",
        "occCount": 63
      },
      {
        "imageCount": 0,
        "commonName": [
          "slender suckerfish",
          "Australian Remora",
          "Slender Sucking Fish",
          "Striped Suckerfish",
          "Sharksucker",
          "Slender Sucker-fish",
          "Gapu"
        ],
        "idxType": "TAXON",
        "nameComplete": "Echeneis naucrates",
        "hasChildren": false,
        "isExcluded": false,
        "distributionsCount": 1,
        "commonNameSingle": "Sharksucker",
        "score": 0.0069480967,
        "highlight": "<strong>Shark</strong>sucker",
        "tracksCount": 0,
        "linkIdentifier": "urn:lsid:biodiversity.org.au:afd.taxon:bc5397e4-0505-461c-8022-d2706695ac3b",
        "rank": "species",
        "checklistsCount": 0,
        "order": "Perciformes",
        "author": "Linnaeus, 1758",
        "isAustralian": "recorded",
        "right": "95693",
        "kingdom": "Animalia",
        "phylum": "Chordata",
        "classs": "Actinopterygii",
        "rawRank": "SPECIES",
        "left": "95693",
        "genus": "Echeneis",
        "rankId": 7000,
        "parentGuid": "urn:lsid:biodiversity.org.au:afd.taxon:a2ae85d0-a2f4-4bff-8f0a-b1d2a66764e9",
        "name": "Echeneis naucrates",
        "guid": "urn:lsid:biodiversity.org.au:afd.taxon:bc5397e4-0505-461c-8022-d2706695ac3b",
        "family": "Echeneidae",
        "occCount": 2279
      },
      {
        "imageCount": 0,
        "commonName": [
          "Sharkclub Octopus"
        ],
        "idxType": "TAXON",
        "nameComplete": "Galeoctopus lateralis",
        "hasChildren": false,
        "isExcluded": false,
        "distributionsCount": 0,
        "commonNameSingle": "Sharkclub Octopus",
        "score": 0.0069480967,
        "highlight": "<strong>Shark</strong>club Octopus",
        "tracksCount": 0,
        "linkIdentifier": "urn:lsid:biodiversity.org.au:afd.taxon:9affc071-a84c-4c73-a93e-29b8246299c3",
        "rank": "species",
        "checklistsCount": 0,
        "order": "Octopoda",
        "author": "Norman, Boucher & Hochberg, 2004",
        "isAustralian": "recorded",
        "right": "56671",
        "kingdom": "Animalia",
        "phylum": "Mollusca",
        "classs": "Cephalopoda",
        "rawRank": "SPECIES",
        "left": "56671",
        "genus": "Galeoctopus",
        "rankId": 7000,
        "parentGuid": "urn:lsid:biodiversity.org.au:afd.taxon:65c61a73-c3b7-4ccf-a112-7f7d76ce4016",
        "name": "Galeoctopus lateralis",
        "guid": "urn:lsid:biodiversity.org.au:afd.taxon:9affc071-a84c-4c73-a93e-29b8246299c3",
        "family": "Octopodidae",
        "occCount": 4
      },
      {
        "imageCount": 0,
        "commonName": [
          "Grey's sandfish",
          "Sand Eel",
          "sandfish",
          "Ratfish",
          "Sand Fish",
          "Shark Whiting",
          "beaked salmon"
        ],
        "idxType": "TAXON",
        "nameComplete": "Gonorynchus greyi",
        "hasChildren": false,
        "isExcluded": false,
        "distributionsCount": 1,
        "commonNameSingle": "Shark Whiting",
        "score": 0.0069480967,
        "highlight": "<strong>Shark</strong> Whiting",
        "tracksCount": 0,
        "linkIdentifier": "urn:lsid:biodiversity.org.au:afd.taxon:6306a646-2e62-4045-86fc-ef42ed482dfd",
        "rank": "species",
        "checklistsCount": 0,
        "order": "Gonorhynchiformes",
        "author": "(Richardson, 1845)",
        "isAustralian": "recorded",
        "right": "103424",
        "kingdom": "Animalia",
        "phylum": "Chordata",
        "classs": "Actinopterygii",
        "rawRank": "SPECIES",
        "left": "103424",
        "genus": "Gonorynchus",
        "rankId": 7000,
        "parentGuid": "urn:lsid:biodiversity.org.au:afd.taxon:291c0fc3-68eb-442a-9fd6-58200ae9fae7",
        "name": "Gonorynchus greyi",
        "guid": "urn:lsid:biodiversity.org.au:afd.taxon:6306a646-2e62-4045-86fc-ef42ed482dfd",
        "family": "Gonorynchidae",
        "occCount": 1444
      }
    ],
    "status": "OK"
  }
}
ansell commented 6 years ago

Similar search URLs without the fq parameter that are both working are:

https://biocache-lb.ala.org.au/ws/autocomplete/search?q=shark
https://biocache-clustered.ala.org.au/ws/autocomplete/search?q=shark
ansell commented 6 years ago

species_habitats isn't a field in https://biocache-clustered.ala.org.au/ws/index/fields but it is in https://biocache-lb.ala.org.au/ws/index/fields

The following calls match the behaviour of /ws/autocomplete/ for the respective servers so it isn't likely an issue specific to autocomplete:

https://biocache-clustered.ala.org.au/ws/occurrences/search?q=shark&fq=species_habitats%3A%22Marine%22

https://biocache-lb.ala.org.au/ws/occurrences/search?q=shark&fq=species_habitats%3A%22Marine%22

Strangely, species_habitats appears with a description in activeFacetMap for this query, even though it isn't in the /ws/index/fields:

https://biocache-clustered.ala.org.au/ws/occurrences/search?q=shark&fq=species_habitats%3A%22Marine%22

ansell commented 6 years ago

The cause may have been that the taxon column family in cassandra cluster was not populated. If the column family is empty, the ClassificationProcessor in biocache-store does not find matches (there will always be some taxon's that are not in the known habitat/conservation lists, so that is allowable), and if it doesn't find matches, it looks like the species_habitat field isn't populated.

The taxon column family now has values in cassandra after running biocache update-conservation-data and biocache update-habitat-data so we are reprocessing/resampling/reindexing to see if that fixes the issue. It isn't clear whether the field will start to appear in /ws/index/fields if it starts to get values.

ansell commented 6 years ago

The species_habitats facet is now available in biocache-clustered and the following search works:

https://biocache-clustered.ala.org.au/ws/occurrences/search?q=shark&fq=species_habitats%3A%22Marine%22

However, the following autocomplete URL is still not working:

https://biocache-clustered.ala.org.au/ws/autocomplete/search?q=shark&fq=species_habitats%3A%22Marine%22

This isn't showing the intermittent failures that #203 showed, as I have not seen this particular autocomplete query work on biocache-clustered

ansell commented 6 years ago

The following biocache-service-2.x log entries could be useful in diagnosing this issue:

2018-07-16 08:55:46,445 [http-bio-8080-exec-576] DEBUG au.org.ala.biocache.util.SearchUtils  (SearchUtils.java:351) - requestParams = q=shark&fq=species_habitats:"Marine"``&start=0&pageSize=10&sort=score&dir=asc&qc=&facet=true
2018-07-16 08:55:46,445 [http-bio-8080-exec-576] DEBUG au.org.ala.biocache.web.OccurrenceController  (OccurrenceController.java:796) - occurrence search params = q=shark&fq=species_habitats:"Marine"``&start=0&pageSize=10&sort=score&dir=asc&qc=&facet=true extra params = {}
2018-07-16 08:55:46,445 [http-bio-8080-exec-576] WARN au.org.ala.names.search.ALANameSearcher  (ALANameSearcher.java:1018) - Unable to parse shark. Name of type unkown unparsable: shark
org.gbif.ecat.parser.UnparsableException: Name of type unkown unparsable: shark
    at org.gbif.ecat.parser.NameParser.parse(NameParser.java:737)
    at au.org.ala.names.parser.PhraseNameParser.parse(PhraseNameParser.java:118)
    at au.org.ala.names.search.ALANameSearcher.searchForRecords(ALANameSearcher.java:1015)
    at au.org.ala.names.search.ALANameSearcher.searchForRecords(ALANameSearcher.java:963)
    at au.org.ala.names.search.ALANameSearcher.searchForRecord(ALANameSearcher.java:866)
    at au.org.ala.names.search.ALANameSearcher.searchForLSID(ALANameSearcher.java:296)
    at au.org.ala.names.search.ALANameSearcher.searchForLSID(ALANameSearcher.java:241)
    at au.org.ala.names.search.ALANameSearcher.searchForLSID(ALANameSearcher.java:197)
    at au.org.ala.names.search.ALANameSearcher.getLsidByNameAndKingdom(ALANameSearcher.java:1998)
    at au.org.ala.names.search.ALANameSearcher.getGuidsForTaxa(ALANameSearcher.java:1823)
    at au.org.ala.biocache.service.SpeciesLookupIndexService.getGuidsForTaxa(SpeciesLookupIndexService.java:228)
    at au.org.ala.biocache.util.QueryFormatUtils.formatTaxa(QueryFormatUtils.java:388)
    at au.org.ala.biocache.util.QueryFormatUtils.formatQueryTerm(QueryFormatUtils.java:731)
    at au.org.ala.biocache.util.QueryFormatUtils.formatSearchQuery(QueryFormatUtils.java:125)
    at au.org.ala.biocache.dao.SearchDAOImpl.findByFulltextSpatialQuery(SearchDAOImpl.java:673)
    at au.org.ala.biocache.dao.SearchDAOImpl.findByFulltextSpatialQuery(SearchDAOImpl.java:656)
    at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
    at com.sun.proxy.$Proxy44.findByFulltextSpatialQuery(Unknown Source)
    at au.org.ala.biocache.web.OccurrenceController.occurrenceSearch(OccurrenceController.java:800)
    at sun.reflect.GeneratedMethodAccessor326.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:743)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:672)
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:82)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:933)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:867)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:951)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:842)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:827)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at au.org.ala.biocache.web.SimpleCORSFilter.doFilter(SimpleCORSFilter.java:33)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at au.org.ala.biocache.web.LoggerConfigFilter.doFilter(LoggerConfigFilter.java:26)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
    at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:221)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)
2018-07-16 08:55:46,446 [http-bio-8080-exec-576] DEBUG au.org.ala.biocache.util.QueryFormatUtils  (QueryFormatUtils.java:272) - term query: species_habitats:"Marine"
2018-07-16 08:55:46,446 [http-bio-8080-exec-576] DEBUG au.org.ala.biocache.util.QueryFormatUtils  (QueryFormatUtils.java:273) - groups: species_habitats|"Marine"
2018-07-16 08:55:46,446 [http-bio-8080-exec-576] DEBUG au.org.ala.biocache.dao.SearchDAOImpl  (SearchDAOImpl.java:2520) - Solr query: qt=standard&facet=true&facet.mincount=1&facet.limit=30&facet.sort=count&rows=10&start=0&facet.range.other=before&facet.range.other=after&q=text:shark&fq=species_habitats:"Marine"``&facet.missing=true&sort=score+asc
2018-07-16 08:55:46,446 [http-bio-8080-exec-576] DEBUG au.org.ala.biocache.dao.SearchDAOImpl  (SearchDAOImpl.java:3787) - SOLR query:qt=standard&facet=true&facet.mincount=1&facet.limit=30&facet.sort=count&rows=10&start=0&facet.range.other=before&facet.range.other=after&q=text:shark&fq=species_habitats:"Marine"``&facet.missing=true&sort=score+asc
2018-07-16 08:55:46,469 [http-bio-8080-exec-576] DEBUG au.org.ala.biocache.dao.SearchDAOImpl  (SearchDAOImpl.java:2524) - qtime:15
2018-07-16 08:55:46,469 [http-bio-8080-exec-576] DEBUG au.org.ala.biocache.dao.SearchDAOImpl  (SearchDAOImpl.java:2528) - Matched records: 123199
2018-07-16 08:55:46,472 [http-bio-8080-exec-576] DEBUG au.org.ala.biocache.dao.SearchDAOImpl  (SearchDAOImpl.java:2602) - sortField post-split: score|asc
2018-07-16 08:55:46,472 [http-bio-8080-exec-576] INFO au.org.ala.biocache.dao.SearchDAOImpl  (SearchDAOImpl.java:689) - spatial search query: text:shark
ansell commented 6 years ago

The search that triggered that entry was not the autocomplete service, but the occurrences/search service (but the log entry may still be useful):

172.30.1.127 - - [16/Jul/2018:08:55:46 +1000] "GET /ws/occurrences/search?q=shark&fq=species_habitats%3A%22Marine%22`` HTTP/1.1" 200 3765 "-" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"
ansell commented 6 years ago

When switching from local autocomplete to bie, the results are completely different and the fq parameter may not be currently used, based on the query it sent to the bie service and the results it returned:

13.236.246.251 - - [16/Jul/2018:09:34:55 +1000] "GET /ws/search.json?q=shark&pageSize=10 HTTP/1.1" 200 22047 "-" "Java/1.8.0_171" "-"
{
  "searchResults": {
    "totalRecords": 1304,
    "facetResults": [],
    "results": [
      {
        "id": "e140f6fa-ca78-4362-97c4-3fb0ca98f97b",
        "guid": "37990016",
        "idxtype": "TAXON",
        "name": "Sharks - undifferentiated",
        "nomenclaturalCode": "ICZN",
        "scientificName": "Sharks - undifferentiated",
        "nameComplete": "Sharks - undifferentiated",
        "nameFormatted": "<span class=\"scientific-name rank-unknown\"><span class=\"name\">Sharks - undifferentiated</span></span>",
        "taxonomicStatus": "accepted",
        "rank": "unranked",
        "rankID": -1,
        "commonName": "Sharks",
        "commonNameSingle": "Sharks",
        "occurrenceCount": 0,
        "infoSourceName": "CAAB",
        "infoSourceURL": "https://collections.ala.org.au/public/show/dr2704",
        "unranked": "Sharks - undifferentiated",
        "unrankedGuid": "37990016",
        "highlight": "<em>Sharks</em>"
      },
      {
        "id": "a41da26e-cee4-42be-9686-b56d333dd314",
        "guid": "urn:lsid:biodiversity.org.au:afd.taxon:2c351616-c8b1-4c49-92c2-a07b0afed038",
        "idxtype": "TAXON",
        "name": "Hemipristis elongata",
        "kingdom": "ANIMALIA",
        "nomenclaturalCode": "ICZN",
        "scientificName": "Hemipristis elongata",
        "scientificNameAuthorship": "(Klunzinger, 1871)",
        "author": "(Klunzinger, 1871)",
        "nameComplete": "Hemipristis elongata (Klunzinger, 1871)",
        "nameFormatted": "<span class=\"scientific-name rank-species\"><span class=\"name\">Hemipristis elongata</span> <span class=\"author\">(Klunzinger, 1871)</span></span>",
        "taxonomicStatus": "accepted",
        "parentGuid": "urn:lsid:biodiversity.org.au:afd.taxon:71edc58c-711e-48b1-8f3d-5d9eb615b6e2",
        "rank": "species",
        "rankID": 7000,
        "commonName": "Fossil Shark, Snaggletooth Shark",
        "commonNameSingle": "Fossil Shark",
        "occurrenceCount": 177,
        "infoSourceName": "AFD",
        "infoSourceURL": "https://collections.ala.org.au/public/show/dr2699",
        "image": "aa3972af-f8df-4d45-bf87-ee09b58ce985",
        "imageUrl": "https://images.ala.org.au/image/proxyImageThumbnailLarge?imageId=aa3972af-f8df-4d45-bf87-ee09b58ce985",
        "thumbnailUrl": "https://images.ala.org.au/image/proxyImageThumbnail?imageId=aa3972af-f8df-4d45-bf87-ee09b58ce985",
        "smallImageUrl": "https://images.ala.org.au/image/proxyImageThumbnailLarge?imageId=aa3972af-f8df-4d45-bf87-ee09b58ce985",
        "largeImageUrl": "https://images.ala.org.au/image/proxyImage?imageId=aa3972af-f8df-4d45-bf87-ee09b58ce985",
        "genus": "Hemipristis",
        "subclass": "ELASMOBRANCHII",
        "genusGuid": "urn:lsid:biodiversity.org.au:afd.taxon:71edc58c-711e-48b1-8f3d-5d9eb615b6e2",
        "classGuid": "urn:lsid:biodiversity.org.au:afd.taxon:6f1093ab-9b44-4a55-9066-7daa2f902093",
        "kingdomGuid": "urn:lsid:biodiversity.org.au:afd.taxon:4647863b-760d-4b59-aaa1-502c8cdf8d3c",
        "orderGuid": "urn:lsid:biodiversity.org.au:afd.taxon:bd7ddb34-77b1-4e36-96d5-607e2e1f15c4",
        "order": "CARCHARHINIFORMES",
        "class": "CHONDRICHTHYES",
        "phylum": "CHORDATA",
        "family": "HEMIGALEIDAE",
        "familyGuid": "urn:lsid:biodiversity.org.au:afd.taxon:336faeee-6f68-456e-bb90-53d081bcc7a4",
        "phylumGuid": "urn:lsid:biodiversity.org.au:afd.taxon:065f1da4-53cd-40b8-a396-80fa5c74dedd",
        "subclassGuid": "urn:lsid:biodiversity.org.au:afd.taxon:004341ab-b923-4aa7-a664-e42bb8f9c8c4",
        "species": "Hemipristis elongata",
        "speciesGuid": "urn:lsid:biodiversity.org.au:afd.taxon:2c351616-c8b1-4c49-92c2-a07b0afed038",
        "highlight": "Fossil <em>Shark</em>"
      },
      {
        "id": "02263571-d253-4372-ae7b-3606aafea3ba",
        "guid": "urn:lsid:biodiversity.org.au:afd.taxon:ed6e77c0-1c50-4225-93f8-fc1f67a51938",
        "linkIdentifier": "Stegostoma fasciatum",
        "idxtype": "TAXON",
        "name": "Stegostoma fasciatum",
        "kingdom": "ANIMALIA",
        "nomenclaturalCode": "ICZN",
        "scientificName": "Stegostoma fasciatum",
        "scientificNameAuthorship": "(Hermann, 1783)",
        "author": "(Hermann, 1783)",
        "nameComplete": "Stegostoma fasciatum (Hermann, 1783)",
        "nameFormatted": "<span class=\"scientific-name rank-species\"><span class=\"name\">Stegostoma fasciatum</span> <span class=\"author\">(Hermann, 1783)</span></span>",
        "taxonomicStatus": "accepted",
        "parentGuid": "urn:lsid:biodiversity.org.au:afd.taxon:f6906e3c-80f2-48c2-ae06-ea61cf977ef1",
        "rank": "species",
        "rankID": 7000,
        "commonName": "Zebra Shark, Leopard Shark",
        "commonNameSingle": "Zebra Shark",
        "occurrenceCount": 480,
        "infoSourceName": "AFD",
        "infoSourceURL": "https://collections.ala.org.au/public/show/dr2699",
        "image": "ec799fdd-eed9-4fb5-9c68-4d1c58394737",
        "imageUrl": "https://images.ala.org.au/image/proxyImageThumbnailLarge?imageId=ec799fdd-eed9-4fb5-9c68-4d1c58394737",
        "thumbnailUrl": "https://images.ala.org.au/image/proxyImageThumbnail?imageId=ec799fdd-eed9-4fb5-9c68-4d1c58394737",
        "smallImageUrl": "https://images.ala.org.au/image/proxyImageThumbnailLarge?imageId=ec799fdd-eed9-4fb5-9c68-4d1c58394737",
        "largeImageUrl": "https://images.ala.org.au/image/proxyImage?imageId=ec799fdd-eed9-4fb5-9c68-4d1c58394737",
        "genus": "Stegostoma",
        "subclass": "ELASMOBRANCHII",
        "genusGuid": "urn:lsid:biodiversity.org.au:afd.taxon:f6906e3c-80f2-48c2-ae06-ea61cf977ef1",
        "classGuid": "urn:lsid:biodiversity.org.au:afd.taxon:6f1093ab-9b44-4a55-9066-7daa2f902093",
        "kingdomGuid": "urn:lsid:biodiversity.org.au:afd.taxon:4647863b-760d-4b59-aaa1-502c8cdf8d3c",
        "orderGuid": "urn:lsid:biodiversity.org.au:afd.taxon:cefc577b-6ce4-46d1-a944-deea34c58a54",
        "order": "ORECTOLOBIFORMES",
        "class": "CHONDRICHTHYES",
        "phylum": "CHORDATA",
        "family": "STEGOSTOMATIDAE",
        "familyGuid": "urn:lsid:biodiversity.org.au:afd.taxon:b147ad76-9e9f-46a2-99b6-fbb700c673aa",
        "phylumGuid": "urn:lsid:biodiversity.org.au:afd.taxon:065f1da4-53cd-40b8-a396-80fa5c74dedd",
        "subclassGuid": "urn:lsid:biodiversity.org.au:afd.taxon:004341ab-b923-4aa7-a664-e42bb8f9c8c4",
        "species": "Stegostoma fasciatum",
        "speciesGuid": "urn:lsid:biodiversity.org.au:afd.taxon:ed6e77c0-1c50-4225-93f8-fc1f67a51938",
        "highlight": "Zebra <em>Shark</em>"
      },
      {
        "id": "2bc2d719-511f-452c-806b-884e4093cb9d",
        "guid": "urn:lsid:biodiversity.org.au:afd.taxon:8de73d05-82cb-480c-a921-19461e178add",
        "idxtype": "TAXON",
        "name": "Rhincodon typus",
        "kingdom": "ANIMALIA",
        "nomenclaturalCode": "ICZN",
        "scientificName": "Rhincodon typus",
        "scientificNameAuthorship": "Smith, 1828",
        "author": "Smith, 1828",
        "nameComplete": "Rhincodon typus Smith, 1828",
        "nameFormatted": "<span class=\"scientific-name rank-species\"><span class=\"name\">Rhincodon typus</span> <span class=\"author\">Smith, 1828</span></span>",
        "taxonomicStatus": "accepted",
        "parentGuid": "urn:lsid:biodiversity.org.au:afd.taxon:abb0dda0-b423-4338-ad4c-79f962ac4866",
        "rank": "species",
        "rankID": 7000,
        "commonName": "Whale Shark, Checkerboard Shark",
        "commonNameSingle": "Whale Shark",
        "occurrenceCount": 9453,
        "infoSourceName": "AFD",
        "infoSourceURL": "https://collections.ala.org.au/public/show/dr2699",
        "image": "198da904-b831-4a7e-81f4-a7f407f1cf91",
        "imageUrl": "https://images.ala.org.au/image/proxyImageThumbnailLarge?imageId=198da904-b831-4a7e-81f4-a7f407f1cf91",
        "thumbnailUrl": "https://images.ala.org.au/image/proxyImageThumbnail?imageId=198da904-b831-4a7e-81f4-a7f407f1cf91",
        "smallImageUrl": "https://images.ala.org.au/image/proxyImageThumbnailLarge?imageId=198da904-b831-4a7e-81f4-a7f407f1cf91",
        "largeImageUrl": "https://images.ala.org.au/image/proxyImage?imageId=198da904-b831-4a7e-81f4-a7f407f1cf91",
        "genus": "Rhincodon",
        "subclass": "ELASMOBRANCHII",
        "genusGuid": "urn:lsid:biodiversity.org.au:afd.taxon:abb0dda0-b423-4338-ad4c-79f962ac4866",
        "classGuid": "urn:lsid:biodiversity.org.au:afd.taxon:6f1093ab-9b44-4a55-9066-7daa2f902093",
        "kingdomGuid": "urn:lsid:biodiversity.org.au:afd.taxon:4647863b-760d-4b59-aaa1-502c8cdf8d3c",
        "orderGuid": "urn:lsid:biodiversity.org.au:afd.taxon:cefc577b-6ce4-46d1-a944-deea34c58a54",
        "order": "ORECTOLOBIFORMES",
        "class": "CHONDRICHTHYES",
        "phylum": "CHORDATA",
        "family": "RHINCODONTIDAE",
        "familyGuid": "urn:lsid:biodiversity.org.au:afd.taxon:fa476d07-2c51-4a3a-ad6e-3123744c5c79",
        "phylumGuid": "urn:lsid:biodiversity.org.au:afd.taxon:065f1da4-53cd-40b8-a396-80fa5c74dedd",
        "subclassGuid": "urn:lsid:biodiversity.org.au:afd.taxon:004341ab-b923-4aa7-a664-e42bb8f9c8c4",
        "species": "Rhincodon typus",
        "speciesGuid": "urn:lsid:biodiversity.org.au:afd.taxon:8de73d05-82cb-480c-a921-19461e178add",
        "highlight": "Whale <em>Shark</em>"
      },
      {
        "id": "a4a22494-f0ab-484e-875e-806c07607c1d",
        "guid": "urn:lsid:biodiversity.org.au:afd.taxon:bc368d1e-730a-4eb4-bace-e87898af5e23",
        "linkIdentifier": "Carcharhinus amblyrhynchoides",
        "idxtype": "TAXON",
        "name": "Carcharhinus amblyrhynchoides",
        "kingdom": "ANIMALIA",
        "nomenclaturalCode": "ICZN",
        "scientificName": "Carcharhinus amblyrhynchoides",
        "scientificNameAuthorship": "(Whitley, 1934)",
        "author": "(Whitley, 1934)",
        "nameComplete": "Carcharhinus amblyrhynchoides (Whitley, 1934)",
        "nameFormatted": "<span class=\"scientific-name rank-species\"><span class=\"name\">Carcharhinus amblyrhynchoides</span> <span class=\"author\">(Whitley, 1934)</span></span>",
        "taxonomicStatus": "accepted",
        "parentGuid": "urn:lsid:biodiversity.org.au:afd.taxon:f8363497-74a7-4c38-801b-c342a151f3a6",
        "rank": "species",
        "rankID": 7000,
        "commonName": "Graceful Shark, Queensland Shark",
        "commonNameSingle": "Graceful Shark",
        "occurrenceCount": 235,
        "infoSourceName": "AFD",
        "infoSourceURL": "https://collections.ala.org.au/public/show/dr2699",
        "image": "1544d3ff-0e2c-4182-bd00-ce5a4990e02a",
        "imageUrl": "https://images.ala.org.au/image/proxyImageThumbnailLarge?imageId=1544d3ff-0e2c-4182-bd00-ce5a4990e02a",
        "thumbnailUrl": "https://images.ala.org.au/image/proxyImageThumbnail?imageId=1544d3ff-0e2c-4182-bd00-ce5a4990e02a",
        "smallImageUrl": "https://images.ala.org.au/image/proxyImageThumbnailLarge?imageId=1544d3ff-0e2c-4182-bd00-ce5a4990e02a",
        "largeImageUrl": "https://images.ala.org.au/image/proxyImage?imageId=1544d3ff-0e2c-4182-bd00-ce5a4990e02a",
        "genus": "Carcharhinus",
        "subclass": "ELASMOBRANCHII",
        "genusGuid": "urn:lsid:biodiversity.org.au:afd.taxon:f8363497-74a7-4c38-801b-c342a151f3a6",
        "classGuid": "urn:lsid:biodiversity.org.au:afd.taxon:6f1093ab-9b44-4a55-9066-7daa2f902093",
        "kingdomGuid": "urn:lsid:biodiversity.org.au:afd.taxon:4647863b-760d-4b59-aaa1-502c8cdf8d3c",
        "orderGuid": "urn:lsid:biodiversity.org.au:afd.taxon:bd7ddb34-77b1-4e36-96d5-607e2e1f15c4",
        "order": "CARCHARHINIFORMES",
        "class": "CHONDRICHTHYES",
        "phylum": "CHORDATA",
        "family": "CARCHARHINIDAE",
        "familyGuid": "urn:lsid:biodiversity.org.au:afd.taxon:d9587ac2-71ff-4b93-a9cc-a8be9ccb5491",
        "phylumGuid": "urn:lsid:biodiversity.org.au:afd.taxon:065f1da4-53cd-40b8-a396-80fa5c74dedd",
        "subclassGuid": "urn:lsid:biodiversity.org.au:afd.taxon:004341ab-b923-4aa7-a664-e42bb8f9c8c4",
        "species": "Carcharhinus amblyrhynchoides",
        "speciesGuid": "urn:lsid:biodiversity.org.au:afd.taxon:bc368d1e-730a-4eb4-bace-e87898af5e23",
        "highlight": "Graceful <em>Shark</em>"
      },
      {
        "id": "993a53be-c624-4b43-bd52-3a7b4b9b1f5d",
        "guid": "urn:lsid:biodiversity.org.au:afd.taxon:877bc4db-6ad4-4456-8e68-a70654a74201",
        "linkIdentifier": "Echinorhinus brucus",
        "idxtype": "TAXON",
        "name": "Echinorhinus brucus",
        "kingdom": "ANIMALIA",
        "nomenclaturalCode": "ICZN",
        "scientificName": "Echinorhinus brucus",
        "scientificNameAuthorship": "(Bonnaterre, 1788)",
        "author": "(Bonnaterre, 1788)",
        "nameComplete": "Echinorhinus brucus (Bonnaterre, 1788)",
        "nameFormatted": "<span class=\"scientific-name rank-species\"><span class=\"name\">Echinorhinus brucus</span> <span class=\"author\">(Bonnaterre, 1788)</span></span>",
        "taxonomicStatus": "accepted",
        "parentGuid": "urn:lsid:biodiversity.org.au:afd.taxon:1a728a72-7ff1-4dcb-b815-97dadf837388",
        "rank": "species",
        "rankID": 7000,
        "commonName": "Bramble Shark, Spinous Shark",
        "commonNameSingle": "Bramble Shark",
        "occurrenceCount": 10,
        "infoSourceName": "AFD",
        "infoSourceURL": "https://collections.ala.org.au/public/show/dr2699",
        "image": "5f97c76f-b5e9-48d3-b0df-df1a01b0d05e",
        "imageUrl": "https://images.ala.org.au/image/proxyImageThumbnailLarge?imageId=5f97c76f-b5e9-48d3-b0df-df1a01b0d05e",
        "thumbnailUrl": "https://images.ala.org.au/image/proxyImageThumbnail?imageId=5f97c76f-b5e9-48d3-b0df-df1a01b0d05e",
        "smallImageUrl": "https://images.ala.org.au/image/proxyImageThumbnailLarge?imageId=5f97c76f-b5e9-48d3-b0df-df1a01b0d05e",
        "largeImageUrl": "https://images.ala.org.au/image/proxyImage?imageId=5f97c76f-b5e9-48d3-b0df-df1a01b0d05e",
        "genus": "Echinorhinus",
        "subclass": "ELASMOBRANCHII",
        "genusGuid": "urn:lsid:biodiversity.org.au:afd.taxon:1a728a72-7ff1-4dcb-b815-97dadf837388",
        "classGuid": "urn:lsid:biodiversity.org.au:afd.taxon:6f1093ab-9b44-4a55-9066-7daa2f902093",
        "kingdomGuid": "urn:lsid:biodiversity.org.au:afd.taxon:4647863b-760d-4b59-aaa1-502c8cdf8d3c",
        "orderGuid": "urn:lsid:biodiversity.org.au:afd.taxon:a96a2f84-12b4-49d7-9c67-5275eda8e74e",
        "order": "SQUALIFORMES",
        "class": "CHONDRICHTHYES",
        "phylum": "CHORDATA",
        "family": "ECHINORHINIDAE",
        "familyGuid": "urn:lsid:biodiversity.org.au:afd.taxon:08318783-f7a5-4f8c-8172-fbc9de9c1777",
        "phylumGuid": "urn:lsid:biodiversity.org.au:afd.taxon:065f1da4-53cd-40b8-a396-80fa5c74dedd",
        "subclassGuid": "urn:lsid:biodiversity.org.au:afd.taxon:004341ab-b923-4aa7-a664-e42bb8f9c8c4",
        "species": "Echinorhinus brucus",
        "speciesGuid": "urn:lsid:biodiversity.org.au:afd.taxon:877bc4db-6ad4-4456-8e68-a70654a74201",
        "highlight": "Bramble <em>Shark</em>"
      },
      {
        "id": "67e0a0a2-7d59-4d77-8b32-7171d0ac5016",
        "guid": "urn:lsid:biodiversity.org.au:afd.taxon:b1b5f1e3-1efa-4d18-b8f7-d26731b964cc",
        "linkIdentifier": "Mitsukurina owstoni",
        "idxtype": "TAXON",
        "name": "Mitsukurina owstoni",
        "kingdom": "ANIMALIA",
        "nomenclaturalCode": "ICZN",
        "scientificName": "Mitsukurina owstoni",
        "scientificNameAuthorship": "Jordan, 1898",
        "author": "Jordan, 1898",
        "nameComplete": "Mitsukurina owstoni Jordan, 1898",
        "nameFormatted": "<span class=\"scientific-name rank-species\"><span class=\"name\">Mitsukurina owstoni</span> <span class=\"author\">Jordan, 1898</span></span>",
        "taxonomicStatus": "accepted",
        "parentGuid": "urn:lsid:biodiversity.org.au:afd.taxon:57da8a70-2de3-4df0-ad64-a10e0c803fb5",
        "rank": "species",
        "rankID": 7000,
        "commonName": "Goblin Shark, Elphin Shark",
        "commonNameSingle": "Goblin Shark",
        "occurrenceCount": 58,
        "infoSourceName": "AFD",
        "infoSourceURL": "https://collections.ala.org.au/public/show/dr2699",
        "image": "7a040913-9bb3-45e6-9157-596fb42624a3",
        "imageUrl": "https://images.ala.org.au/image/proxyImageThumbnailLarge?imageId=7a040913-9bb3-45e6-9157-596fb42624a3",
        "thumbnailUrl": "https://images.ala.org.au/image/proxyImageThumbnail?imageId=7a040913-9bb3-45e6-9157-596fb42624a3",
        "smallImageUrl": "https://images.ala.org.au/image/proxyImageThumbnailLarge?imageId=7a040913-9bb3-45e6-9157-596fb42624a3",
        "largeImageUrl": "https://images.ala.org.au/image/proxyImage?imageId=7a040913-9bb3-45e6-9157-596fb42624a3",
        "genus": "Mitsukurina",
        "subclass": "ELASMOBRANCHII",
        "genusGuid": "urn:lsid:biodiversity.org.au:afd.taxon:57da8a70-2de3-4df0-ad64-a10e0c803fb5",
        "classGuid": "urn:lsid:biodiversity.org.au:afd.taxon:6f1093ab-9b44-4a55-9066-7daa2f902093",
        "kingdomGuid": "urn:lsid:biodiversity.org.au:afd.taxon:4647863b-760d-4b59-aaa1-502c8cdf8d3c",
        "orderGuid": "urn:lsid:biodiversity.org.au:afd.taxon:6c88f3de-7d6f-42db-b41d-1c42cfa2db0b",
        "order": "LAMNIFORMES",
        "class": "CHONDRICHTHYES",
        "phylum": "CHORDATA",
        "family": "MITSUKURINIDAE",
        "familyGuid": "urn:lsid:biodiversity.org.au:afd.taxon:e8f3e1e7-7d01-4f1f-8107-84765479e008",
        "phylumGuid": "urn:lsid:biodiversity.org.au:afd.taxon:065f1da4-53cd-40b8-a396-80fa5c74dedd",
        "subclassGuid": "urn:lsid:biodiversity.org.au:afd.taxon:004341ab-b923-4aa7-a664-e42bb8f9c8c4",
        "species": "Mitsukurina owstoni",
        "speciesGuid": "urn:lsid:biodiversity.org.au:afd.taxon:b1b5f1e3-1efa-4d18-b8f7-d26731b964cc",
        "highlight": "Goblin <em>Shark</em>"
      },
      {
        "id": "1d93045f-d64b-41d5-81e5-b4095a32abf5",
        "guid": "urn:lsid:biodiversity.org.au:afd.taxon:ec8220ae-c5b0-4d79-b694-e880b4314df1",
        "linkIdentifier": "CETORHINIDAE",
        "idxtype": "TAXON",
        "name": "CETORHINIDAE",
        "kingdom": "ANIMALIA",
        "nomenclaturalCode": "ICZN",
        "scientificName": "CETORHINIDAE",
        "nameComplete": "CETORHINIDAE",
        "nameFormatted": "<span class=\"scientific-name rank-family\"><span class=\"name\">CETORHINIDAE</span></span>",
        "taxonomicStatus": "accepted",
        "parentGuid": "urn:lsid:biodiversity.org.au:afd.taxon:6c88f3de-7d6f-42db-b41d-1c42cfa2db0b",
        "rank": "family",
        "rankID": 5000,
        "commonName": "Basking Sharks, Basking Shark",
        "commonNameSingle": "Basking Sharks",
        "occurrenceCount": 65,
        "infoSourceName": "AFD",
        "infoSourceURL": "https://collections.ala.org.au/public/show/dr2699",
        "image": "09eb9866-8c67-4ddb-bff2-382ece08e7e9",
        "imageUrl": "https://images.ala.org.au/image/proxyImageThumbnailLarge?imageId=09eb9866-8c67-4ddb-bff2-382ece08e7e9",
        "thumbnailUrl": "https://images.ala.org.au/image/proxyImageThumbnail?imageId=09eb9866-8c67-4ddb-bff2-382ece08e7e9",
        "smallImageUrl": "https://images.ala.org.au/image/proxyImageThumbnailLarge?imageId=09eb9866-8c67-4ddb-bff2-382ece08e7e9",
        "largeImageUrl": "https://images.ala.org.au/image/proxyImage?imageId=09eb9866-8c67-4ddb-bff2-382ece08e7e9",
        "kingdomGuid": "urn:lsid:biodiversity.org.au:afd.taxon:4647863b-760d-4b59-aaa1-502c8cdf8d3c",
        "orderGuid": "urn:lsid:biodiversity.org.au:afd.taxon:6c88f3de-7d6f-42db-b41d-1c42cfa2db0b",
        "order": "LAMNIFORMES",
        "class": "CHONDRICHTHYES",
        "phylum": "CHORDATA",
        "subclass": "ELASMOBRANCHII",
        "classGuid": "urn:lsid:biodiversity.org.au:afd.taxon:6f1093ab-9b44-4a55-9066-7daa2f902093",
        "phylumGuid": "urn:lsid:biodiversity.org.au:afd.taxon:065f1da4-53cd-40b8-a396-80fa5c74dedd",
        "subclassGuid": "urn:lsid:biodiversity.org.au:afd.taxon:004341ab-b923-4aa7-a664-e42bb8f9c8c4",
        "family": "CETORHINIDAE",
        "familyGuid": "urn:lsid:biodiversity.org.au:afd.taxon:ec8220ae-c5b0-4d79-b694-e880b4314df1",
        "highlight": "Basking <em>Shark</em><br>Basking <em>Sharks</em>"
      },
      {
        "id": "d945735b-6ffc-4acd-936a-1818727150af",
        "guid": "urn:lsid:biodiversity.org.au:afd.taxon:fa476d07-2c51-4a3a-ad6e-3123744c5c79",
        "linkIdentifier": "RHINCODONTIDAE",
        "idxtype": "TAXON",
        "name": "RHINCODONTIDAE",
        "kingdom": "ANIMALIA",
        "nomenclaturalCode": "ICZN",
        "scientificName": "RHINCODONTIDAE",
        "nameComplete": "RHINCODONTIDAE",
        "nameFormatted": "<span class=\"scientific-name rank-family\"><span class=\"name\">RHINCODONTIDAE</span></span>",
        "taxonomicStatus": "accepted",
        "parentGuid": "urn:lsid:biodiversity.org.au:afd.taxon:cefc577b-6ce4-46d1-a944-deea34c58a54",
        "rank": "family",
        "rankID": 5000,
        "commonName": "Whale Sharks, Whale Shark",
        "commonNameSingle": "Whale Sharks",
        "occurrenceCount": 9456,
        "infoSourceName": "AFD",
        "infoSourceURL": "https://collections.ala.org.au/public/show/dr2699",
        "image": "5640234c-91eb-4042-96d4-25d82055770f",
        "imageUrl": "https://images.ala.org.au/image/proxyImageThumbnailLarge?imageId=5640234c-91eb-4042-96d4-25d82055770f",
        "thumbnailUrl": "https://images.ala.org.au/image/proxyImageThumbnail?imageId=5640234c-91eb-4042-96d4-25d82055770f",
        "smallImageUrl": "https://images.ala.org.au/image/proxyImageThumbnailLarge?imageId=5640234c-91eb-4042-96d4-25d82055770f",
        "largeImageUrl": "https://images.ala.org.au/image/proxyImage?imageId=5640234c-91eb-4042-96d4-25d82055770f",
        "kingdomGuid": "urn:lsid:biodiversity.org.au:afd.taxon:4647863b-760d-4b59-aaa1-502c8cdf8d3c",
        "orderGuid": "urn:lsid:biodiversity.org.au:afd.taxon:cefc577b-6ce4-46d1-a944-deea34c58a54",
        "order": "ORECTOLOBIFORMES",
        "class": "CHONDRICHTHYES",
        "phylum": "CHORDATA",
        "subclass": "ELASMOBRANCHII",
        "classGuid": "urn:lsid:biodiversity.org.au:afd.taxon:6f1093ab-9b44-4a55-9066-7daa2f902093",
        "phylumGuid": "urn:lsid:biodiversity.org.au:afd.taxon:065f1da4-53cd-40b8-a396-80fa5c74dedd",
        "subclassGuid": "urn:lsid:biodiversity.org.au:afd.taxon:004341ab-b923-4aa7-a664-e42bb8f9c8c4",
        "family": "RHINCODONTIDAE",
        "familyGuid": "urn:lsid:biodiversity.org.au:afd.taxon:fa476d07-2c51-4a3a-ad6e-3123744c5c79",
        "highlight": "Whale <em>Sharks</em><br>Whale <em>Shark</em>"
      },
      {
        "id": "8ad37760-a296-48dd-9487-151876c73345",
        "guid": "urn:lsid:biodiversity.org.au:afd.taxon:a2bdaa9b-0046-4e3f-9f7c-225f506ba18c",
        "linkIdentifier": "SPHYRNIDAE",
        "idxtype": "TAXON",
        "name": "SPHYRNIDAE",
        "kingdom": "ANIMALIA",
        "nomenclaturalCode": "ICZN",
        "scientificName": "SPHYRNIDAE",
        "nameComplete": "SPHYRNIDAE",
        "nameFormatted": "<span class=\"scientific-name rank-family\"><span class=\"name\">SPHYRNIDAE</span></span>",
        "taxonomicStatus": "accepted",
        "parentGuid": "urn:lsid:biodiversity.org.au:afd.taxon:bd7ddb34-77b1-4e36-96d5-607e2e1f15c4",
        "rank": "family",
        "rankID": 5000,
        "commonName": "Hammerhead Sharks, Bonnethead Sharks",
        "commonNameSingle": "Hammerhead Sharks",
        "occurrenceCount": 3611,
        "infoSourceName": "AFD",
        "infoSourceURL": "https://collections.ala.org.au/public/show/dr2699",
        "image": "420da491-23a8-40c0-8b0a-fc76a9bba357",
        "imageUrl": "https://images.ala.org.au/image/proxyImageThumbnailLarge?imageId=420da491-23a8-40c0-8b0a-fc76a9bba357",
        "thumbnailUrl": "https://images.ala.org.au/image/proxyImageThumbnail?imageId=420da491-23a8-40c0-8b0a-fc76a9bba357",
        "smallImageUrl": "https://images.ala.org.au/image/proxyImageThumbnailLarge?imageId=420da491-23a8-40c0-8b0a-fc76a9bba357",
        "largeImageUrl": "https://images.ala.org.au/image/proxyImage?imageId=420da491-23a8-40c0-8b0a-fc76a9bba357",
        "kingdomGuid": "urn:lsid:biodiversity.org.au:afd.taxon:4647863b-760d-4b59-aaa1-502c8cdf8d3c",
        "orderGuid": "urn:lsid:biodiversity.org.au:afd.taxon:bd7ddb34-77b1-4e36-96d5-607e2e1f15c4",
        "order": "CARCHARHINIFORMES",
        "class": "CHONDRICHTHYES",
        "phylum": "CHORDATA",
        "subclass": "ELASMOBRANCHII",
        "classGuid": "urn:lsid:biodiversity.org.au:afd.taxon:6f1093ab-9b44-4a55-9066-7daa2f902093",
        "phylumGuid": "urn:lsid:biodiversity.org.au:afd.taxon:065f1da4-53cd-40b8-a396-80fa5c74dedd",
        "subclassGuid": "urn:lsid:biodiversity.org.au:afd.taxon:004341ab-b923-4aa7-a664-e42bb8f9c8c4",
        "family": "SPHYRNIDAE",
        "familyGuid": "urn:lsid:biodiversity.org.au:afd.taxon:a2bdaa9b-0046-4e3f-9f7c-225f506ba18c",
        "highlight": "Hammerhead <em>Sharks</em>"
      }
    ],
    "queryTitle": "shark"
  }
}

I will switch back to the local autocomplete, as the bie autocomplete isn't syntax compatible with the biocache autocomplete results JSON.

ansell commented 6 years ago

Closing this as a duplicate of #203 , as it works sometimes now, and we have fixed the species_habitats underlying data issue that was making it never work before

djtfmartin commented 6 years ago

@ansell should be closed ?

ansell commented 6 years ago

Sorry, I thought I had closed this issue. The species_habitats field is now populated. The remaining issue is the intermittent failures that were previously described in #203