db.visits.ensureIndex({rawdata:-6ren">
gpt4 book ai didi

Mongodb 索引错误 "text contains invalid UTF-8"

转载 作者:可可西里 更新时间:2023-11-01 10:49:43 29 4
gpt4 key购买 nike

Whenever am trying to index an collection I get the following error> db.visits.ensureIndex({rawdata:"text"}){        "ok" : 0,        "errmsg" : "text contains invalid UTF-8",        "code" : 28755,        "codeName" : "Location28755"}>The rawdata contain Email:Time:UrlAm using Mongo / WindowsThe data were inserted using mongoimport from 2 tsv filesWhen I imported the 1st file alone in new collection , indexing was done normallyThe second file in new collection raised up the problem again while indexing itBut honestly I can't find the wrong lineBoth file contain around +50 million linesAny help would be appreciated

最佳答案

我通过使用 010 编辑器将非 UTF-8 字符串转换为 UTF 格式解决了这个问题如果有人有更好的解决方案,将受到欢迎

关于Mongodb 索引错误 "text contains invalid UTF-8",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43030378/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com