neo4j: fulltext index on external documents and attachments

Viewed 36

simple architecture overview

This is the situation. Don't ask why, it is the way it is. I created a simple fulltext-index over the document-contents by grabbing the content from the document-server and adding the simple unformatted content as a new property (raw_content) to each Document-Object in the neo4jdb. Then i created a fulltext-index like: CALL db.index.fulltext.createNodeIndex('content', ['Document'], ['title', 'teaser', 'raw_content'])

So far so good. Search works very well.

Now I want to index the attachments. I've got Attachment-URLs for each document, which I can call by the docid. So, before I slide into any antipatterns, I'd like to ask the community, about how to do this. I've got two ways on my mind:

  1. similar to the way I index the raw_content - is there a way to make Lucene get and parse the URLs, that I give to it?
  2. the batch does all the parsing and adds the content to new fields like "attachment01_content" ...

Solution 1 would be appreciated, but i did not find any documentation on this. Solution 2 is ugly, especially because Lucene can handle with pdf, doc ...

any ideas on how to solve this?

0 Answers
Related