#indexing is not working properly

36 messages · Page 1 of 1 (latest)

charred badge
#

What's the error?

#

How many document you have in that collection?

#

Mmm not to many

#

Check that. #🌩│cloud message

#

Is that on the cloud?

#

So of the delay it can take some time.

#

As for your unique index, the id attribute is the user id?

#

So what is barcode?

#

And you want to make sure that
If user A has product B
**Then **user B can't also have product A?

#

Okay

#

So what is barcode?
The product barcode?

#

Okay
So just set id as a unique index.
Then, once any user choose that one, no one else will be able to

unreal moon
charred badge
#

biscuit?
Meaning?

unreal moon
#

that what i want

charred badge
#

Ohh okay

#

So here you said the user B is also able to add that product?

#

So, What part you want to make unqiue?

unreal moon
#

want to set unique my product id so that one user cant use same product id for differrent produt or i can say handling dupplicate

charred badge
#

So you want to make sure that the combination of Product+ID is unqiue?

charred badge
#

What part you want to be unqiue in your collection?
What set of data?

#

Okay,
What are those two fields?
id - product id
barcode - ?

And what's not working?

#

Okay

#

There is no out-of-the-box way to achieve this.

What I would do is to add another attribute name user_id, then I will create a unique index that combined user_id + id
This way I can rest assure that any user can have any product just once.

unreal moon
charred badge
#

This probably because you've two-values that are the same.

When you've added the user_id attribute, it's now empty? if so make sure you don't have any two id values that are the same

#

Because if they are the same you won't be able to add unique as it's not unique.

unreal moon
#

index creating is fail in clould version if size is more the 400 for string, changed size now able to create indexing

#

but this is not if my attribute size is large

unreal moon
charred badge
#

It's working now?

#

👍

unreal moon
charred badge
#

Click on the menu on the top

#

But I'm no sure it will delete the whole post.