Excluding a Facet Issue in Typesense

TLDR Stefan had an issue excluding a facet in Typesense v0.21.0. Kishore Nallan clarified that the :!= syntax replaced the old :- syntax. The solution was upgrading to the latest version. Jason added there's no easy downgrading from v0.22.0 to v0.21.0.

Powered by Struct AI
Join the chat
Nov 02, 2021 (24 months ago)
Photo of md5-d6c265b4792dbf0a1d6ae378f39d8736
04:31 PM
Is there a known bug w.r.t to excluding a facet?
As far as I understand the docs the code below should exclude "Cleansers" from the facet, but it returns the same results as := . I am running v0.21.0. image id: 2d94fc7c161b
filter_by: category_functional:!=Cleansers
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
04:35 PM
Can you please tell me the exact Typesense version by hitting the /debug end-point?
Kishore Nallan
04:36 PM
Very early preview of the exclusion feature had a :- syntax. It eventually became :!=
Photo of md5-d6c265b4792dbf0a1d6ae378f39d8736
04:37 PM
one sec, I upgraded my local one to the latest rc and it works, but my stating one still is refusing
04:53 PM
Okay, my apologies, I ran an outdated version on my server. I was sure I was running the latest stable on my local docker but I might have mixed something up.

I upgraded the version in my staging env: Works
Locally it doesn't start anymore when I try to go back from the latest rc to v0.21.0
04:53 PM
but I guess if it works with the latest image, all good! Thank yo
04:54 PM
In case it easy downgraded is a requirement for you, this is the error:
E20211102 16:49:59.600389   204 store.h:157] Error while fetching the key: $KN - status is: Corruption: Unknown Footer version. Maybe this file was created with newer version of RocksDB?
E20211102 16:49:59.600395   204 collection_manager.cpp:102] Auth manager init failed, error=Error while fetching the next API key id from the store.
E20211102 16:49:59.600419   204 store.h:157] Error while fetching the key: $CI - status is: Corruption: Unknown Footer version. Maybe this file was created with newer version of RocksDB?
E20211102 16:49:59.600423   204 raft_server.cpp:519] Typesense failed to start. Could not load collections from disk: Error while fetching the next collection id from the disk.
I20211102 16:49:59.600445   204 snapshot_executor.cpp:264] node default_group: snapshot_load_done, last_included_index: 39647 last_included_term: 221 peers: ""
E20211102 16:49:59.600454   204 raft_server.h:249] Met peering error {type=StateMachineError, error_code=1, error_text=`StateMachine on_snapshot_load failed'}
W20211102 16:49:59.600458   204 node.cpp:1264] node default_group: got error={type=StateMachineError, error_code=1, error_text=`StateMachine on_snapshot_load failed'}
E20211102 16:49:59.600469   196 snapshot_executor.cpp:393] Fail to load snapshot from local:///data/state/snapshot
E20211102 16:49:59.600478   196 node.cpp:530] node default_group: init_snapshot_storage failed
E20211102 16:49:59.600483   196 raft_server.cpp:118] Fail to init peering node
I20211102 16:49:59.600486   196 node.cpp:929] node default_group: shutdown, current_term 221 state UNINITIALIZED
I20211102 16:49:59.600533   201 raft_server.h:245] This node is down
E20211102 16:49:59.600579   196 typesense_server_utils.cpp:256] Failed to start peering state
Photo of md5-8813087cccc512313602b6d9f9ece19f
04:59 PM
Yeah we had to upgrade an internal data structure in v0.22.0 for which we unfortunately had to sacrifice the ability to easily downgrade from v0.22.0 to v0.21.0 with a process restart...