Closed
Description
Test with below code:
class TestUnsignedField:
def test_query_from_unsigned_field(self):
schema = SchemaBuilder().add_unsigned_field("order", indexed=True).build()
index = Index(schema)
writer = index.writer()
doc = Document.from_dict({"order": 1})
writer.add_document(doc)
writer.commit()
index.reload()
query = index.parse_query("order:1", ["order"])
result = index.searcher().search(query, 1)
assert len(result.hits) == 1
The extract_value in document.rs will try to interpret it as i64 at first while it should be interpreted as u64. We may need to pass schema into from_dict.
I also met this issue when I try to support json field where it interpreted the field as String at first.
Metadata
Metadata
Assignees
Labels
No labels