Skip to content

Issues with new version (v2.0) #301

@pdelboca

Description

@pdelboca

Hello!

I know it's not merged yet but I have been testing a little bit the new branch (#292) and I have some issues running it. I will document them here in case it is useful for the developing process.

My stack:

  • running latest version of CKAN (master)
  • Python 3.9
  • Solr 8 from ckan/ckan-solr repository

Problem installing proj

The pinned version of proj==2.6.1 doesn't seems to work in my envorinment (Python 3.9), there's some documentation about installing PROJ in the official webpage although nothing of this is mentioned in ckanext-spatial docs. I was able to install the latest version of proj.

$ pip install pyproj==2.6.1
Collecting pyproj==2.6.1
  Using cached pyproj-2.6.1.tar.gz (528 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      proj executable not found. Please set the PROJ_DIR variable.For more information see: https://pyproj4.github.io/pyproj/stable/installation.html
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
WARNING: You are using pip version 22.0.4; however, version 22.3 is available.
You should consider upgrading via the '/home/pdelboca/Repos/ckan/.venv/bin/python3.9 -m pip install --upgrade pip' command.

Installing ckanext-harvest

In the documentation is flagged as optional but it is not possible to run ckanext-spatial without it. The extension tries to access it at import time.

Solr backend docs

Some places of the documentation still suggest a deprecated value:

2022-11-10 12:20:03,967 WARNI [ckanext.spatial.plugin] The `solr` spatial search backend has been renamed to `solr-bbox`, please update your configuration

Specifically this part: https://docs.ckan.org/projects/ckanext-spatial/en/dev-v2.0/spatial-search.html#setup

Where to store the spatial field?

The snippet suggested here didn't work for me: https://docs.ckan.org/projects/ckanext-spatial/en/dev-v2.0/spatial-search.html#dataset-extent-map

The issue is that I have stored the data in a new field using ckanext-scheming instead in a custom extra one. Does it need to be stored in a new field or in a extra field?

Displaying of facet filter - Improvement?

The filter is being shown, however when I click to use it it is re-positioned at the top of the page forcing me to scroll up.

image

Search is not working for me

I'm getting: java.lang.UnsupportedOperationException from Solr.

I'm able to display the spatial data in the dataset page:
image

But trying to search gets me an error in Solr:
image

As usual Solr errors are messy, so sorry for this:

('SOLR returned an error running query: {\'facet.field\': [\'organization\', \'groups\', \'tags\', \'res_format\', \'license_id\'], \'fq\': [\' +state:(active)\', \'{!frange incl=false l=0 u=1}div(mul(mul(max(0,sub(min(8.411235809326172,maxx),max(8.403511047363281,minx))),max(0,sub(min(45.681494020136384,maxy),max(45.67615685367673,miny)))),2),add(4.122834045715073e-05,mul(sub(maxy,miny),sub(maxx,minx))))\', \'+site_id:"default"\'], \'q\': \'*:*\', \'rows\': 21, \'sort\': \'score desc, metadata_modified desc\', \'start\': 0, \'df\': \'text\', \'fq_list\': [\'{!frange incl=false l=0 u=1}div(mul(mul(max(0,sub(min(8.411235809326172,maxx),max(8.403511047363281,minx))),max(0,sub(min(45.681494020136384,maxy),max(45.67615685367673,miny)))),2),add(4.122834045715073e-05,mul(sub(maxy,miny),sub(maxx,minx))))\'], \'bf\': \'div(mul(mul(max(0,sub(min(8.411235809326172,maxx),max(8.403511047363281,minx))),max(0,sub(min(45.681494020136384,maxy),max(45.67615685367673,miny)))),2),add(4.122834045715073e-05,mul(sub(maxy,miny),sub(maxx,minx))))\', \'defType\': \'edismax\', \'fl\': \'id validated_data_dict\', \'facet\': \'true\', \'facet.limit\': 50, \'facet.mincount\': 1, \'wt\': \'json\', \'tie\': \'0.1\', \'mm\': \'2<-1 5<80%\', \'qf\': \'name^4 title^4 tags^2 groups^2 text\', \'q.op\': \'AND\'} Error: SolrError(\'Solr responded with an error (HTTP 500): [Reason: None]\\nb\\\'{\\\\n  "responseHeader":{\\\\n    "status":500,\\\\n    "QTime":36,\\\\n    "params":{\\\\n      "mm":"2<-1 5<80%",\\\\n      "facet.field":["organization",\\\\n        "groups",\\\\n        "tags",\\\\n        "res_format",\\\\n        "license_id"],\\\\n      "df":"text",\\\\n      "bf":"div(mul(mul(max(0,sub(min(8.411235809326172,maxx),max(8.403511047363281,minx))),max(0,sub(min(45.681494020136384,maxy),max(45.67615685367673,miny)))),2),add(4.122834045715073e-05,mul(sub(maxy,miny),sub(maxx,minx))))",\\\\n      "fl":"id validated_data_dict",\\\\n      "start":"0",\\\\n      "q.op":"AND",\\\\n      "fq":[" +state:(active)",\\\\n        "{!frange incl=false l=0 u=1}div(mul(mul(max(0,sub(min(8.411235809326172,maxx),max(8.403511047363281,minx))),max(0,sub(min(45.681494020136384,maxy),max(45.67615685367673,miny)))),2),add(4.122834045715073e-05,mul(sub(maxy,miny),sub(maxx,minx))))",\\\\n        "+site_id:\\\\\\\\"default\\\\\\\\""],\\\\n      "sort":"score desc, metadata_modified desc",\\\\n      "rows":"21",\\\\n      "fq_list":"{!frange incl=false l=0 u=1}div(mul(mul(max(0,sub(min(8.411235809326172,maxx),max(8.403511047363281,minx))),max(0,sub(min(45.681494020136384,maxy),max(45.67615685367673,miny)))),2),add(4.122834045715073e-05,mul(sub(maxy,miny),sub(maxx,minx))))",\\\\n      "q":"*:*",\\\\n      "facet.limit":"50",\\\\n      "tie":"0.1",\\\\n      "defType":"edismax",\\\\n      "qf":"name^4 title^4 tags^2 groups^2 text",\\\\n      "facet.mincount":"1",\\\\n      "facet":"true",\\\\n      "wt":"json"}},\\\\n  "error":{\\\\n    "trace":"java.lang.UnsupportedOperationException\\\\\\\\n\\\\\\\\tat org.apache.lucene.queries.function.FunctionValues.floatVal(FunctionValues.java:47)\\\\\\\\n\\\\\\\\tat org.apache.lucene.queries.function.valuesource.MinFloatFunction.func(MinFloatFunction.java:44)\\\\\\\\n\\\\\\\\tat org.apache.lucene.queries.function.valuesource.MultiFloatFunction$1.floatVal(MultiFloatFunction.java:82)\\\\\\\\n\\\\\\\\tat org.apache.solr.search.ValueSourceParser$18$1.func(ValueSourceParser.java:307)\\\\\\\\n\\\\\\\\tat org.apache.lucene.queries.function.valuesource.DualFloatFunction$1.floatVal(DualFloatFunction.java:60)\\\\\\\\n\\\\\\\\tat org.apache.lucene.queries.function.valuesource.MaxFloatFunction.func(MaxFloatFunction.java:44)\\\\\\\\n\\\\\\\\tat org.apache.lucene.queries.function.valuesource.MultiFloatFunction$1.floatVal(MultiFloatFunction.java:82)\\\\\\\\n\\\\\\\\tat org.apache.lucene.queries.function.valuesource.ProductFloatFunction.func(ProductFloatFunction.java:41)\\\\\\\\n\\\\\\\\tat org.apache.lucene.queries.function.valuesource.MultiFloatFunction$1.floatVal(MultiFloatFunction.java:82)\\\\\\\\n\\\\\\\\tat org.apache.lucene.queries.function.valuesource.ProductFloatFunction.func(ProductFloatFunction.java:41)\\\\\\\\n\\\\\\\\tat org.apache.lucene.queries.function.valuesource.MultiFloatFunction$1.floatVal(MultiFloatFunction.java:82)\\\\\\\\n\\\\\\\\tat org.apache.lucene.queries.function.valuesource.DivFloatFunction.func(DivFloatFunction.java:42)\\\\\\\\n\\\\\\\\tat org.apache.lucene.queries.function.valuesource.DualFloatFunction$1.floatVal(DualFloatFunction.java:60)\\\\\\\\n\\\\\\\\tat org.apache.lucene.queries.function.FunctionValues$5.matches(FunctionValues.java:208)\\\\\\\\n\\\\\\\\tat org.apache.lucene.queries.function.ValueSourceScorer$1.matches(ValueSourceScorer.java:53)\\\\\\\\n\\\\\\\\tat org.apache.lucene.search.TwoPhaseIterator$TwoPhaseIteratorAsDocIdSetIterator.doNext(TwoPhaseIterator.java:89)\\\\\\\\n\\\\\\\\tat org.apache.lucene.search.TwoPhaseIterator$TwoPhaseIteratorAsDocIdSetIterator.nextDoc(TwoPhaseIterator.java:77)\\\\\\\\n\\\\\\\\tat org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:280)\\\\\\\\n\\\\\\\\tat org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:238)\\\\\\\\n\\\\\\\\tat org.apache.lucene.search.BulkScorer.score(BulkScorer.java:39)\\\\\\\\n\\\\\\\\tat org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:659)\\\\\\\\n\\\\\\\\tat org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:443)\\\\\\\\n\\\\\\\\tat org.apache.solr.search.DocSetUtil.createDocSetGeneric(DocSetUtil.java:145)\\\\\\\\n\\\\\\\\tat org.apache.solr.search.DocSetUtil.createDocSet(DocSetUtil.java:134)\\\\\\\\n\\\\\\\\tat org.apache.solr.search.SolrIndexSearcher.getDocSetNC(SolrIndexSearcher.java:1197)\\\\\\\\n\\\\\\\\tat org.apache.solr.search.SolrIndexSearcher.lambda$getAndCacheDocSet$1(SolrIndexSearcher.java:876)\\\\\\\\n\\\\\\\\tat org.apache.solr.search.CaffeineCache.computeAsync(CaffeineCache.java:226)\\\\\\\\n\\\\\\\\tat org.apache.solr.search.CaffeineCache.computeIfAbsent(CaffeineCache.java:241)\\\\\\\\n\\\\\\\\tat org.apache.solr.search.SolrIndexSearcher.getAndCacheDocSet(SolrIndexSearcher.java:876)\\\\\\\\n\\\\\\\\tat org.apache.solr.search.SolrIndexSearcher.getPositiveDocSet(SolrIndexSearcher.java:844)\\\\\\\\n\\\\\\\\tat org.apache.solr.search.SolrIndexSearcher.getProcessedFilter(SolrIndexSearcher.java:1035)\\\\\\\\n\\\\\\\\tat org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:1670)\\\\\\\\n\\\\\\\\tat org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1435)\\\\\\\\n\\\\\\\\tat org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:596)\\\\\\\\n\\\\\\\\tat org.apache.solr.handler.component.QueryComponent.doProcessUngroupedSearch(QueryComponent.java:1511)\\\\\\\\n\\\\\\\\tat org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:390)\\\\\\\\n\\\\\\\\tat org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:368)\\\\\\\\n\\\\\\\\tat org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:216)\\\\\\\\n\\\\\\\\tat org.apache.solr.core.SolrCore.execute(SolrCore.java:2637)\\\\\\\\n\\\\\\\\tat org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:794)\\\\\\\\n\\\\\\\\tat org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:567)\\\\\\\\n\\\\\\\\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:427)\\\\\\\\n\\\\\\\\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:357)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.server.handler.InetAccessHandler.handle(InetAccessHandler.java:177)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:322)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:763)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.server.Server.handle(Server.java:516)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:400)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:645)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:392)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)\\\\\\\\n\\\\\\\\tat org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)\\\\\\\\n\\\\\\\\tat java.base/java.lang.Thread.run(Unknown Source)\\\\\\\\n",\\\\n    "code":500}}\\\\n\\\'\')',)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions