diff --git a/src/main/java/org/myrobotlab/document/connector/AbstractConnector.java b/src/main/java/org/myrobotlab/document/connector/AbstractConnector.java index 5c31cc654e..c8a797f429 100644 --- a/src/main/java/org/myrobotlab/document/connector/AbstractConnector.java +++ b/src/main/java/org/myrobotlab/document/connector/AbstractConnector.java @@ -147,4 +147,16 @@ public void setDocIdPrefix(String docIdPrefix) { this.docIdPrefix = docIdPrefix; } + public Integer getFeedCount() { + return feedCount; + } + + public long getStart() { + return start; + } + + public void setStart(long start) { + this.start = start; + } + } diff --git a/src/main/java/org/myrobotlab/service/FileConnector.java b/src/main/java/org/myrobotlab/service/FileConnector.java index 3b9d9c95d6..caf82c6b9e 100644 --- a/src/main/java/org/myrobotlab/service/FileConnector.java +++ b/src/main/java/org/myrobotlab/service/FileConnector.java @@ -42,6 +42,7 @@ public void setConfig(ConnectorConfig config) { @Override public void startCrawling() { state = ConnectorState.RUNNING; + setStart(System.currentTimeMillis()); Path startPath = Paths.get(((FileConnectorConfig)config).directory); log.info("Started Crawling {}", startPath); try { @@ -74,9 +75,11 @@ public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) th @Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { if (interrupted) { + log.info("Interrupted, terminating crawl."); state = ConnectorState.INTERRUPTED; return FileVisitResult.TERMINATE; } + log.info("Crawling {} Feed Count {}" , file.toFile().getAbsolutePath(), getFeedCount());; String docId = getDocIdPrefix() + file.toFile().getAbsolutePath(); Document doc = new Document(docId); doc.setField("last_modified", new Date(attrs.lastModifiedTime().toMillis())); @@ -93,9 +96,11 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IO @Override public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException { if (interrupted) { + log.info("Interrupted, terminating crawl."); state = ConnectorState.INTERRUPTED; return FileVisitResult.TERMINATE; } + log.warn("Failed Crawling {} Feed Count {}" , file.toFile().getAbsolutePath(), getFeedCount()); String docId = getDocIdPrefix() + file.toFile().getAbsolutePath(); Document doc = new Document(docId); doc.setField("type", "file"); diff --git a/src/main/java/org/myrobotlab/service/meta/DocumentPipelineMeta.java b/src/main/java/org/myrobotlab/service/meta/DocumentPipelineMeta.java index 3a179e93be..2c17e22e9b 100644 --- a/src/main/java/org/myrobotlab/service/meta/DocumentPipelineMeta.java +++ b/src/main/java/org/myrobotlab/service/meta/DocumentPipelineMeta.java @@ -39,7 +39,7 @@ public DocumentPipelineMeta() { addDependency("com.thoughtworks.xstream", "xstream", "1.4.19"); // FIXME - add service page, python script, give example of how to use - setAvailable(false); + setAvailable(true); } diff --git a/src/main/resources/resource/WebGui/app/service/js/SolrGui.js b/src/main/resources/resource/WebGui/app/service/js/SolrGui.js index 1db0666642..45b56c7893 100644 --- a/src/main/resources/resource/WebGui/app/service/js/SolrGui.js +++ b/src/main/resources/resource/WebGui/app/service/js/SolrGui.js @@ -12,7 +12,6 @@ angular.module('mrlapp.service.SolrGui', []).controller('SolrGuiCtrl', ['$scope' $scope.filters = []; // TODO: maybe some other fields.. // TODO: support range facets - $scope.facetFields = ['type', 'artist_facet', 'album_facet', 'genre_facet', 'year_facet', 'sender_type', 'sender','method']; $scope.facetFields = ['type', 'artist_facet', 'album_facet', 'genre_facet', 'year_facet', 'sender_type', 'sender','method', 'content_type_facet']; // GOOD TEMPLATE TO FOLLOW this.updateState = function(service) { diff --git a/src/main/resources/resource/WebGui/app/service/views/SolrGui.html b/src/main/resources/resource/WebGui/app/service/views/SolrGui.html index 210ddc84e4..ed7eb1a156 100644 --- a/src/main/resources/resource/WebGui/app/service/views/SolrGui.html +++ b/src/main/resources/resource/WebGui/app/service/views/SolrGui.html @@ -1,81 +1,80 @@
- -
+ +
- - - -
-
-
- {{filter}} [x] -
- - - Displaying search results {{startOffset+1}} to {{endOffset}} of {{numFound}} in {{solrResults.responseHeader.QTime}} milliseconds. - - Previous Next -
- - + + + + + +
+ {{filter}} [x] +
+ + + Displaying search results {{startOffset+1}} to {{endOffset}} of {{numFound}} in {{solrResults.responseHeader.QTime}} milliseconds. +
+
- - + + -
- - - - -
- - - - - - - -
{{field}}
  • {{bucket}} ({{count}})
  • -
    -
    - - - - -
    - -
    - - - -
    Artist: {{result.artist[0]}}
    -
    Album: {{result.album[0]}}
    -
    Year: {{result.year[0]}}
    -
    Genre: {{result.genre[0]}}
    - Filepath: {{result.filepath[0]}} -
    - -
    - - Doc: {{$index + startOffset + 1}} - - - - - - - - -
    {{key}}{{value}}{{value}}
    - -
    -
    -
    + + + + +
    + + + + + + + +
    {{field}}
  • {{bucket}} ({{count}})
  • +
    +
    + + + + + + + +
    Previous Next
    + +
    + + + + +
    Artist: {{result.artist[0]}}
    +
    Album: {{result.album[0]}}
    +
    Year: {{result.year[0]}}
    +
    Genre: {{result.genre[0]}}
    + Filepath: {{result.filepath[0]}} +
    + +
    + + + + + + + + + +
    {{key}}{{value}}{{value}}
    +
    +
    Previous Next
    +
    - -
    -
    Small view
    -
    Medium view
    mevi
    -
    Large view
    lavi
    lavi
    -
    Full view
    fuvi
    fuvi
    fuvi
    -
    + + +
    +
    Small view
    +
    Medium view
    mevi
    +
    Large view
    lavi
    lavi
    +
    Full view
    fuvi
    fuvi
    fuvi
    +
    \ No newline at end of file