Package org.springmodules.lucene.index.core

Examples of org.springmodules.lucene.index.core.DocumentCreator


    return infos;
  }

  public void addDocument(final String id, final String title,
              final String text, final String category) {
    getLuceneIndexTemplate().addDocument(new DocumentCreator() {
      public Document createDocument() throws IOException {
        Document document = new Document();
        //The text is analyzed and indexed but not stored
        document.add(new Field("contents", text, Field.Store.YES, Field.Index.TOKENIZED));
        document.add(new Field("id", id, Field.Store.YES, Field.Index.UN_TOKENIZED));
View Full Code Here

TOP

Related Classes of org.springmodules.lucene.index.core.DocumentCreator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.