I have created the following override: ```[0] =&gt...
# community-help
j
I have created the following override:
Copy code
[0] => Array
                (
                    [excludes] => Array
                        (
                        )

                    [id] => bundle-COMP01_ART38169-3676
                    [includes] => Array
                        (
                            [0] => Array
                                (
                                    [id] => COMP01
                                    [position] => 1
                                )

                        )

                    [rule] => Array
                        (
                            [match] => contains
                            [query] => Final de tarde
                        )

                )
COMP01 is the id of an existing entry. But when I search for "Final de tarde" the entry COMP01 does not appear. Did I make a mistake somewhere?
j
Hmm, this should work...
Could you try replicating this on a collection with a few records?
j
I have other overrides, but all of them have empty [excludes]. This would mean that no interaction between them could cancel the appearance of COMP01, correct?
j
Correct...
j
I will try to replicate on a small set.
OK, I created a new collection called 'debug' for testing. It has more or less 150 entries and for each one 3 or 4 overrides. Now, is there an easy way to query this collection (since I would not like to modify our production site for this test)?
j
If you're on Typesense Cloud, you could query from the dashboard...
j
Yep, it still does not bring COMP01...
j
Could you DM me your cluster ID?
j
This is the relevant override
Now, where do I see the linked document (which in this case would be COMP01)?
I just created manually an equivalent override with the search query to curate being "chicken pox" and linked as well to COMP01. This one works...🤔
j
Just realized that the Typesense Cloud UI for Overrides uses a feature that is only available in v0.22.2 and later of Typesense server...
That's why the UI under "Pin Documents" is blank. It should have shown you the actual documents that are pinned
That is a separate issues though... Overrides not being triggered is still strange. It could be a bug with how "contains" works in that version
We did fix one related issue in the latest RC build of Typesense server
I know we had a separate email thread going about updating your cluster to the latest RC. Could you implement the change needed so we can upgrade you to the latest version? We can then see if we can replicate this overrides issue on that build, and debug from there
j
We have made the upgrade and decided to revert it as it we liked the search better on the current version...
Now, another thing I noticed with my manually created example. If I search for "chicken pox" and I just add a space the override gets ignored... Isn't that weird
j
That's because the override you added is an "exact" match override
The other ones you had were "contains" match
We have made the upgrade and decided to revert it as it we liked the search better on the current version...
It was related to ID searches right? The solution for that is to index the ID in a new field and use that in query_by. In the latest version we've excluded ID from being searchable, that's why ID searches didn't return any results.
j
No, ID searches were a small side unimportant issue...
j
Oh I see, mind sharing more examples of searches that didn't surface the expected results in that email thread? I'd love to get to the bottom of those
j
It was really a search results one. Since our entries are arts, people are searching more for concepts than actual well defined ideas. And we think the results were better before...
It's not that the search results were irrelevant, they simply were better before...
That's why I wondered about being able to configure this programatically... that way we could upgrade...
j
I'd love to get to the bottom of those
... because any fixes we do will only go into the latest release, so you would have to upgrade at some point. So I'd want to see how we can configure the search to rank results based on your preference even in the new version. So if you're able to share some examples of search terms in that email thread, we can see how to configure the search appropriately.
j
Now, returning to our tests in the debug collection: I changed from EXACT to CONTAINS and... it stopped including COMP01!
j
Yeah, so it looks like a bug with contains match in that version...
j
Except contains works for other overrides! That's the weird thing.
Let me give you an example.
This one is OK!
(this one is in our 'arts' collection)
Hey, but I saw just now, it looks like the match is on the ID of the document!
OK, just found a dirty fix then. I just need to make the ID have the search term as well. In the 'debug' collection I updated my override to be 'test-override-chicken-pox'. And now it returns COMP01!
j
Ha!! I'm really surprised this works 😅 😓
😃 1
j
Now, regarding "examples of search terms to configure the search appropriately" it will be hard, unless you would be able to create a copy of our data to a latest version cloud in a test account... Is this a possibility?
j
@John Doisneau If you can install Docker on your local machine, it's just a few commands to run Typesense locally: https://typesense.org/docs/guide/install-typesense.html#from-the-docker-image