Comments (6)
@bixb0012 yes this is a result of optimization in search logic, not by the Python API, but by the REST API. Searching returns results from an index that captures only certain fields and size is not part of it. However when you use get
, you query and obtain the full item. Hence the disparity.
After filtering your search result, you could call the _hydrate()
method on the item of interest to get its size among other information.
This is not documented because they hydration logic happens transparently to the user when you request for a property that is not initialized.
from arcgis-python-api.
@AtmaMani , thanks for the prompt reply and additional information.
I get what you are saying about the REST API doing the optimization, and why that would be beneficial.
I tried calling _hydrate()
and it does do the trick. That said, I am a bit confused with your comment about hydration, not the logic/concept but the results I am seeing. If hydration "happens transparently to the user when you request for a property that is not initialized," why doesn't it happen when I try to retrieve the size initially?
from arcgis-python-api.
@bixb0012 good point, I anticipated that question from you. Interestingly size
property was not uninitialized in the response from portal when you did a search query. Instead, it was set to -1
, hence the hydration logic did not kick in when you queried for that property.
I will discuss this over with the portal team and see if the server can drop this key value pair in the JSON response for search query since its not indexed anyway.
from arcgis-python-api.
Any updates from the Portal team? If, for whatever reason the Portal team doubles down on -1
, do you think the hydration logic could be updated to trigger with invalid/nonsensical values like -1
?
from arcgis-python-api.
@bixb0012, thanks for the suggestion. We will fix this in the next update.
from arcgis-python-api.
Fixed in v1.0.1 of arcgis package
from arcgis-python-api.
Related Issues (20)
- Error while trying to run Tensorflow backend in FeatureClassifier HOT 1
- clone_items() failing when item it pointing to a specific layer in feature service HOT 7
- ArcGis HOT 3
- item.update(item_properties={"typeKeywords': "values"}) fills in default values HOT 2
- spatial.to_featureset() returns date fields as float when the first row is NaT HOT 1
- `Geometry._repr_svg_() missing 1 required positional argument: 'self' error` when creating an `arcgis.geometry.Polygon` HOT 3
- Requests to ArcGIS server send 2x when Portal secured with IWA HOT 1
- Feature layer query introduces duplicates when querying above 2000 records HOT 2
- clone_item() hosted feature service referencing to source portal HOT 1
- Empty 'name' property of an arcgis item object causes crash when trying to clone
- arcgis package not getting installed on azure function app HOT 2
- Unable to create user HOT 6
- Adding assignment to workforce does not work
- Error when calling shaded_relief_ob = RFT(shaded_relief_rft) in shipwrecks_detection_using_bathymetric_data.ipynb HOT 1
- Failed to upload the local experience when set the parameter "auto_remap=True" HOT 1
- arcgis.gis.server.Server Incorrectly States Login Successful When ArcGIS Site URL or Credentials Are Invalid HOT 1
- EnterpriseVectorTileLayerManager.edit() HOT 1
- arcgis..gisgis.GIS() crashing python when Portal domain has bad intermediate SSL certs HOT 1
- EnterpriseVectorTileLayerManager.edit() needs wrapped with a .start() .stop() for exportTiles=True to work
- Bug in Lib\site-packages\arcgis\_impl\common\_query.py HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arcgis-python-api.