`
jayghost
  • 浏览: 430306 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Lucene的Field选项解释

 
阅读更多

引用Lucene In Action第二版2.4节内容:

 

域索引选项:

The options for indexing (Field.Index.* ) control how the text in the field will be

made searchable via the inverted index. Here are the choices:


  • ƒ Index.ANALYZED—Use the analyzer to break the field’s value into a stream of separate tokens and make each token searchable. This option is useful for normal text fields (body, title, abstract, etc.).
  • ƒ Index.NOT_ANALYZED —Do index the field, but don’t analyze the String value. Instead, treat the  Field ’s entire value as a single  token and make that token searchable. This option is useful for fiel ds that you’d like to search on but that shouldn’t be broken up, such as URLs, file system paths, dates, personal names, Social Security numbers, and telephone nu mbers. This option is especially useful for enabling “exact match精确匹配” searching. We indexed the id field in listings 2.1 and 2.3 using this option.
  • ƒ Index.ANALYZED_NO_NORMS —A variant of  Index.ANALYZED that doesn’t store norms information in the index. Norms record index-time boost information in the index but can be memory consuming when you’re searching. Section 2.5.3 describes norms in detail.
  • ƒ Index.NOT_ANALYZED_NO_NORMS—Just like  Index.NOT_ANALYZED , but also doesn’t store norms. This option is frequently used to save index space and memory usage during searching, because single-token fields don’t need the norms information un less they’re boosted.
  • ƒ Index.NO —Don’t make this field’s value available for searching. 

 

域存储选项:

 

The options for stored fields ( Field.Store.* ) determine whether the field’s exact

value should be stored away so that you can later retrieve it during searching:


  • ƒ Store.YES—Stores the value. When the value is stored, the original  String in its entirety is recorded in the index and may be retrieved by an  IndexReader. This option is useful for fields that you’d like to use when displaying the search results (such as a  URL, title, or database primary key). Try not to store very large fields, if index size is a concern, as stored fields consume space in the index.
  • ƒ Store.NO —Doesn’t store the value. This  option is often used along with Index.ANALYZED to index a large text field that doesn’t need to be retrieved in its original form, such as bodies of web pages, or any other type of text document.
分享到:
评论

相关推荐

    lucene打分公式解释

    lucene打分公式解释,非常详细,帮助理解搜索ranking.

    lucene,lucene教程,lucene讲解

    org.apache.lucene.document.Field Directory类代表一个Lucene索引的位置。它是一个抽象类. 其中的两个实现: 第一个是 FSDirectory,它表示一个存储在文件系统中的索引的位置。 第二个是 RAMDirectory,它表示一...

    一步一步跟我学习Lucene源码之lucene的各种Field

    此博文是对近期做lucene索引的总结, (lucene,solr,netty,hadoop),如蒙加入,不胜感激,大家共同探讨,本人争取每日一博,希望大家关注呦

    lucene实例lucene实例

    lucene实例lucene实例lucene实例lucene实例lucene实例lucene实例lucene实例lucene实例lucene实例

    lucene3.0 lucene3.0

    lucene3.0 lucene3.0 lucene3.0 lucene3.0 lucene3.0

    lucene学习lucene学习

    lucene学习lucene学习lucene学习lucene学习lucene学习lucene学习lucene学习lucene学习lucene学习lucene学习lucene学习lucene学习lucene学习lucene学习lucene学习lucene学习lucene学习lucene学习lucene学习lucene学习...

    java Lucene初级教程

    lucene简介 1.1 什么是lucene  Lucene是一个全文搜索框架,而不是应用产品。因此它并不像www.baidu.com 或者google Desktop那么拿来就能用,它只是提供了一种工具让你能实现这些产品。 2 lucene的工作方式  lucene...

    Lucene3.0特性,Lucene3.0特性

    Lucene3.0特性Lucene3.0特性

    lucene讲义 叫你用lucene算法

    lucene学习教程lucene讲义 叫你用lucene算法

    lucene3源码分析

    lucene3源码分析

    lucene lsql

    LSql is a command-line tool written in Java that allows sql-like queries to run against a Lucene database. It can be run in interactive mode, or can automatically parse a list of commands from a file....

    lucene6.6jar包

    lucene

    lucene.NET 中文分词

    lucene.NET 中文分词 高亮 lucene.NET 中文分词 高亮 lucene.NET 中文分词 高亮 lucene.NET 中文分词 高亮

    lucene详细使用教程

    lucene

    Annotated Lucene 中文版 Lucene源码剖析

    Annotated Lucene 中文版 Lucene源码剖析

    Apache Lucene全文检索和IKAnalyzer分词工具类

    import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.Term; import org.apache.lucene.queryParser.MultiFieldQueryParser; import org.apache....

    Lucene实战

    《Lucene实战(第2版)》基于Apache的Lucene 3.0,从Lucene核心、Lucene应用、案例分析3个方面详细系统地介绍了Lucene,包括认识Lucene、建立索引、为应用程序添加搜索功能、高级搜索技术、扩展搜索、使用Tika提取文本...

    Lucene 使用正则表达式

    Lucene 正则表达式 regexQuery

    Lucene4.X第九讲-Lucene搜索深入实战

    本课程由浅入深的介绍了Lucene4的发展历史,开发环境搭建,分析lucene4的中文分词原理,深入讲了lucenne4的系统架构,分析lucene4索引实现原理及性能优化,了解关于lucene4的搜索算法优化及利用java结合lucene4实现...

Global site tag (gtag.js) - Google Analytics