title: Lucene index mapping with xml structure
body: <p>I am new in lucene. I just want to implement the lucene search in my application but when i trying to do indexing in following xml file, i am getting wrong set of results, as in my application there are several xml files are present such as</p>
  
  <pre><code>&lt;Category s="Mammals"&gt;
    &lt;sub P="Dolphin"/&gt;
    &lt;sub P="Bat"/&gt;
    &lt;sub P="Wales"/&gt;  
    &lt;sub P="Human"/&gt;
    &lt;sub P="Dog"/&gt;
    &lt;sub P="Cat"/&gt;
  &lt;/Category&gt;
  
  &lt;Category s="Birds"&gt;
    &lt;sub P="Spparrow"/&gt;
    &lt;sub P="Crow"/&gt;
    &lt;sub P="Pengvins"/&gt;
    &lt;sub P="Peacock"/&gt;
  &lt;/Category&gt;
  </code></pre>
  
  <p>When i finished the indexing on above xml code and start testing by searching i am getting wrong result like when i trying search for category  "Mammals" and sub category "Crow" i am getting result like category "Mammals" and sub category "Crow" but i do not want such result, in this case i just want result like category "Mammals" do not contain sub category "Crow". In short i just want apply condition
  So how do i make lucene index with map with database structure for getting correct structure</p>