code: public Query rewrite(IndexReader reader) throws IOException {
          if (version.getVersion() >= IndexFormatVersion.V3.getVersion()) {
              return new JcrTermQuery(new Term(FieldNames.LOCAL_NAME, localName));
          } else {
              throw new IOException("LocalNameQuery requires IndexFormatVersion V3");
          }
      }
docs: {@inheritDoc}