code: protected void addNodeName(Document doc, String namespaceURI, String localName) throws RepositoryException
     {
        String name = mappings.getNamespacePrefixByURI(namespaceURI) + ":" + localName;
        doc.add(new Field(FieldNames.LABEL, name, Field.Store.NO, Field.Index.NOT_ANALYZED_NO_NORMS));
        // as of version 3, also index combination of namespace URI and local name
        if (indexFormatVersion.getVersion() >= IndexFormatVersion.V3.getVersion())
        {
           doc.add(new Field(FieldNames.NAMESPACE_URI, namespaceURI, Field.Store.NO, Field.Index.NOT_ANALYZED_NO_NORMS));
           doc.add(new Field(FieldNames.LOCAL_NAME, localName, Field.Store.NO, Field.Index.NOT_ANALYZED_NO_NORMS));
        }
     }
docs: Depending on the index format version adds one or two fields to the
  document for the node name.
  
  @param doc the lucene document.
  @param namespaceURI the namespace URI of the node name.
  @param localName the local name of the node.
  @throws RepositoryException