We have trouble with the solr Spatial queries some polygon queries just don´t work, we don´t know why. If you have a field of type solr.SpatialRecursivePrefixTreeFieldType
<!-- fieldType to store a location in the new format of Solr Version 4 -->
<fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"
spatialContextFactory="com.spatial4j.core.context.jts.JtsSpatialContextFactory"
distErrPct="0.025"
maxDistErr="0.000009"
units="degrees"/>
and make a Query on the field with the following filter-query:
fq=fieldname:"IsWithin(POLYGON((10.949260925162957 50.687958071020525, 10.963822885556231 50.68239399969996, 10.964563833856873 50.68427156144517, 10.96703711832961 50.68658303201778, 10.971062408240995 50.68545999328907, 10.973908368601569 50.68537639297307, 10.977245419297885 50.683455151899885, 10.987904529571237 50.68294282194555, 10.991325387038 50.67963515860285, 10.994120583977482 50.67953326334638, 10.99521208549133 50.6789077661364, 11.001058877152785 50.678738633565445, 11.001548604905265 50.67818764634437, 11.001856364353715 50.677835397891904, 11.00558285688531 50.67803512409588, 11.0081512617408 50.67851875352985, 11.006105355255587 50.6765931916203, 11.007343317894337 50.675840952835756, 11.00508803742539 50.67549090681522, 11.003645117340879 50.67430948629124, 11.005941540214492 50.67061936637505, 11.006219536083469 50.67014126679768, 11.001299804762878 50.67083752214686, 11.001290248726937 50.66994678133127, 11.001266698032165 50.66775142007361, 10.994310850026004 50.6686811276132, 10.99361484218618 50.66578680941357, 10.995238751284973 50.66272061868265, 10.991757060004929 50.66144878694344, 10.98564228736983 50.656057950464636, 10.972933054968484 50.65619159367484, 10.966916033500995 50.654632430958905, 10.96636369345939 50.64608677373722, 10.962270574823638 50.645743297249716, 10.960072993917557 50.646759811319946, 10.959183606001607 50.64697929266767, 10.953790500283061 50.64683862129752, 10.950513303019612 50.645987649473184, 10.94433093410472 50.64467990104971, 10.944139287321171 50.64387083905674, 10.938406478377123 50.64367676951595, 10.936564706423367 50.64344079815689, 10.935796834794198 50.64303879575035, 10.934872743703187 50.64257439164639, 10.93427419432756 50.64211775581536, 10.933160359264956 50.641024208099076, 10.930818579187104 50.638720535539385, 10.930731698801951 50.63850491325951, 10.930573248685782 50.63819957997579, 10.930514584183914 50.63797485471301, 10.930483968228721 50.63772303174961, 10.930509448204717 50.637417013430884, 10.930559495850991 50.63670600493446, 10.930609790537858 50.636021988733695, 10.93062319254464 50.635940959080145, 10.930918118427178 50.63346819840206, 10.929554613720612 50.63173063011565, 10.928233196678372 50.63073800085285, 10.927700297053727 50.630337678088054, 10.928523643504606 50.62943775333723, 10.92872309691077 50.62921974159881, 10.928265672945901 50.62878750906588, 10.927639188094208 50.628566694106404, 10.926255509527108 50.62951454513081, 10.92251019209241 50.62758567817641, 10.922638213078281 50.62684244467462, 10.920936313471174 50.62702387937161, 10.92057977557142 50.62670125843647, 10.920152680177981 50.62639688838215, 10.918545217179695 50.62538597524043, 10.917792182353438 50.62501079438114, 10.911101933460412 50.62182259063344, 10.910534063522139 50.62158167018572, 10.910220857740773 50.62134884112989, 10.909963518297891 50.62103483348087, 10.907487776980194 50.61609483529123, 10.907185632204035 50.61550204988257, 10.907056244585032 50.61525956691028, 10.906628481384871 50.61485617486339, 10.895152937829938 50.610730036478415, 10.896242368859731 50.61247186463941, 10.896470601420656 50.61270502268978, 10.89663156493272 50.61334330885494, 10.896634921258965 50.613739197264394, 10.896609690263567 50.61409919288572, 10.896528427773802 50.6145223648505, 10.896432183751319 50.61484661316548, 10.896045213866357 50.61590967155394, 10.89592075624567 50.616243013829695, 10.895851037118929 50.616360223083014, 10.89585240754103 50.616522177442015, 10.896067734815928 50.61689934415773, 10.896183689961353 50.61723186255236, 10.896260192619177 50.6179154274055, 10.896263393697025 50.61829332089865, 10.896237700111788 50.618599331654885, 10.896016371366 50.619184942393495, 10.895837465600053 50.61977040740378, 10.895659620811532 50.62048183664009, 10.89552077688743 50.62078823450612, 10.89543827592144 50.62106744627099, 10.89541440081784 50.62158939599526, 10.895417747434317 50.621985284440285, 10.895419953189784 50.62224621091522, 10.895535536566323 50.62253374263596, 10.895650816938675 50.62278528438301, 10.895907993767457 50.623090326427935, 10.89702205813367 50.62436418220272, 10.897394394709464 50.624902766276065, 10.897581866399983 50.62532501473681, 10.897627895017118 50.625747749544246, 10.897615356639628 50.62593674492591, 10.89758943824656 50.626215763590146, 10.897451201612462 50.62659414347733, 10.897157596764943 50.62700005028155, 10.896204881347344 50.62808304669058, 10.895980612498475 50.62832675371888, 10.895770334536648 50.628552416954996, 10.89550476578125 50.62893123030415, 10.895365743634875 50.629219633049715, 10.895298437344238 50.62962476083249, 10.895301175148079 50.629948669556875, 10.895818784010213 50.63130826952094, 10.896231728685844 50.63233529670317, 10.896329308521908 50.63324913379934, 10.896471808085538 50.634162815888054, 10.896387784931676 50.63484873155491, 10.895853362204946 50.63539335124816, 10.895409731359035 50.636051929955904, 10.894831087434723 50.63668239938101, 10.89384501665182 50.63694287338006, 10.89321877746772 50.63725925036571, 10.89295453697872 50.63788864146319, 10.892601884032173 50.638689738782595, 10.892158656701907 50.639405438006676, 10.89142586330462 50.64018326820631, 10.891249605392286 50.64110163233304, 10.891209792351503 50.64141668728772, 10.891144841137194 50.64210973155851, 10.891149583241901 50.64267657195861, 10.891137616301116 50.64293754635428, 10.891225677492942 50.64331515274541, 10.891298535787737 50.64356684242054, 10.891485499888212 50.643926118463014, 10.891671788482595 50.644204417006435, 10.891786196727102 50.6443479929879, 10.892544546820737 50.64534416832987, 10.893174209281039 50.6461788173941, 10.89351799460153 50.646672522785806, 10.893705215492075 50.64705878762453, 10.894882157433013 50.650689855006604, 10.89496919918023 50.65094149403119, 10.894994089923097 50.65100770424872, 10.894997994355002 50.65101034884133, 10.89526819691057 50.651193363455, 10.896169293366368 50.651475958949085, 10.897116063005601 50.65184409397104, 10.897793725703924 50.652270282727144, 10.89865162997703 50.652752981995214, 10.89955326530773 50.65309268499627, 10.900497891510984 50.65320368900172, 10.901396850557482 50.65322914045231, 10.902342714743133 50.653482964947386, 10.903109828708763 50.6538516751205, 10.903877201611301 50.65424894803099, 10.904724676108554 50.65470480867649, 10.905207763672205 50.654919062782206, 10.905577393216744 50.65510671959086, 10.90571963130609 50.65518720031583, 10.906032572458294 50.65536605678589, 10.906360295427413 50.65561684232866, 10.908203641750418 50.65761684566244, 10.908460620376147 50.65786787497885, 10.908759750304794 50.65808276386111, 10.90914317979857 50.65822537198042, 10.9096827055135 50.65841241475139, 10.910052143839932 50.65857306489363, 10.910322344422498 50.65871607046202, 10.910593099948478 50.658922057564695, 10.911461366599966 50.65946783407124, 10.913411561596815 50.66070256810259, 10.913667868428533 50.6608726087896, 10.914080443553491 50.66110507379473, 10.914449918280287 50.66126570988579, 10.91479092498766 50.661408451414985, 10.915358821001677 50.661595366186866, 10.915898410493476 50.66178237995819, 10.916565404597831 50.66196893251853, 10.918197483579679 50.66243092630801, 10.918680067924226 50.66257314454925, 10.918978548993268 50.662707029974975, 10.919547769889176 50.6630378833151, 10.9202031483812 50.66350338704778, 10.923424641120155 50.66438241716476, 10.92520056514587 50.66507772742578, 10.928643442713414 50.66691855773872, 10.931248634299681 50.668474484061434, 10.931482632159552 50.66928340878597, 10.93237915166098 50.66977493796525, 10.934586015828625 50.671098336511534, 10.935184017704177 50.671455998806955, 10.935810765428391 50.67185853851997, 10.9360388137638 50.67201963882665, 10.936252537002147 50.67216279720219, 10.93640887044287 50.6722251919134, 10.93797214347626 50.672840129973565, 10.93838469191684 50.6730455159511, 10.938683803183944 50.673233335093705, 10.938870320684071 50.6734935625849, 10.938944158876946 50.67381720153802, 10.938904808606113 50.67415026758631, 10.938906837075631 50.674366205911554, 10.93906453424018 50.67457255591528, 10.939249959577586 50.67471581619838, 10.940034490045216 50.675324682544115, 10.940291821850632 50.67558463848537, 10.940622161521706 50.676078257435236, 10.94075248591146 50.67638368467924, 10.940783437202692 50.67666249709234, 10.943222552787118 50.678524713221, 10.944035691536161 50.67915143877554, 10.944773250404303 50.679274574957105, 10.945325950398017 50.67931743817247, 10.945708292314846 50.67931596622919, 10.946768093608876 50.68189437491155, 10.94729335869263 50.68482498983269, 10.947961248322919 50.68588856337425, 10.949260925162957 50.687958071020525)))"
(even if the index is empty) solr hangs and loads forever without error logging or showing results. This happens to a lot of queries / polygons that we try to query. What are we doing wrong, or is the polygon search not yet usable in solr 4.5?
I found the answer here: http://wiki.apache.org/solr/SolrTomcat#Enabling_Longer_Query_Requests
Enabling Longer Query Requests
If you try to submit too long a GET query to Solr, then Tomcat will reject your HTTP request on the grounds that the HTTP header is too large; symptoms may include an HTTP 400 Bad Request error or (if you execute the query in a web browser) a blank browser window.
If you need to enable longer queries, you can set the maxHttpHeaderSize attribute on the HTTP Connector element in your server.xml file. The default value is 4K. (See http://tomcat.apache.org/tomcat-5.5-doc/config/http.html)
The polygons where just too long to submit to solr via GET-request. We changed the Tomcat settings now everything works fine.
Related
I have an app that is a few months old and at some point there was a request for permission of local network, which is not true, so I want to find a plugin that generates this or is there a way to turn off the permission request?
List of my plugins:
"dependencies": {
"#criipto/auth-js": "^3.4.7",
"#expo/config-plugins": "^5.0.2",
"#expo/html-elements": "^0.2.0",
"#expo/vector-icons": "^13.0.0",
"#logrocket/react-native": "^1.7.3",
"#react-native-async-storage/async-storage": "~1.17.3",
"#react-native-community/slider": "4.2.4",
"#react-native-firebase/analytics": "14.11.1",
"#react-native-firebase/app": "14.11.1",
"#react-native-firebase/messaging": "14.11.1",
"#react-native-masked-view/masked-view": "0.2.8",
"#react-native-picker/picker": "2.4.8",
"#react-navigation/bottom-tabs": "^6.3.2",
"#react-navigation/native": "^6.0.8",
"#react-navigation/native-stack": "^6.7.0",
"#reduxjs/toolkit": "^1.8.3",
"#sentry/react-native": "4.2.2",
"#shopify/react-native-skia": "0.1.157",
"axios": "^0.27.2",
"babel-plugin-module-resolver": "^4.1.0",
"base-64": "^1.0.0",
"expo": "^47.0.0",
"expo-application": "~5.0.1",
"expo-asset": "~8.6.2",
"expo-auth-session": "~3.7.2",
"expo-av": "~13.0.1",
"expo-blur": "~12.0.1",
"expo-build-properties": "~0.4.0",
"expo-clipboard": "~4.0.1",
"expo-constants": "~14.0.2",
"expo-crypto": "~12.0.0",
"expo-dev-client": "~2.0.0",
"expo-device": "~5.0.0",
"expo-file-system": "~15.1.1",
"expo-font": "~11.0.1",
"expo-gl": "~12.0.0",
"expo-linear-gradient": "~12.0.1",
"expo-linking": "~3.2.3",
"expo-modules-autolinking": "~1.0.0",
"expo-notifications": "~0.17.0",
"expo-random": "~13.0.0",
"expo-secure-store": "~12.0.0",
"expo-sharing": "~11.0.1",
"expo-splash-screen": "~0.17.5",
"expo-status-bar": "~1.4.2",
"expo-system-ui": "~2.0.1",
"expo-three": "^2.2.1",
"expo-updates": "~0.15.5",
"expo-video-player": "^2.1.0",
"expo-web-browser": "~12.0.0",
"jwt-decode": "^3.1.2",
"lodash.debounce": "^4.0.8",
"moti": "^0.20.0",
"native-base": "^3.4.9",
"nativewind": "^2.0.10",
"react": "18.1.0",
"react-dom": "18.1.0",
"react-native": "0.70.5",
"react-native-avoid-softinput": "^3.0.1",
"react-native-bouncy-checkbox": "^3.0.2",
"react-native-css-gradient": "^0.4.0",
"react-native-expo-viewport-units": "^0.0.8",
"react-native-fast-image": "^8.6.1",
"react-native-gesture-handler": "~2.8.0",
"react-native-get-random-values": "~1.8.0",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-linear-gradient": "^2.6.2",
"react-native-material-ripple": "^0.9.1",
"react-native-modal": "^13.0.0",
"react-native-paper": "^4.12.4",
"react-native-reanimated": "^2.13.0",
"react-native-redash": "^18.0.0",
"react-native-render-html": "^6.1.0",
"react-native-safe-area-context": "4.4.1",
"react-native-screens": "~3.18.0",
"react-native-share": "^7.9.0",
"react-native-svg": "13.4.0",
"react-native-web": "~0.18.7",
"react-native-webview": "11.23.1",
"react-redux": "^8.0.2",
"redux-persist": "^6.0.0",
"redux-persist-expo-securestore": "^2.0.0",
"sentry-expo": "~5.0.0",
"styled-components": "^5.3.6",
"text-encoding": "^0.7.0",
"three": "^0.143.0",
"url": "^0.11.0"
},
"devDependencies": {
"#babel/core": "^7.19.3",
"#expo/config-types": "^46.0.2",
"#rnx-kit/dep-check": "^1.13.0",
"#rtk-query/codegen-openapi": "^1.0.0",
"#types/base-64": "^1.0.0",
"#types/lodash.debounce": "^4.0.7",
"#types/react": "~18.0.24",
"#types/react-dom": "~18.0.8",
"#types/react-native": "~0.70.6",
"#types/react-native-material-ripple": "^0.9.2",
"#types/redux-persist": "^4.3.1",
"babel-plugin-root-import": "^6.6.0",
"concurrently": "^7.3.0",
"esbuild-runner": "^2.2.1",
"postcss": "^8.4.14",
"react-hook-form": "^7.35.0",
"reactotron-react-native": "^5.0.3",
"reactotron-redux": "^3.1.3",
"tailwindcss": "^3.1.8",
"ts-node": "^10.9.1",
"typescript": "^4.6.3",
"uri-scheme": "^1.0.120"
},
I removed the plugin that was dated next to the date the problem was discovered, but it's impossible to say exactly when it appeared
I'm running a SOLR with a set of OSM Addresses.
On the other hand I have some polygons in the same collection.
I got the JTS in my solr, everything is working fine.
My problem: For example the user is searching for a specific address like this:
/solr/select?q=Bruhweg&wt=json
The result will look like something like this:
"type":["Feature"],
"wkt":["POLYGON((9.0650999 48.80407349974092,9.065108 48.80405349974092,9.0651604 48.804044599740934,9.0651758 48.80405819974092,9.0652663 48.804044699740935,9.0652795 48.804077499740934,9.065298 48.804074799740924,9.06531 48.80411229974091,9.0653315 48.80411249974092,9.0653495 48.804152299740906,9.0653595 48.804185299740894,9.065227 48.8042043997409,9.0652154 48.804206599740894,9.0652046 48.80417829974089,9.0651805 48.8041809997409,9.065163500000002 48.8041373997409,9.0651464 48.8041391997409,9.0651335 48.80409639974092,9.0651051 48.80409789974092,9.0650999 48.80407349974092))"],
"properties.label":"Bruhweg 11"
"properties.category":"address"
where the field "wkt" is matched to the correct SOLR Type, which we can simply verify with the following request:
solr/select?fq=wkt%3A%22Intersects(9.0650999%2048.80407349974092)%22&q=&wt=json*
Notice that I have just taken the first coordinate from "Bruhweg 11" polygon. The result looks like this:
"type":["Feature"],
"wkt":["POLYGON((9.0650999 48.80407349974092,9.065108 48.80405349974092,9.0651604 48.804044599740934,9.0651758 48.80405819974092,9.0652663 48.804044699740935,9.0652795 48.804077499740934,9.065298 48.804074799740924,9.06531 48.80411229974091,9.0653315 48.80411249974092,9.0653495 48.804152299740906,9.0653595 48.804185299740894,9.065227 48.8042043997409,9.0652154 48.804206599740894,9.0652046 48.80417829974089,9.0651805 48.8041809997409,9.065163500000002 48.8041373997409,9.0651464 48.8041391997409,9.0651335 48.80409639974092,9.0651051 48.80409789974092,9.0650999 48.80407349974092))"],
"properties.label":"Bruhweg 11"
"properties.category":"address"
"type":["Feature"],
"wkt":["POLYGON((9.04226364394244 48.78375351560371,9.056374594613018 48.78376897799828,9.059599869694331 48.78163342420202,9.081809522348271 48.78162969553386,9.081761686040636 48.78226547394644,9.082034238895682 48.78253237030596,9.0856383112481 48.783065728036505,9.081013408886774 48.784895520573016,9.08026549061692 48.78523860978792,9.075279465525824 48.78709720944531,9.075385415333642 48.78784623302399,9.075233988916805 48.78855044494239,9.07538936442188 48.789573632543714,9.076086792392704 48.7899895067132,9.076400978454831 48.79076807795856,9.076954863544922 48.791675940101136,9.077323565779931 48.79247426327167,9.077661454940172 48.79359088232947,9.07820886975919 48.79468135994337,9.078817709274189 48.79498392847467,9.079201898938019 48.79520667445914,9.08016333903955 48.79554857516962,9.079778914425672 48.79518198750416,9.079578091974522 48.79467583486249,9.07960878146339 48.79427927263826,9.079777474351143 48.794273758443296,9.079890211573053 48.79495800149708,9.08018722352202 48.795156515552904,9.080499405509059 48.795473674672415,9.080691862967708 48.795850379952874,9.080924981851217 48.79602374816294,9.081213923069749 48.79636161227024,9.08216503129647 48.797025378100585,9.082445049467385 48.796812064430696,9.082997510785853 48.79666782293686,9.083016532890815 48.798210792078066,9.084546369553149 48.79818997904426,9.08436196313672 48.79857684935421,9.084539100024378 48.798725962114545,9.084861025057869 48.79994602380419,9.084990671623789 48.80091802856458,9.08494424868377 48.80165186074672,9.085041682576207 48.80209339903589,9.08538756537159 48.802966378021715,9.086053469766966 48.80390370812341,9.085797560540206 48.803894003364,9.085814723600494 48.80437509265621,9.085407910580006 48.80612600144947,9.086188011009677 48.80771257109675,9.087281863093846 48.80971073096298,9.086304168618957 48.809607114458665,9.08560710806074 48.80961663014216,9.084061519923088 48.80938486330555,9.084077207035987 48.80980658042419,9.083543243778244 48.811250273222925,9.056400173581295 48.81120764569635,9.055584833918676 48.81131770190693,9.05233070753251 48.81010351728196,9.050449180583943 48.81143341235964,9.047719936766072 48.81048226708057,9.047480579846537 48.81086460229471,9.04435778697807 48.809744505510096,9.042626974936422 48.809303638995836,9.038908229735283 48.80850647660382,9.037144908448282 48.808184194812405,9.038129032787538 48.805980772861595,9.038328485640509 48.8051777307488,9.03824791543268 48.80471104904327,9.03876113924191 48.80479984728909,9.03889592317821 48.802984244443905,9.037701980314722 48.802949557020376,9.036369132836748 48.80272688628704,9.035368430087201 48.802290085608014,9.035368259304592 48.8020471956323,9.033685064639178 48.801228620567926,9.032644752493526 48.800737922085965,9.03217057774127 48.8000889091118,9.032098034258505 48.799508062093246,9.031417252535123 48.79921048432656,9.031802215987176 48.798784151506815,9.031441019924467 48.798238377399365,9.03225196905176 48.797687782137466,9.033547957749326 48.79595641436032,9.038695453795164 48.79394510865497,9.03934415364024 48.7933001500083,9.041676969957162 48.7917058788909,9.043068750531523 48.789672193708604,9.043444520390391 48.788257529857816,9.043555307907576 48.787275490180576,9.042249027750703 48.785802079685375,9.042512195810728 48.784854079302804,9.042199907427747 48.7840458175582,9.04226364394244 48.78375351560371))"],
"properties.label":"polygonA",
"properties.category":"polygons"
What I want:
If the user is just searching for Bruhweg I want as result the address AND the polygonA from category polygons
Any Idea how to solve this?
I've been trying to figure out a way to get a list of all the Coins that Coinbase has listed (not necessarily for trade) but can't figure it out, in the early days it was easy as you could just login and see the list of 4 basic coins that were supported (and could hard code those values in a program and/or script).
But now they have a list of many coins listed, some as I understand, which are not available to actually trade but are listed for educational purposes (as stated on their site when looking at such coins).
I was wondering if anyone has figured out a way to get a list those coins (all supported and simply listed) perhaps with a tag of which are actually supported for trade.
I looked at the API and the REST API (using a simple GET request over HTTPS or using cURL for testing) has the following endpoints:
curl https://api.coinbase.com/v2/currencies - This lists all the Fiat currencies.
and:
curl https://api.pro.coinbase.com/products - This lists all the supported trading pairs (which is not what I'm looking for....)
Any ideas, short of logging in and parsing the html? (which could break since the site can be reformatted etc at any time).
Any help would be greatly appreciated!
perhaps not really what you asked, but you could also use https://api.pro.coinbase.com/currencies
import requests
import json
uri = 'https://api.pro.coinbase.com/currencies'
response = requests.get(uri).json()
for i in range(len(response)):
if response[i]['details']['type'] == 'crypto':
print(response[i]['id])
This will return the coins available for trading.
I'm not sure if I this is the response that you want or not. I first used the first URL that you have listed... The response from that looked like it didn't have the available coins. I then tried the below URL instead and the response does have a lot of curriencies listed on it. You can parse it by loading with JSON and looking for the fields that you want.
Also I didn't see a language posted with your question. I'm using python3 below. If you're a Linux person you can also just use curl GET from the command line. It doesn't matter the language... you just need to make a GET request to that URL and parse the response however you see fit.
To get 1 particular field you can use a line like response['data']['rates']['BTC'] to extract '0.00029200' out of the response/JSON string.
>>> r = requests.get("https://api.coinbase.com/v2/exchange-rates")
>>> response = json.loads(r.text)
>>> pprint.pprint(response)
{'data': {'currency': 'USD',
'rates': {'AED': '3.67',
'AFN': '75.22',
'ALL': '108.84',
'AMD': '487.59',
'ANG': '1.79',
'AOA': '311.37',
'ARS': '37.32',
'AUD': '1.38',
'AWG': '1.80',
'AZN': '1.70',
'BAM': '1.71',
'BAT': '9.00418244',
'BBD': '2.00',
'BCH': '0.00879160',
'BDT': '83.80',
'BGN': '1.71',
'BHD': '0.377',
'BIF': '1824',
'BMD': '1.00',
'BND': '1.58',
'BOB': '6.90',
'BRL': '3.65',
'BSD': '1.00',
'BTC': '0.00029200',
'BTN': '71.11',
'BWP': '10.41',
'BYN': '2.15',
'BYR': '21495',
'BZD': '2.02',
'CAD': '1.31',
'CDF': '1631.00',
'CHF': '0.99',
'CLF': '0.0242',
'CLP': '656',
'CNH': '6.71',
'CNY': '6.70',
'COP': '3174.95',
'CRC': '608.98',
'CUC': '1.00',
'CVE': '96.90',
'CZK': '22.50',
'DJF': '178',
'DKK': '6.52',
'DOP': '50.44',
'DZD': '118.30',
'EEK': '14.61',
'EGP': '17.68',
'ERN': '15.00',
'ETB': '28.52',
'ETC': '0.25542784',
'ETH': '0.00944599',
'EUR': '0.87',
'FJD': '2.10',
'FKP': '0.76',
'GBP': '0.76',
'GEL': '2.66',
'GGP': '0.76',
'GHS': '4.98',
'GIP': '0.76',
'GMD': '49.52',
'GNF': '9210',
'GTQ': '7.74',
'GYD': '208.55',
'HKD': '7.85',
'HNL': '24.49',
'HRK': '6.49',
'HTG': '78.37',
'HUF': '276',
'IDR': '13940.00',
'ILS': '3.63',
'IMP': '0.76',
'INR': '70.93',
'IQD': '1190.000',
'ISK': '120',
'JEP': '0.76',
'JMD': '132.72',
'JOD': '0.710',
'JPY': '109',
'KES': '100.60',
'KGS': '68.70',
'KHR': '4015.00',
'KMF': '429',
'KRW': '1114',
'KWD': '0.303',
'KYD': '0.83',
'KZT': '380.63',
'LAK': '8559.50',
'LBP': '1511.15',
'LKR': '178.40',
'LRD': '160.75',
'LSL': '13.53',
'LTC': '0.03208728',
'LTL': '3.22',
'LVL': '0.66',
'LYD': '1.385',
'MAD': '9.53',
'MDL': '17.05',
'MGA': '3465.0',
'MKD': '53.78',
'MMK': '1519.04',
'MNT': '2453.75',
'MOP': '8.08',
'MRO': '357.0',
'MTL': '0.68',
'MUR': '34.23',
'MVR': '15.49',
'MWK': '728.47',
'MXN': '19.14',
'MYR': '4.10',
'MZN': '61.87',
'NAD': '13.53',
'NGN': '361.50',
'NIO': '32.60',
'NOK': '8.43',
'NPR': '113.78',
'NZD': '1.45',
'OMR': '0.385',
'PAB': '1.00',
'PEN': '3.33',
'PGK': '3.36',
'PHP': '52.13',
'PKR': '139.30',
'PLN': '3.73',
'PYG': '6084',
'QAR': '3.64',
'RON': '4.14',
'RSD': '103.53',
'RUB': '65.47',
'RWF': '886',
'SAR': '3.75',
'SBD': '8.06',
'SCR': '13.67',
'SEK': '9.05',
'SGD': '1.35',
'SHP': '0.76',
'SLL': '8390.00',
'SOS': '582.00',
'SRD': '7.46',
'SSP': '130.26',
'STD': '21050.60',
'SVC': '8.75',
'SZL': '13.52',
'THB': '31.23',
'TJS': '9.43',
'TMT': '3.50',
'TND': '2.968',
'TOP': '2.26',
'TRY': '5.18',
'TTD': '6.77',
'TWD': '30.72',
'TZS': '2317.00',
'UAH': '27.70',
'UGX': '3670',
'USD': '1.00',
'USDC': '1.000000',
'UYU': '32.58',
'UZS': '8380.00',
'VEF': '248487.64',
'VND': '23287',
'VUV': '111',
'WST': '2.60',
'XAF': '573',
'XAG': '0',
'XAU': '0',
'XCD': '2.70',
'XDR': '1',
'XOF': '573',
'XPD': '0',
'XPF': '104',
'XPT': '0',
'YER': '250.30',
'ZAR': '13.27',
'ZEC': '0.02056344',
'ZMK': '5253.08',
'ZMW': '11.94',
'ZRX': '4.04721481',
'ZWL': '322.36'}}}
The following code:
import requests
uri = 'https://api.pro.coinbase.com/currencies'
response = requests.get(uri).json()
for i in range(len(response)):
if response[i]['details']['type'] == 'crypto':
print(response[i]['id'])
Will provide this output:
COTI
BTC
ETH
LTC
BCH
ZEC
XTZ
XRP
XLM
EOS
ALGO
DASH
ATOM
CGLD
FIL
ADA
ICP
SOL
DOT
DOGE
OXT
KNC
MIR
REP
COMP
NMR
ACH
BAND
ZRX
BAT
LOOM
UNI
YFI
LRC
CVC
DNT
MANA
GNT
REN
LINK
BAL
ETC
USDC
RLC
DAI
WBTC
NU
AAVE
SNX
BNT
GRT
SUSHI
MLN
ANKR
CRV
STORJ
SKL
AMP
1INCH
ENJ
NKN
OGN
FORTH
GTC
TRB
CTSI
MKR
UMA
USDT
CHZ
SHIB
BOND
LPT
QNT
KEEP
CLV
MASK
MATIC
OMG
POLY
FARM
FET
PAX
RLY
PLA
RAI
IOTX
ORN
AXS
QUICK
TRIBE
UST
REQ
TRU
WLUNA
you can use
curl -X GET https://api.exchange.coinbase.com/products
refer to
https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproducts
Below query is matching if the partner code below is having asset code, but if no match its not showing it.
i need even if the partner_code is not having asset code to show any result null or 0
select Asset_code, partner_code from Asset
where PARTNER_CODE in ('28800330',
'28800332',
'28800014',
'41900139',
'28800210',
'29200298',
'29200149',
'29200259',
'29200086',
'29400280',
'29000314',
'29000224',
'29600306',
'29100045',
'29800530',
'29800543',
'29900474',
'29700298',
'27400112',
'27400648',
'27400668',
'85400058',
'27300472',
'53200002',
'27800221',
'27800039',
'27200013')
How would we query this clause in the SOLR
and (Jobseeker.eid not in (select eid from jobseeker_emailresume where cid = #usecid# and datesent >= #createodbcdate(emaileddate)# ))
To do it in SOLR i am creating list of inner query result and then i am doing like this
-eid: (5210 OR 5357)
It works PERFECT with small data but for large data it generates Error. Like
-eid: (5210 OR 5357 OR 5405 OR 5408 OR 5492 OR 5575 OR 5700 OR 5817 OR 7179 OR 9054 OR 9358 OR 9947 OR 9948 OR 9953 OR 9999 OR 10086 OR 10290 OR 10430 OR 10492 OR 10835 OR 11022 OR 11144 OR 11250 OR 11289 OR 11417 OR 11459 OR 11571 OR 11885 OR 12033 OR 12322 OR 13130 OR 13511 OR 13712 OR 14237 OR 15103 OR 17193 OR 17929 OR 17930 OR 19110 OR 19111 OR 19979 OR 20165 OR 20182 OR 20653 OR 20754 OR 20813 OR 21878 OR 22049 OR 22057 OR 22262 OR 22298 OR 22506 OR 23372 OR 24114 OR 24617 OR 24897 OR 24986 OR 25252 OR 25842 OR 25924 OR 26202 OR 26225 OR 26230 OR 26937 OR 27239 OR 27511 OR 27903 OR 27904 OR 28113 OR 28153 OR 28280 OR 28342 OR 28459 OR 28611 OR 28635 OR 28726 OR 28806 OR 28842 OR 28852 OR 28921 OR 29033 OR 29034 OR 29313 OR 29415 OR 29502 OR 29742 OR 30633 OR 31149 OR 31406 OR 31545 OR 31653 OR 31822 OR 32585 OR 32678 OR 32784 OR 33239 OR 33291 OR 33778 OR 33875 OR 33966 OR 34153 OR 34249 OR 34549 OR 34559 OR 34598 OR 34873 OR 35084 OR 35183 OR 35230 OR 35268 OR 37163 OR 37226 OR 37920 OR 38503 OR 39127 OR 39311 OR 39428 OR 39838 OR 39976 OR 39977 OR 40094 OR 40226 OR 40804 OR 41591 OR 41592 OR 41593 OR 42967 OR 42968 OR 42969 OR 42970 OR 43984 OR 44102 OR 44391 OR 44441 OR 44442 OR 44443 OR 44906 OR 46454 OR 47307 OR 47308 OR 50076 OR 50800 OR 52786 OR 52865 OR 54051 OR 54713 OR 54795 OR 55244 OR 55347 OR 57156 OR 57519 OR 57530 OR 57935 OR 58160 OR 58715 OR 59089 OR 62793 OR 65067 OR 66103 OR 66755 OR 66879 OR 66895 OR 67307 OR 67557 OR 67558 OR 67559 OR 67929 OR 68328 OR 69549 OR 69949 OR 69950 OR 70374 OR 70397 OR 71441 OR 71442 OR 72188 OR 72227 OR 72850 OR 73268 OR 73572 OR 73573 OR 73574 OR 75603 OR 76204 OR 77218 OR 77965 OR 78594 OR 81761 OR 81785 OR 81958 OR 82557 OR 83013 OR 83610 OR 83748 OR 83805 OR 84204 OR 84392 OR 85277 OR 85611 OR 85687 OR 85771 OR 85940 OR 86147 OR 86419 OR 86503 OR 86526 OR 86773 OR 86807 OR 86825 OR 87212 OR 87524 OR 87586 OR 87599 OR 87601 OR 87836 OR 87843 OR 87891 OR 88043 OR 88065 OR 88080 OR 88171 OR 88282 OR 88345 OR 88541 OR 88565 OR 88571 OR 88610 OR 88932 OR 88980 OR 88998 OR 89253 OR 89334 OR 89534 OR 89775 OR 89903 OR 90201 OR 90721 OR 90780 OR 90786 OR 90973 OR 91167 OR 91235 OR 91356 OR 91436 OR 91469 OR 92098 OR 92319 OR 92358 OR 92379 OR 92407 OR 92933 OR 92974 OR 93844 OR 93857 OR 93859 OR 94165 OR 94332 OR 94400 OR 94543 OR 94590 OR 94608 OR 94764 OR 95006 OR 95185 OR 95186 OR 95200 OR 95372 OR 95516 OR 95535 OR 95691 OR 95844 OR 95858 OR 95890 OR 96032 OR 96127 OR 96333 OR 96402 OR 96411 OR 96516 OR 96642 OR 96717 OR 96746 OR 98073 OR 98192 OR 100637 OR 100778 OR 100801 OR 101278 OR 102111 OR 102901 OR 105136 OR 105324 OR 105361 OR 105423 OR 105953 OR 106042 OR 106307 OR 107282 OR 107554 OR 107682 OR 107909 OR 109035 OR 109866 OR 110052 OR 110239 OR 110482 OR 110582 OR 110614 OR 110905 OR 110910 OR 110918 OR 110940 OR 110982 OR 111103 OR 111214 OR 111555 OR 111559 OR 111588 OR 111671 OR 111694 OR 111994 OR 112156 OR 112201 OR 112289 OR 112533 OR 112543 OR 112723 OR 112764 OR 112767 OR 112931 OR 113229 OR 113380 OR 113912 OR 114591 OR 116450 OR 116479 OR 116602 OR 116914 OR 117119 OR 117439 OR 117591 OR 118100 OR 118277 OR 119008 OR 119150 OR 119936 OR 119988 OR 120225 OR 120394 OR 121408 OR 121604 OR 121652 OR 122078 OR 122229 OR 122338 OR 122460 OR 122548 OR 122691 OR 122887 OR 122954 OR 123121 OR 123334 OR 123617 OR 123773 OR 124005 OR 124116 OR 124488 OR 125024 OR 125768 OR 126244 OR 126255 OR 126408 OR 127314 OR 127333 OR 127524 OR 127835 OR 129178 OR 129751 OR 129866 OR 130052 OR 131160 OR 131324 OR 132218 OR 132774 OR 132821 OR 133195 OR 134343 OR 134467 OR 134881 OR 134944 OR 135164 OR 135237 OR 135401 OR 135798 OR 135841 OR 136082 OR 136302 OR 136448 OR 136534 OR 137779 OR 137975 OR 139485 OR 139756 OR 140653 OR 140863 OR 141163 OR 141299 OR 141688 OR 141990 OR 142498 OR 142906 OR 142949 OR 143705 OR 143746 OR 143824 OR 143871 OR 145840 OR 146122 OR 146942 OR 147171 OR 147294 OR 147561 OR 148267 OR 148440 OR 148745 OR 148828 OR 148893 OR 149351 OR 149689 OR 150281 OR 150460 OR 151143 OR 151317 OR 151400 OR 152527 OR 153523 OR 153674 OR 153682 OR 154264 OR 154726 OR 155019 OR 155271 OR 156261 OR 156734 OR 157062 OR 157532 OR 157787 OR 157989 OR 159032 OR 160365 OR 160686 OR 161064 OR 161199 OR 162974 OR 162976 OR 163037 OR 163041 OR 163083 OR 164013 OR 164308 OR 165056 OR 166001 OR 167875 OR 168324 OR 168465 OR 168476 OR 168481 OR 168805 OR 168971 OR 169667 OR 169781 OR 169791 OR 169799 OR 169823 OR 169839 OR 169856 OR 169861 OR 169906 OR 170054 OR 171688 OR 171918 OR 173448 OR 173693 OR 174269 OR 174759 OR 174912 OR 175261 OR 175456 OR 176489 OR 176530 OR 176817 OR 177421 OR 177718 OR 178016 OR 178568 OR 178658 OR 178784 OR 179218 OR 179502 OR 180755 OR 181379 OR 181444 OR 182098 OR 182188 OR 182239 OR 182353 OR 182844 OR 182881 OR 183303 OR 183916 OR 183988 OR 184592 OR 184650 OR 184748 OR 184929 OR 185504 OR 187055 OR 187957 OR 188624 OR 188742 OR 190526 OR 190629 OR 191002 OR 191788 OR 192750 OR 192986 OR 195237 OR 196425 OR 196724 OR 196854 OR 197644 OR 198748 OR 198779 OR 198854 OR 199987 OR 200263 OR 201314 OR 201554 OR 202916 OR 203482 OR 203692 OR 204459 OR 206788 OR 206899 OR 207005 OR 208235 OR 208911 OR 209473 OR 209556 OR 210399 OR 211285 OR 212181 OR 213541 OR 213964 OR 214121 OR 216028 OR 216099 OR 216350 OR 216671 OR 216993 OR 217188 OR 217370 OR 217908 OR 218010 OR 219557 OR 219577 OR 220999 OR 221478 OR 222383 OR 222859 OR 224069 OR 224193 OR 227344 OR 227755 OR 229869 OR 230524 OR 232757 OR 280657 OR 280778 OR 281397 OR 281457 OR 281579 OR 281696 OR 281869 OR 282037 OR 282428 OR 282833 OR 282847 OR 282863 OR 283643 OR 283900 OR 286425 OR 286669 OR 290646 OR 290652 OR 291032 OR 291627 OR 291690 OR 291937 OR 291988 OR 292571 OR 292954 OR 293107 OR 293140 OR 293770 OR 300440 OR 300676 OR 364729 OR 396076 OR 399672 OR 401771 OR 404663 OR 407833 OR 408291 OR 408417 OR 409144 OR 409869 OR 409932 OR 409972 OR 413848 OR 417121 OR 417175 OR 417271 OR 417731 OR 420873 OR 421311 OR 423860 OR 427704 OR 429494 OR 431623 OR 434445 OR 434770 OR 435192 OR 435272 OR 435691 OR 435789 OR 435806 OR 439094 OR 440242 OR 440775 OR 442692 OR 444563 OR 446094 OR 446317 OR 446329 OR 446613 OR 448782 OR 449934 OR 450137 OR 450291 OR 451289 OR 451378 OR 451449 OR 451533 OR 451539 OR 453204 OR 454019 OR 454117 OR 454225 OR 454289 OR 454626 OR 454645 OR 455264 OR 455290 OR 456226 OR 458453 OR 460800 OR 469149 OR 471859 OR 472154 OR 472344 OR 472484 OR 478639 OR 478899 OR 479693 OR 481099 OR 482096 OR 482188 OR 482669 OR 482737 OR 483798 OR 483997 OR 484034 OR 484194 OR 484829 OR 485099 OR 486072 OR 486118 OR 486292 OR 486360 OR 491205 OR 491275 OR 491565 OR 491723 OR 491864 OR 492085 OR 492101 OR 492146 OR 492157 OR 492317 OR 492331 OR 493187 OR 493320 OR 493335 OR 493450 OR 493493 OR 494028 OR 494134 OR 494246 OR 494443 OR 494509 OR 495028 OR 496430 OR 496731 OR 496783 OR 497485 OR 497815 OR 498808 OR 500728 OR 500930 OR 501121 OR 501373 OR 501870 OR 502361 OR 502952 OR 503053 OR 503147 OR 503379 OR 503964 OR 504193 OR 504603 OR 505969 OR 506023 OR 507031 OR 507783 OR 507798 OR 508141 OR 508318 OR 509092 OR 509641 OR 510189 OR 510448 OR 510532 OR 510999 OR 511803 OR 511959 OR 512096 OR 512487 OR 513490 OR 514019 OR 514020 OR 514223 OR 514481 OR 514539 OR 515171 OR 515184 OR 515492 OR 515564 OR 515723 OR 515750 OR 516834 OR 517032 OR 517070 OR 517179 OR 517956 OR 517959 OR 518742 OR 519145 OR 519156 OR 519317 OR 519474 OR 519615 OR 519648 OR 521519 OR 521556 OR 524181 OR 524972 OR 525103 OR 525163)
You need to make sure that your inner query does not exceed the maximum number of allowed boolean clauses. This maximum number can be configured in the configuration script.
Without knowing your domain logic a bit better, you may want to try to denormalize the logic in that subquery into your Solr search query. You have a subquery that's testing values that could themselves be indexed into Solr, allowing you to still do the bulk of your querying from Solr, and saving you from having to pass in a huge list of 'approved' IDs.
Solr by default has a limit of 1,024 OR clauses. If you bump into this limit, you're probably doing something that's not really a good fit for Solr.