Re: JCIFS Connector File Size Attribute

2021-07-23 Thread Karl Wright
Hi,
The original size field is provided by the Repository Connector, and passed
to the output connector.

In this case, the code that sets the field is here:

kawright@1USDKAWRIGHT:/mnt/c/wip/mcf/trunk$ grep -R
"rd.setOriginalSize(originalLength);" . --include "*.java"
./connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.jav
:  rd.setOriginalSize(originalLength);

The code that uses this field and pushes it into Solr is configured in the
Solr connection.  That is probably why you are overlooking it.

Thanks,

Karl


On Fri, Jul 23, 2021 at 10:13 AM Wolfinger Uwe 
wrote:

> Hi,
>
> we are using the JCIFs shared drive connector to crawl windows shares.
> What we would like to have is, that the file size can be displayed in the
> search results, i.e. that an appropriate attribute is sent to solr.
>
> According to this issue:
> https://issues.apache.org/jira/projects/CONNECTORS/issues/CONNECTORS-1204
> this should alfready work.
>
> Unfortunately i am not able configure the corresponding job to send such
> an attribute. A look at
>
>
> https://github.com/apache/manifoldcf/blob/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
>
> shows, that only the following attributes are added as fields:
> rd.addField("lastModified", lastModifiedDate.toString());
>
> rd.addField("fileLastModified",DateParser.formatISO8601Date(lastModifiedDate));
> rd.addField("createdOn", creationDate.toString());
> rd.addField("fileCreatedOn",DateParser.formatISO8601Date(creationDate));
> rd.addField("attributes", Integer.toString(attributes));
> rd.addField("shareName", shareName);
>
> am missing something? Or ist the fileSize attribute missing when
> populating the crawling result.
>
> kind regards,
> Uwe
>
>
>


JCIFS Connector File Size Attribute

2021-07-23 Thread Wolfinger Uwe
Hi,

we are using the JCIFs shared drive connector to crawl windows shares. What we 
would like to have is, that the file size can be displayed in the search 
results, i.e. that an appropriate attribute is sent to solr.

According to this issue:
https://issues.apache.org/jira/projects/CONNECTORS/issues/CONNECTORS-1204
this should alfready work.

Unfortunately i am not able configure the corresponding job to send such an 
attribute. A look at

https://github.com/apache/manifoldcf/blob/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java

shows, that only the following attributes are added as fields:
rd.addField("lastModified", lastModifiedDate.toString());
rd.addField("fileLastModified",DateParser.formatISO8601Date(lastModifiedDate));
rd.addField("createdOn", creationDate.toString());
rd.addField("fileCreatedOn",DateParser.formatISO8601Date(creationDate));
rd.addField("attributes", Integer.toString(attributes));
rd.addField("shareName", shareName);

am missing something? Or ist the fileSize attribute missing when populating the 
crawling result.

kind regards,
Uwe