Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2 added CvsImageDataProcessor, refactored ParallelSolrIndexer #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

gsergiu
Copy link
Contributor

@gsergiu gsergiu commented Apr 27, 2017

refactored ImageDataProcessor interface and implementations
added CvsImageDataProcessor
refactored ParallelSolrIndexer
added missing invocations of stream.close() methods

@@ -44,11 +44,16 @@
for (var i = 0; i < docs.length; i++) {
myID = docs[i].id.toString();
myUrl = docs[i].imgurl.toString();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When imgurl is undefined, an error will be thrown here. I noticed that ParallelSolrIndexer.java does not add this by default.

Maybe something like below?

if (typeof docs[i].imgurl !== 'string') {
  docs[i].imgurl = 'file://' + docs[i].id;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I see, this change was ment to enable the support for remote access, meaning that an URL for accessing the images is always present.

But of course we can consider the local usage, when the images are not accessed over http, but from the local filesystem (which might be convenient for development, even if I don't encourage it ... as solr has already the embedded http server).

I'll see if the usage of typeOf is really needed, or if we can simply use a null comparison.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants