blevesearch / bleve

A modern text/numeric/geo-spatial/vector indexing library for go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error error parsing created field: parsing time "1714686445000000000" as "2006-01-02T15:04:05Z07:00": cannot parse "686445000000000" as "-"

prologic opened this issue Β· comments

Not actually sure where this error is coming from. So asking... Was there a recent change in the way Bleve handles and parses Time fields? I have an existing index that I'd rather not have to nuke and start over πŸ˜…

@prologic would you perhaps share some sample code and/or more details here that could aid us in reproducing the situation.

@CascadingRadium would you look into this please.

All the code is here: https://git.mills.io/yarnsocial/search

Unfortunately I found this out by accident, so I haven't had much time to dig into it to build a reproducer.

I noticed this in a local dev environment, and just (wrongly) assumed my local index db was corrupt, blew it away and thought nothing of it. But this is happening in my production app at https://search.twtxt.net/

Let me know what I can do to help debug this πŸ™ I can probably shove the index somewhere for you?

Meanwhile I'm going to take a copy of the production index and see if the error reproos locally to debug.

hi i have repro'd the issue, will put out the fix soon
thanks

Oh wow that was fast! Sorry guys I had to go to bed, I couldn't wait to copy the production DB I have to repro locally which is 2.1G Tar uncompressed πŸ˜… Thanks so much for the fast fix! I assume we'll release/tag a new patch/minor release?

Thank you! This bug appears to be fixed!

Example: https://search.twtxt.net/search?q=conv:%23f57rmoq&s=created&s=_id

I upgraded to v2.4.1-0.20240503220319-1a19544cd875 in 3031765b98

hi @prologic bleve version v2.4.1 has been released with the fix. please use
github.com/blevesearch/bleve/v2 v2.4.1
in the go.mod thanks

I hate to report, but this has happened again.

Error error parsing created field: parsing time "1714591133000000000" as "2006-01-02T15:04:05Z07:00": cannot parse "591133000000000" as "-"

Reproducible currently in prod: https://search.twtxt.net/search?q=Hello+World&f=

Notably not all queries are failing.

Also of note, no update to the bleve dependency this time. According to Git blame I'm using github.com/blevesearch/bleve/v2 v2.4.1-0.20240503220319-1a19544cd875 and that was update 2 months ago from this issue report and initial fix.

@prologic giving us a deterministic test case would be greatly helpful.

@CascadingRadium would you take a look into the code to see if if we can spot any other path that could cause this.

Let me know how I can help provide a reproducible test! I can even provide the data files if that helps as there's nothing sensitive in them. It's all publicly accessible anyway.

hi @prologic
from what i see from manual testing

  • every result (search hit), corresponding to a document which is indexed before the time the upgrade, is getting errored out
  • whereas every result (search hit), corresponding to a document which is indexed after the time the upgrade, is getting retrieved correctly

this suggests that somehow the code has fallen back to an old version <2.4.1

could you please confirm that all the dependent libraries of your search service are using atleast v2.4.1

I'm reasonably confident that the only commit that updated bleve from v2.4.0 to v2.4.1 was: https://git.mills.io/yarnsocial/search/commit/3031765b98dd9a6a85affceb72f6d3707704ac96 no changes in bleve dependencies since.

At this point would you recommend I rebuild the index? (I can thankfully)

yea if that is ok

Will do! I'll close this issue. Many thanks!