mattico / elasticlunr-rs

A partial port of elasticlunr to Rust. Intended to be used for generating compatible search indices.
Apache License 2.0
52 stars 23 forks source link

Remove check that caused docInfo to be empty #5

Closed Phaiax closed 6 years ago

Phaiax commented 6 years ago

Hey Mattico, I fixed a little bug :)

add_field_length is called before add_doc, so the early return was always triggered.

The other changes are just my text editor removing trailing whitespace.

:), Phaiax

mattico commented 6 years ago

I have a bit different fix in mind which should fix the test failures. Nice find, though! I'm surprised the tests didn't detect this breakage, I'll have to add one.

mattico commented 6 years ago

Changed my mind. There's no good way to fix this without changing DocumentStore's API, so we might as well do this simple fix.