You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to use field_terms function of whoosh.reading.IndexReader class, an exception is raised. Using the following index and documents as a test
When attempting to retrieve all terms for the m_date field via list(read.field_terms('m_date')), an OverflowError is raised with the following message:
It seems that this is caused by a DATETIME field having extra terms added on by whoosh. For example, printing the result of read.all_terms() gives the following:
The terms of the content and doc_ID field all makes sense given the documents, but the m_date field has extra terms stored in the index. Printing out the content of the m_date field using the following code:
When attempting to use
field_terms
function ofwhoosh.reading.IndexReader
class, an exception is raised. Using the following index and documents as a testWhen attempting to retrieve all terms for the
m_date
field vialist(read.field_terms('m_date'))
, anOverflowError
is raised with the following message:It seems that this is caused by a
DATETIME
field having extra terms added on by whoosh. For example, printing the result ofread.all_terms()
gives the following:The terms of the
content
anddoc_ID
field all makes sense given the documents, but them_date
field has extra terms stored in the index. Printing out the content of them_date
field using the following code:This prints four datetime values (which are the values for the documents)
...before running into an overflow exception on the fifth term,
b'\x08\x00\x80\xdd\x88\xed\x0fe\xa0'
. Using the code that's in theNUMERIC
class,Obviously this raises an exception since python dates cannot be before year 0.
Do we know what the extra terms added for the
DATETIME
field in the index is?The text was updated successfully, but these errors were encountered: