I was using a previous version of ES in order to apply regexp on an _uid field by using the following query (_trying to get id fields greater than 26 characters):
Unfortunately, after upgrading to the latest version of ES, I got the following error when running the same search:
TransportError(400, u'search_phase_execution_exception', u'Can only use regexp queries on keyword and text fields - not on [_uid] which is of type [_uid]')
Is the regexp support over meta fields no longer supported?
Is there any other way of doing this that I might be missing?
And the summary is that no, regexp on _uid is not supported anymore, and the reason is:
We plan on switching _uid to a more compact (binary) representation in the future, which will make the uid field incompatible with regexp, prefix or wildcard queries. So I don't think we should allow this again.
It may have worked but I don't think it worked "as expected". The script.engine.groovy.inline.update setting doesn't have anything to do with the regexp query. Unless you really need to turn on inline groovy scripting I'd turn it off because it is a security nightmare.
I think your issue is that _uid changed to not allow those kinds of queries. I opened an issue to discuss it:
I don't know that we'll want to support those queries for _uid, but that'll be settled in the issue. You should be able to work around the issue using a script query and the doc values storage for _uid but it'll be much slower because it won't be able to use the index.
I messed up the question by adding the groovy thing, totally true that it was not related to that at all, I already edited the question for the sake of clarity
I'll follow up that discussion then, as I see it's no longer possible to do what I was doing before !
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.