Script queries are not always going to be very performant. If you plan to use this query often, you are better off with indexing the modulo 10 as a separate field in your documents. That will allow you to query that field without the need for any scripting.
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.