[
https://issues.apache.org/jira/browse/SOLR-2311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12981271#action_12981271
]
Koji Sekiguchi commented on SOLR-2311:
--------------------------------------
Thank you for reporting this, Matt!
For back-compat reasons, your patch:
{code}
@@ -254,7 +254,7 @@
if (newerThan != null && lastModified.before(newerThan))
return;
details.put(DIR, dir.getAbsolutePath());
- details.put(FILE, name);
+ details.put(FILE_NAME, name);
details.put(ABSOLUTE_FILE, aFile.getAbsolutePath());
details.put(SIZE, sz);
details.put(LAST_MODIFIED, lastModified);
{code}
should be:
{code}
@@ -254,7 +254,7 @@
if (newerThan != null && lastModified.before(newerThan))
return;
details.put(DIR, dir.getAbsolutePath());
details.put(FILE, name);
+ details.put(FILE_NAME, name);
details.put(ABSOLUTE_FILE, aFile.getAbsolutePath());
details.put(SIZE, sz);
details.put(LAST_MODIFIED, lastModified);
{code}
But IMO updating documentation is enough in this case.
> FileListEntityProcessor Fields Stored in SolrDocument do not Match
> Documentation
> --------------------------------------------------------------------------------
>
> Key: SOLR-2311
> URL: https://issues.apache.org/jira/browse/SOLR-2311
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 1.4.1
> Environment: Java 1.6
> Reporter: Matt Parker
> Priority: Minor
> Attachments: SOLR-2311.patch
>
>
> The implicit fields generated by the FileListEntityProcessor do not match the
> documentation, which are listed in the following excerpt:
> {quote} The implicit fields generated by the FileListEntityProcessor are
> fileAbsolutePath, fileSize, fileLastModified, fileName and these are
> available
> for use within the entity X as shown above. {quote}
> The fileName field is not populated. The file's name is stored in the
> implicit field named file.
> The hashmap that holds the metadata is (FileListEntityProcessor.java at line
> 255)
> stored the following using the associated constants:
> {quote}
> details.put(DIR, dir.getAbsolutePath());
> details.put(FILE, name);
> details.put(ABSOLUTE_FILE, aFile.getAbsolutePath());
> details.put(SIZE, sz);
> details.put(LAST_MODIFIED, lastModified);
> {quote}
> where DIR = "fileDir", FILE = "file", ABSOLUTE_FILE = "fileAbsolutePath",
> SIZE = "fileSize", and LAST_MODIFIED = "fileLastModified".
> Either the documentation must be updated, or the constant storing the return
> value must be updated.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]