Re: solution for parent-child relationship

2009-12-23 Thread Erick Erickson
First, if you don't need to distinguish between posts and comments, you don't care about the increment gap. But if you do... It's kind of arcane, but here's the general idea. You override your Analyzer of choice and implement getPositionIncrementGap. Say your getPositionIncrementGap returns 100. W

Re: solution for parent-child relationship

2009-12-23 Thread Deve
@Erick, you are right i will have to stop thinking in terms of databases, thats why i wanted to discuss this. i don't get how can i use getPositionIncrementGap, could you provide little more details. thanks, On Wed, Dec 23, 2009 at 8:45 PM, Erick Erickson wrote: > Ya just gotta stop thinking li

Re: solution for parent-child relationship

2009-12-23 Thread Erick Erickson
Ya just gotta stop thinking like a database guy, man . Lucene searches lots and lots of text very well. It doesn't do joins worth a darn. The moment you star thinking in terms of sub-queries, you're probably starting down the wrong track. Here's a possibility. Index each post and all associated co

RE: solution for parent-child relationship

2009-12-23 Thread Rao, Vaijanath
Hi Shahid, This is just one of the ways to get it. You can have an id to your post and comment for every post get's an subID so for example Post 1 get id 2566 and comment 1 in that post get id 2566-64. You can use various methods to get this ID. Then you can write your own Hit Collector in whic