ufal / lindat-kontext

An alternative web front-end for the Manatee corpus search engine
GNU General Public License v2.0
5 stars 1 forks source link

Endpoint for handling FCS (version 2) requests #240

Open wojciechrauk opened 4 years ago

wojciechrauk commented 4 years ago

This branch enables FCS version 2 functionality for Kontext under "/fcs/v2" path.

wojciechrauk commented 4 years ago

Sorry for late reply, right now only basic functionalities of FCS v2 are implemented (the same that were present for version 1), the changes revolve mostly around minor differences in data presentation between versions.

kosarko commented 4 years ago

@wojciechrauk Sorry for the delays; we did deploy it on a dev instance and tried it with the aggregator. There was some error (recordPacking seems to be missing? see below), maybe @dietervu has other details.

        "https://lindat.mff.cuni.cz/services/kontext-staging/staging/fcs/v2" : {
          "version" : "VERSION_2",
          "rootCollections" : [ ],
          "maxConcurrentRequests" : 4,
          "diagnostics" : { },
          "errors" : {
            "ParseError at [row,col]:[2,254]\nMessage: expected element '{http://docs.oasis-open.org/ns/search-ws/sruResponse}recordPacking', but found '{http://docs.oasis-open.org/ns/search-ws/sruResponse}recordXMLEscaping'" : {
              "exception" : {
                "klass" : "eu.clarin.sru.client.SRUClientException",
                "message" : "ParseError at [row,col]:[2,254]\nMessage: expected element '{http://docs.oasis-open.org/ns/search-ws/sruResponse}recordPacking', but found '{http://docs.oasis-open.org/ns/search-ws/sruResponse}recordXMLEscaping'",
                "cause" : null
              },
              "context" : "https://lindat.mff.cuni.cz/services/kontext-staging/staging/fcs/v2?operation=explain&version=1.2&x-fcs-endpoint-description=true",
              "counter" : 1
            }
          },
          "avgQueueTime" : 0.001,
          "maxQueueTime" : 0.001,
          "avgExecutionTime" : 0.308,
          "maxExecutionTime" : 0.308,
          "numberOfRequests" : 1
        }
      },
wojciechrauk commented 4 years ago

Thank you! I'll try to see into it shortly :)

wojciechrauk commented 3 years ago

Hi! I believe the error could have been caused by aggregator expecting FCS v1.2 "context" : "https://lindat.mff.cuni.cz/services/kontext-staging/staging/fcs/v2?operation=explain&version=1.2&x-fcs-endpoint-description=true"

I've added handling for FCS v1.2 in FCS v2.0, aggregator should be able to choose which version it's going to use.

Also, sorry for 6 months of inactivity.