yAsH
yAsH

Reputation: 3405

Neo4j - Querying with Lucene

I am using Neo4j embedded as database. I have to store thousands of articles daily and and I need to provide a search functionality where I should return the articles whose content match to the keywords entered by the users. I indexed the content of each and every article and queried on the index like below

val articles = article_content_index.query("article_content", search string)

This works fine. But, its taking lot of time when the search string contains common words like "the", "a" and etc which will be present in each and every article.

How do I solve this problem?

Upvotes: 2

Views: 913

Answers (2)

Stefan Armbruster
Stefan Armbruster

Reputation: 39905

You might configure article_content_index as fulltext index, see http://docs.neo4j.org/chunked/stable/indexing-create-advanced.html. To switch to using fulltext index, you first have to remove the index and the first usage of IndexManager.forNodes(String, Map) needs to configure the index on creation properly.

Upvotes: 1

Related Questions