Unique Id error in Custom Selector when content lib query

Enonic version: 7.0.2
OS: Ubuntu 19

Hello again… when I do a query like _“fulltext(‘data.title’, '” + text + “’, ‘AND’) and _path like '/content/" + site + "/’” in my Custom Selector Service I end up getting unique id error at random with the same value of text. Is it possible that I actually have content with duplicated ids in my site? How can I look it up?

Edited: There is no exceptions to the error as I thought before, reducing the number of return (count) only reduces the chance of a error to happen.

We had similar complaints before and it turned out they were caused by multiple requests simultaneously sent to the Content Selector’s service. Can you check that it’s not the case? Also, you could add logging to the service which will log query results and simply check the log when you get an exception.

First I let the query return all results (in which case the selector takes a few seconds to load) and I can easily reproduce the error by spamming a character (like in the word TEST, remove last T, write it again, remove and so on till error) but when limiting the query to 7 results making it faster I need to spam it real hard for the error to occur. The service itself doesn’t generate any exception and it seems to be returning the results just fine when there is an unique id error. I’ve added another check to remove duplicated id and even so it happens.
But what it really felt like is that there can be a really bad timing in between the speed the user type, the speed of the query and its return and how the selector gets that result validate and fills itself.