Hi everyone, how can i change facet value once the...
# community-help
r
Hi everyone, how can i change facet value once the collections are indexed? when i run the command provided in readme, it creates schema with facet value false for every fields, i wan to change it to true for some fields?
k
👋 Hi Roshan. I don't follow you. Do you mean adding a new field as a facet?
r
@Kishore Nallan I mean i need to change facet value from false to true to some fields
k
Got it, as of now, we don't have a way to alter the schema. You have to recreate the collection and index it. But this feature is prioritized so planning to have it soon.
r
I'm currently using typesense-mongodb cli tool for creating schema and indexing
How can i enable faceting for some fields
using cli tool
k
You can pre-create the collection before running that tool for syncing.
r
npx typesense-mongodb \    --mongo-collection=test \    --mongo-database=test \    --typesense-collection=typesense-collection \    --mongo-url=mongodb://localhost:27021 \    --typesense-url=http://localhost:8108 \    --typesense-api-key=abc
👀 1
I'm using this command
You can pre-create the collection before running that tool for syncing
How can i do that ? can you share link for this? @Kishore Nallan
Just create the collection that way before you start the CLI tool (https://github.com/typesense/typesense-mongodb)
r
ok I created the collection now I want to connect that collection with mongodb data(collection) @Kishore Nallan?
how can i do that?
k
Just pass the collection name via the
--typesense-collection
cli argument.
r
If i create a collection and try to use in cli as arguments, it says collection already created.
k
Hmm, that should not be the case. Can you please create an issue on the Github repo with the details, we will take a look.
r
ok