Swirrl / ook

Structural search engine
https://search-prototype.gss-data.org.uk/
Eclipse Public License 1.0
6 stars 0 forks source link

get-codes - No implementation of method: :write-body-to-stream for class: clojure.lang.PersistentArrayMap #38

Closed Robsteranium closed 3 years ago

Robsteranium commented 3 years ago

If you search for "England" or "France" you get the below exception. For some reason "Germany" is fine...

Possibly unexpected cardinality?

[WARN ] 2021-03-24 09:40:43.724 [qtp370394023-40] HttpChannel - /get-codes
java.lang.IllegalArgumentException: No implementation of method: :write-body-to-stream of protocol: #'ring.core.protocols/StreamableResponseBody found for class: clojure.lang.PersistentArrayMap
        at clojure.core$_cache_protocol_fn.invokeStatic(core_deftype.clj:583) ~[clojure-1.10.1.jar:?]
        at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:575) ~[clojure-1.10.1.jar:?]
        at ring.core.protocols$eval18383$fn__18384$G__18374__18393.invoke(protocols.clj:8) ~[?:?]
        at ring.util.servlet$update_servlet_response.invokeStatic(servlet.clj:106) ~[?:?]
        at ring.util.servlet$update_servlet_response.invoke(servlet.clj:91) ~[?:?]
        at ring.util.servlet$update_servlet_response.invokeStatic(servlet.clj:95) ~[?:?]
        at ring.util.servlet$update_servlet_response.invoke(servlet.clj:91) ~[?:?]
        at ring.adapter.jetty$proxy_handler$fn__24118.invoke(jetty.clj:28) ~[?:?]
        at ring.adapter.jetty.proxy$org.eclipse.jetty.server.handler.AbstractHandler$ff19274a.handle(Unknown Source) ~[?:?]
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
        at org.eclipse.jetty.server.Server.handle(Server.java:501) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
        at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
        at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375) [jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273) [jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [jetty-io-9.4.31.v20200723.jar:9.4.31.v20200723]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [jetty-io-9.4.31.v20200723.jar:9.4.31.v20200723]
        at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) [jetty-io-9.4.31.v20200723.jar:9.4.31.v20200723]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) [jetty-util-9.4.31.v20200723.jar:9.4.31.v20200723]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) [jetty-util-9.4.31.v20200723.jar:9.4.31.v20200723]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) [jetty-util-9.4.31.v20200723.jar:9.4.31.v20200723]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) [jetty-util-9.4.31.v20200723.jar:9.4.31.v20200723]
        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375) [jetty-util-9.4.31.v20200723.jar:9.4.31.v20200723]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806) [jetty-util-9.4.31.v20200723.jar:9.4.31.v20200723]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938) [jetty-util-9.4.31.v20200723.jar:9.4.31.v20200723]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_282]
Robsteranium commented 3 years ago

Looks like this is caused by ook.search.elastic.codes not expecting codes to appear in more than one codelist.

Robsteranium commented 3 years ago

I suggest we ignore this for now and implement it once we can use the facets (#22) to identify dimensions instead of tracking these on the codes - then it might just be a question of s/map/mapcat :crossed_fingers:

kiramclean commented 3 years ago

Closing this because we removed the code search endpoint anyway and new queries should be handling the issue of codes appearing in multiple codelists gracefully.