Finding the connected elements which make up the neighbourhood is just 
straightforward lookups of connected IDs on the graph. This can be done using 
either a database or Lucene - your choice, although I suspect the database is 
the better choice given the structured nature of the data and any potential 
volatility in connections. Once you have the IDs which define "the 
neighbourhood" of nodes you want to search, these IDs can be built into a 
Lucene filter very fast (see org.apache.lucene.search.TermsFilter.addTerm in 
the "contrib\queries" section).
Using this class I've found Lucene capable of searching neighbourhoods of 
thousands of nodes very quickly.

The biggest problem you are likely to face is shortlisting the nodes you want 
to search when "3 degrees of connectivity" leads you at step 1 or 2 to a highly 
connected node, exploding the list of IDs under consideration.

Cheers
Mark


----- Original Message ----
From: Sharad Agarwal <[EMAIL PROTECTED]>
To: java-user@lucene.apache.org
Sent: Monday, 25 September, 2006 10:50:03 AM
Subject: searching in social networks

I am using lucene for simple flat searches. Now I have a requirement to 
do searches based on the object's connectivity with other objects. The 
way the searches are done in "social networks". Lets say I want to 
search for a query in only those objects which are within 3 degrees of 
connectivity to a given object.

Has any body tried this kind of feature with lucene? Any pointers will 
be appreciated.

thanks
sharad



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to