Is there a way to use Lucene to work with graph data?
Example
One user has relationships with many documents lucene (Document Connections) One user has relationships with other users (User Connections [Graph])
If the user searches for the Index, he returns the documents with which he is associated. It is simple and straightforward.
How can I return documents with which user connections are associated.
Indexing each document to all users who have a relationship with it in the user_id field is an approach. However, when querying an index that provides user connections for a user performing the size of the search query, it is unpredictable. Think of users having 1000 user connections. It will not scale.
This is almost the same as user connections and user documents stored in the DB column can easily provide us with documents to search for, but an efficient way to tell Lucene about it so that it can only search for those documents for a given query. If any results are returned, this ensures that at least one or more user connections are related to documents returned in the results.
source share