lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Kabashnyuk" <ksmml...@gmail.com>
Subject Tree search
Date Thu, 07 Aug 2008 13:18:02 GMT
Hello
I have 	such  document   structure
doc1
      id       - 1
      parentid - 0
      name  -    state
doc2
      id       - 2
      parentid - 1
      name     - department
doc3
      id       - 3
      parentid - 2
      name     – Boston
doc4
      id       - 4
      parentid - 2
      name     – Opera
doc5
      id       – 5
      parentid – 1
      name     - Chicago
doc6
      id       - 6
      parentid - 4
      name     – November

All document a linked by parentid = id – of parent document.
By this link can be retrieved the full path of document,
for example:
doc3-/state/department/Boston
Doc5 - /state/Chicago


I want to implement search by path
1. Same path, for example: /state/department/Boston – return doc3
2. Child of the path,  for example: /state/department – return doc3,doc4
3. All childs of the path for example: /state/department - return  
doc3,doc4,doc6

I need to advice how the best way it can be implemented?

Moving  is very often operation and storing full path can cost with
additional unwanted operations and therefore it's not a desirable solution

Sergey Kabashnyuk
eXo Platform SAS

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message