Hi,
Unfortunately I am still struggling to make a spatial query.
Here is my schema:
# create schema for Xplan GML data
schema = {
"classes": [{
"class": "XPlan",
"description": "Simplied XPlanung schema that contains information relevant to search",
"invertedIndexConfig": {
"bm25": {
"b": 0.75,
"k1": 1.2
},
"properties": [
{
"dataType": [
"string"
],
"description": "XPlanung namespace",
"name": "namespace"
},
{
"dataType": [
"string"
],
"description": "BP_Plan id",
"name": "bp_plan_id"
},
{
"dataType": [
"string"
],
"description": "BP_Plan name",
"name": "name"
},
{
"dataType": [
"string"
],
"description": "BP_Plan number",
"name": "number"
},
{
"dataType": [
"string"
],
"description": "BP_Plan acceptance data",
"name": "acceptance_date"
},
{
"dataType": [
"string"
],
"description": "Gemeinde name",
"name": "gemeinde_name"
},
{
"dataType": [
"string"
],
"description": "Plan type",
"name": "plan_type"
},
{
"dataType": [
"string"
],
"description": "Legal status",
"name": "legal_status"
},
{
"dataType": [
"string"
],
"description": "BauNVO date",
"name": "baunvo_date"
},
{
"dataType": [
"geoCoordinates"
],
"description": "Lower corner of bounding box",
"name": "lower_corner"
},
{
"dataType": [
"geoCoordinates"
],
"description": "Upper corner of bounding box",
"name": "upper_corner"
},
]
}}]}
client.schema.create(schema)
client.schema.get()
Here I load the data:
# batch load csv file of gml data to Weaviate instance
inputFile = file_name_gml
i = 0
client.batch.configure(
batch_size=100,
dynamic=True,
timeout_retries=3,
callback=None,
)
with open(inputFile, 'r', encoding='utf-8', newline='') as f:
reader = csv.DictReader(f)
for row in reader:
try:
properties = {
"gemeinde_name": row["GemeindeName"],
"name": row["BP_PlanName"],
"bp_plan_id": row["BP_PlanID"],
"namespace": row["XPlanNamespace"],
"baunvo_date": row["BauNVODate"],
"legal_status": row["LegalStatus"],
"lower_corner": {"latitude": row["LowerCorner1"], "longitude": row["LowerCorner2"]},
"upper_corner": {"latitude": row["UpperCorner1"], "longitude": row["UpperCorner2"]}
}
client.batch.add_data_object(properties, "XPlan")
i += 1
except:
print("Error at row " + str(i))
#print(properties)
if (i % 100 == 0):
client.batch.flush()
print(i)
# Flush the remaining buffer to make sure all objects are imported
client.batch.flush()
…and when I try to run my query I get an error response that I don’t understand…
get_results_where = """
{
Get {
XPlan(where: {
operator: WithinGeoRange,
valueGeoRange: {
geoCoordinates: {
latitude: 52.42,
longitude: 4.82
},
distance: {
max: 2000
}
},
path: ["lower_corner"]
}) {
name
lower_corner {
latitude
longitude
}
}
}
}
"""
query_result = client.query.raw(get_results_where)
print(query_result)
Error:
{'data': {'Get': {'XPlan': None}}, 'errors': [{'locations': [{'column': 7, 'line': 4}], 'message': 'explorer: list class: search: object search at index xplan: local shard object search xplan_jichOTq0Uljq: fetch doc ids for prop/value pair: geo index range search on prop "lower_corner": entrypoint was deleted in the object store, it has been flagged for cleanup and should be fixed in the next cleanup cycle', 'path': ['Get', 'XPlan']}]}
Do you have any hints on where this is going wrong?