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
or in which you can collect the results and display the top-10 or all unique posts. --Thanks and Regards Vaijanath N. Rao -Original Message- From: Shahid Faiz [mailto:developer.in...@gmail.com] Sent: Wednesday, December 23, 2009 7:06 PM To: java-user@lucene.apache.org Subject: solution for p

solution for parent-child relationship

2009-12-23 Thread Shahid Faiz
Hi, Following are details of my problem and possible solutions which I can think of. Please suggest which should I choose, or is there any other approach better than these. I want to index blog posts and their comments, in my database posts and comments are stored in two different tables. Current