lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jenny Brown <>
Subject Re: document with parent-child relationship
Date Fri, 29 Apr 2011 14:46:37 GMT
Would it work for you to have multiple entries?  This basically just
flattens the table relationship you're describing.  Use lucene on the
phrase and return the id.  I'm assuming you have already parsed your
list of phrases before this, since you seem to want a very specific
kind of look-up.

id     text phrase
35   "low pressure engine"
35   "low pressure wheel"
35   "low pressure ..."
42   "high pressure ...."

If you expect to delete from and re-add to this index, you may also
want a separate field with a unique row id so you can easily identify
what to delete/add.

On Fri, Apr 29, 2011 at 1:50 AM, juro <> wrote:
> Hello,
> I need an advice on how to create an document that has parent-child
> relationship. Here is an example:
> "low pressure" -> "engine"
>                    -> "wheel"
>                    -> ....
> "low pressure" string is the parent and "engine" and "wheel" are children.
> I'd like to be able to search strings such as "low pressure in engine" or
> just "low" or "engine" and the result should be an ID of the parent. How do
> I create fields in the lucene document to express this relationship?
> Any advice appreciated.--
> View this message in context:
> Sent from the Lucene - General mailing list archive at

View raw message