code: private void addFieldToDocument(Object object, Document document, java.lang.reflect.Field field, String colName,
          String indexName) {
          try {
              Object obj = PropertyAccessorHelper.getObject(object, field);
              // String str =
              // String value = (obj == null) ? null : obj.toString();
              if (obj != null) {
                  Field luceneField =
                      new Field(getCannonicalPropertyName(indexName, colName), obj.toString(), Field.Store.YES,
                          Field.Index.ANALYZED_NO_NORMS);
  
                  document.add(luceneField);
              } else {
                  LOG.warn("value is null for field" + field.getName());
              }
          } catch (PropertyAccessException e) {
              LOG.error("Error in accessing field, Caused by:" + e.getMessage());
              throw new LuceneIndexingException("Error in accessing field:" + field.getName(), e);
          }
      }
docs: Index field.
  
  @param object
  the object
  @param document
  the document
  @param field
  the field
  @param colName
  the col name
  @param indexName
  the index name