lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From karl wettin <karl.wet...@gmail.com>
Subject Hierarchical classified documents
Date Sat, 25 Nov 2006 01:14:00 GMT
This is an excerpt of my business object class diagram (go fixed font  
size):


  [MyObject]
      |
0..* |
      V       parent
[Namespace]<>------+
      |        0..1 |
      | 0..*        |
      +-------------+
       child


All business object instances have a unique identifier.

A namespace path could be {1/2/3/4}. Any branch in the path may  
contain documents. I need to be able to place a query that matches  
the documents in {1/2/3} without matching the documents in {1/2/3/4}.  
I also need to need to place queries that match all documents in a  
namespaces recursive.

I can see a number of possible solutions for this, but I was hoping  
for a de facto implementation.


This is the simplest thing I could think of:

  * store full namespace path as one term: "1/2/3"
  * store each namespace identity as on term: "1", "2", "3"

A more complicated implementation would be to use the latter only and  
work with span queries. It would save index size, but would probably  
be more expensive in clock ticks?

I could also limit the depth of a namespace path and store it in  
multiple namespace_branch_N fields and a namespace_leaf field. Did  
not think this one through too much.


Any experience or thoughts?




---------------------------------------------------------------------
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