org.apache.lucene.document.Field.setStoreTermVector()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(80)

本文整理了Java中org.apache.lucene.document.Field.setStoreTermVector()方法的一些代码示例,展示了Field.setStoreTermVector()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Field.setStoreTermVector()方法的具体详情如下:
包路径:org.apache.lucene.document.Field
类名称:Field
方法名:setStoreTermVector

Field.setStoreTermVector介绍

暂无

代码示例

代码示例来源:origin: org.apache.lucene/lucene-core-jfrog

/**
 * Create a tokenized and indexed field that is not stored, optionally with 
 * storing term vectors.  The Reader is read only when the Document is added to the index,
 * i.e. you may not close the Reader until {@link IndexWriter#addDocument(Document)}
 * has been called.
 * 
 * @param name The name of the field
 * @param reader The reader with the content
 * @param termVector Whether term vector should be stored
 * @throws NullPointerException if name or reader is <code>null</code>
 */ 
public Field(String name, Reader reader, TermVector termVector) {
 if (name == null)
  throw new NullPointerException("name cannot be null");
 if (reader == null)
  throw new NullPointerException("reader cannot be null");
 
 this.name = name.intern();        // field names are interned
 this.fieldsData = reader;
 
 this.isStored = false;
 this.isCompressed = false;
 
 this.isIndexed = true;
 this.isTokenized = true;
 
 this.isBinary = false;
 
 setStoreTermVector(termVector);
}

代码示例来源:origin: org.apache.lucene/lucene-core-jfrog

setStoreTermVector(termVector);

代码示例来源:origin: org.apache.lucene/com.springsource.org.apache.lucene

/**
 * Create a tokenized and indexed field that is not stored, optionally with 
 * storing term vectors.  The Reader is read only when the Document is added to the index,
 * i.e. you may not close the Reader until {@link IndexWriter#addDocument(Document)}
 * has been called.
 * 
 * @param name The name of the field
 * @param reader The reader with the content
 * @param termVector Whether term vector should be stored
 * @throws NullPointerException if name or reader is <code>null</code>
 */ 
public Field(String name, Reader reader, TermVector termVector) {
 if (name == null)
  throw new NullPointerException("name cannot be null");
 if (reader == null)
  throw new NullPointerException("reader cannot be null");
 
 this.name = name.intern();        // field names are interned
 this.fieldsData = reader;
 
 this.isStored = false;
 this.isCompressed = false;
 
 this.isIndexed = true;
 this.isTokenized = true;
 
 this.isBinary = false;
 
 setStoreTermVector(termVector);
}

代码示例来源:origin: org.apache.lucene/com.springsource.org.apache.lucene

setStoreTermVector(termVector);

代码示例来源:origin: org.apache.lucene/com.springsource.org.apache.lucene

binaryOffset = offset;
setStoreTermVector(TermVector.NO);

代码示例来源:origin: org.apache.lucene/lucene-core-jfrog

binaryOffset = offset;
setStoreTermVector(TermVector.NO);

代码示例来源:origin: org.apache.lucene/com.springsource.org.apache.lucene

setStoreTermVector(termVector);

代码示例来源:origin: org.apache.lucene/lucene-core-jfrog

setStoreTermVector(termVector);

相关文章