#community-help

Troubleshooting Document Import Error

TLDR GM faced error issues while importing documents, possibly due to geolocation values. Patrik offered possible causes and Kishore Nallan identified the main issue and resolution.

Powered by Struct AI

1

14
14mo
Solved
Join the chat
Oct 25, 2022 (14 months ago)
GM
Photo of md5-9f364f57af6f71faaf6ea963342ef3f6
GM
07:07 AM
There were some errors importing your documents. 

[
  {
    "code": 400,
    "document": "{\"storename\":\"String Value\",\"ZipCode\":0,\"Street\":\"String Value\",\"City\":\"String Value\",\"State\":\"String Value\",\"location\":[1,-1],\"Address\":\"String Value\",\"Country\":\"String Value\",\"phone\":\"String Value\",\"points\":0}",
    "error": "[json.exception.type_error.302] type must be number, but is array",
    "success": false
  }
]

Patrik
Photo of md5-1e5d7ffd1cc67805b3b347e7edaa1b1d
Patrik
07:39 AM
GM i dont thins 1 and -1 are valid geolocation values, but wait for moderator answer
GM
Photo of md5-9f364f57af6f71faaf6ea963342ef3f6
GM
07:39 AM
i tried with values too..still same error
07:40
GM
07:40 AM
Patrik
Patrik
Photo of md5-1e5d7ffd1cc67805b3b347e7edaa1b1d
Patrik
07:41 AM
also be sure you dont switch lat and long values
07:42
Patrik
07:42 AM
must be [lat, long]
GM
Photo of md5-9f364f57af6f71faaf6ea963342ef3f6
GM
07:42 AM
yes..tried both..
07:43
GM
07:43 AM
Patrik
Photo of md5-1e5d7ffd1cc67805b3b347e7edaa1b1d
Patrik
07:44 AM
are you sure location is geopoint type? havent you old schema where location was int*?
07:45
Patrik
07:45 AM
if not wait for moderator
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
07:55 AM
The default sorting field cannot be a location (in the schema). In recent 0.24 RC builds we will send a nicer error message for this.
GM
Photo of md5-9f364f57af6f71faaf6ea963342ef3f6
GM
07:59 AM
okay..how to update existing schema?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
07:59 AM
You've to delete the collection and recreate it.
GM
Photo of md5-9f364f57af6f71faaf6ea963342ef3f6
GM
08:14 AM
awesome it works..thanks..

1

Typesense

Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI

Indexed 3011 threads (79% resolved)

Join Our Community

Similar Threads

Issues in Transferring Data from Firestore to Typesense

Ramees encountered issues in Google Cloud Function Log for data transfer from firestore to typesense. Jason helped troubleshoot, updated the cluster, increased the connection timeout, and resolved the issue.

1

32
30mo
Solved

Resolving Typesense v0.22.0 Import Issues

Anton encountered issues importing documents in batches using Typesense v0.22.0. Kishore Nallan suggested using atomic import and proposed a debug build. After multiple trials, they were able to reproduce and fix the issue. Anton confirmed the solution was working.

1

57
27mo
Solved

Troubleshooting Issues with DocSearch Hits and Scraper Configuration

Rubai encountered issues with search result priorities and ellipsis. Jason helped debug the issue and suggested using different versions of typesense-docsearch.js, updating initialization parameters, and running the scraper on a Linux-based environment. The issues related to hits structure and scraper configuration were resolved.

7

131
8mo
Solved

Issues with Importing Typesense Collection to Different Server

Kevin had problems migrating a Typesense collection between Docusaurus sites on different machines. Jason advised them on JSONL format, handling server hosting, and creating a collection schema before importing documents, leading to successful import.

3

35
3mo
Solved

Trouble with Creating Collections and Uploading Documents with GeoPoints

Ed is struggling to create a collection and upload documents with geopoints in the cloud due to consistent timeout errors. Kishore Nallan suggests using a recent build and trying with a single document first, and offers to help further when available.

32
4mo