搜索: 概念和参考

来源:互联网 发布:淘宝盗图有什么处罚 编辑:程序博客网 时间:2024/06/06 07:35

《信息检索导论》
词项(term)
文档(document)
词项-文档关联矩阵
文档集(collection)/语料库(corpus)
倒排索引:
exampleTerm===>1=》2=》4…
“词项词典”和“倒排索引表”
词典放在内存中,而指针指向的每个倒排索引记录表放在磁盘上。

正确率(Precision):返回结果中和需求相关的文档的占比。
召回率(Recall):所有和需求相关的文档中返回的文档占比。

收集待建索引的文档==》字符序列的生成(字节序列》字符序列)==》文档单位的选择==》词条化(tokenize)==》去停用词==》词项归一化==》词干还原,词形归并

《lucene实战》
Lucene是非常优秀的成熟的开源的免费的纯java语言的全文索引检索工具包。Lucene是一个高性能、可伸缩的信息搜索(IR)库。 Information Retrieval (IR) library.它使你可以为你的应用程序添加索引和搜索能力。
为什么使用Lucene

solr
“solr基本操作”:
shema.xml:定义了core下各field类型和名称
core 相当于表;
field 相当于字段;
fieldType 相当于字段类型;
fieldName 相当于字段名

<schema name="example-DIH-db" version="1.5">   <field name="_version_" type="long" indexed="true" stored="true"/>      <field name="_root_" type="string" indexed="true" stored="false"/>   <!-- Dynamic field definitions allow using convention over configuration       for fields via the specification of patterns to match field names.        EXAMPLE:  name="*_i" will match any field ending in _i (like myid_i, z_i)       RESTRICTION: the glob-like pattern in the name attribute must have       a "*" only at the start or the end.  -->   <dynamicField name="*_i"  type="int"    indexed="true"  stored="true"/>    <!-- Field to use to determine and enforce document uniqueness.       Unless this field is marked with required="false", it will be a required field   -->   <uniqueKey>id</uniqueKey>   <!-- copyField commands copy one field to another at the time a document        is added to the index.  It's used either to index the same field differently,        or to add multiple fields to the same field for easier/faster searching.  -->   <copyField source="cat" dest="text"/><!-- The StrField type is not analyzed, but indexed/stored verbatim.       It supports doc values but in that case the field needs to be       single-valued and either required or have a default value.      -->    <fieldType name="string" class="solr.StrField" sortMissingLast="true" />

solrconfig.xml: solr的相关配置

0 0
原创粉丝点击