code: public Set<String> getFieldNames() throws IndexException
     {
        final Set<String> fildsSet = new HashSet<String>();
        if (handler instanceof SearchIndex)
        {
           IndexReader reader = null;
           try
           {
              reader = ((SearchIndex)handler).getIndexReader();
              FieldInfos infos = ReaderUtil.getMergedFieldInfos(reader);
              for (FieldInfo info : infos)
              {
                 fildsSet.add(info.name);
              }
           }
           catch (IOException e)
           {
              throw new IndexException(e.getLocalizedMessage(), e);
           }
           finally
           {
              try
              {
                 if (reader != null)
                 {
                    Util.closeOrRelease(reader);
                 }
              }
              catch (IOException e)
              {
                 throw new IndexException(e.getLocalizedMessage(), e);
              }
           }
  
        }
        return fildsSet;
     }
docs: {@inheritDoc}