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
The API feels a bit strange calling add_document_to_index(), remove_document_from_index() and vacuum_index() as they all accept &mut index as the first parameter.
Whilst we are making breaking changes I suggest using methods on Index:
Yes you are right! At line 34 there is also already an impl for Index, so that makes a lot of sense! I think the reason for this, is that I was playing around with different memory layouts for the Index when building this library. There is a ghost_cell implementation that is about 30% more faster (if I remember correctly) in the ghost branch of this repo, where I think this, for some reason was justified. But I never succeeded to make the ghost_cell implementation compatible with WASM that requires you to be able to wrap the index with Mutex<...>.
In all, the change you suggest is preferred and is more idiomatic
The API feels a bit strange calling
add_document_to_index()
,remove_document_from_index()
andvacuum_index()
as they all accept&mut index
as the first parameter.Whilst we are making breaking changes I suggest using methods on
Index
:I think this is more idiomatic. What do you think?
The text was updated successfully, but these errors were encountered: