Source:
<code>private List<IndexableField> toLuceneFields(HttpCacheEntry entry) throws IOException { List<IndexableField> fields = new ArrayList<>(); <START> fields.add(new StringField(REQUEST_DATE_FIELD_NAME, Long.toString(entry.getRequestDate().getTime()), Store.YES)); <END> fields.add(new StringField(RESPONSE_DATE_FIELD_NAME, Long.toString(entry.getResponseDate().getTime()), Store.YES)); StatusLine statusLine = entry.getStatusLine(); fields.add(new StringField(STATUS_CODE_FIELD_NAME, Integer.toString(statusLine.getStatusCode()), Store.YES)); fields.add(new StringField(REASON_PHRASE_FIELD_NAME, statusLine.getReasonPhrase(), Store.YES)); ProtocolVersion protocolVersion = statusLine.getProtocolVersion(); fields.add(new StringField(PROTOCOL_FIELD_NAME, protocolVersion.getProtocol(), Store.YES)); fields.add(new StringField(MAJOR_PROTOCAL_VERSION_FIELD_NAME, Integer.toString(protocolVersion.getMajor()), Store.YES)); fields.add(new StringField(MINOR_PROTOCOL_VERSION_FIELD_NAME, Integer.toString(protocolVersion.getMinor()), Store.YES)); Header[] headers = entry.getAllHeaders(); for (int index = 0; index < headers.length; index++) { Header header = headers[index]; fields.add(new StringField(HEADER_FIELD_NAMES + '/' + index + '/' + header.getName(), header.getValue(), Store.YES)); } Resource body = entry.getResource(); if (body != null) { fields.add(new Field(BODY_FIELD_NAME, IOUtils.toByteArray(body.getInputStream()), new FieldType())); } if (entry.hasVariants()) { for (Entry<String, String> variant : entry.getVariantMap().entrySet()) { fields.add(new StringField(VARIANT_FIELD_NAMES + '/' + variant.getKey(), variant.getValue(), Store.YES)); } } return fields; }</code><technical_language>need index. StoredField instead</technical_language>

Target:
private List<IndexableField> toLuceneFields(HttpCacheEntry entry) throws IOException { List<IndexableField> fields = new ArrayList<>(); fields.add(new StoredField(REQUEST_DATE_FIELD_NAME, Long.toString(entry.getRequestDate().getTime()))); fields.add(new StoredField(RESPONSE_DATE_FIELD_NAME, Long.toString(entry.getResponseDate().getTime()))); StatusLine statusLine = entry.getStatusLine(); fields.add(new StoredField(STATUS_CODE_FIELD_NAME, Integer.toString(statusLine.getStatusCode()))); fields.add(new StoredField(REASON_PHRASE_FIELD_NAME, statusLine.getReasonPhrase())); ProtocolVersion protocolVersion = statusLine.getProtocolVersion(); fields.add(new StoredField(PROTOCOL_FIELD_NAME, protocolVersion.getProtocol())); fields.add(new StoredField(MAJOR_PROTOCAL_VERSION_FIELD_NAME, Integer.toString(protocolVersion.getMajor()))); fields.add(new StoredField(MINOR_PROTOCOL_VERSION_FIELD_NAME, Integer.toString(protocolVersion.getMinor()))); Header[] headers = entry.getAllHeaders(); for (int index = 0; index < headers.length; index++) { Header header = headers[index]; fields.add(new StoredField(HEADER_FIELD_NAMES + '/' + index + '/' + header.getName(), header.getValue())); } Resource body = entry.getResource(); if (body != null) { fields.add(new StoredField(BODY_FIELD_NAME, IOUtils.toByteArray(body.getInputStream()))); } if (entry.hasVariants()) { for (Entry<String, String> variant : entry.getVariantMap().entrySet()) { fields.add(new StoredField(VARIANT_FIELD_NAMES + '/' + variant.getKey(), variant.getValue())); } } return fields; }