1.6.2 Uploading Data with Index Handlers

Uploading Data with Index Handlers

  索引处理器就是Request Handlers,用于添加,更新,删除索引中的文档.另外,使用Tika抽取富文档数据,使用Data Import Handler抽取结构化数据.solr自然也就支持 XML, CSV 和 JSON格式的结构化文档.

  配置并使用request handlers的推荐的方式就是使用基于names的path,在request url中映射path--但是如果request Dispatcher配置合适之后,request handlers也可以指定qt(query type)参数.

The Combined UpdateRequestHandler

  联合的UpdateRequesthandler.

  在solr4以后,有一个统一的update request handler的方式支持XML,CVS,JSON和javabin更新请求,授权使用ContentStreamLoader,基于ContentSream的Content-Type.

UpdateRequestHandler配置

  默认的配置文件有更新请求处理器(update request handler)默认的配置

<requestHandler name="/update" class="solr.UpdateRequestHandler" />

XML Formatted Index Updates

  使用 Content-type: application/xml Content-type:text/xml格式可以发送xml格式消息.

  添加文档

  update handler识别xml结构的数据的方式是很直接的:

  •   <add>元素引入一个或者多个文档添加到索引中
  •   <doc>元素引入组成一个文档的字段
  •   <field>元素代表了一个字段的内容

例子:

<add>
    <doc>
        <field name="authors">Patrick Eagar</field>
        <field name="subject">Sports</field>
        <field name="dd">796.35</field>
        <field name="numpages">128</field>
        <field name="desc"></field>
        <field name="price">12.40</field>
        <field name="title" boost="2.0">Summer of the all-rounder: Test and
            championship
            cricket in England 1982</field>
        <field name="isbn">0002166313</field>
        <field name="yearpub">1982</field>
        <field name="publisher">Collins</field>
    </doc>
    <doc boost="2.5">
        ...
    </doc>
</add>

  每一个元素都有一些可以指定的属性:

命令 参数 参数描述
<add> commitWithin=number 在指定的毫秒数中添加文档
<add> overwrite=boolean 默认为ture
<doc> boost=float 默认为1.0 设置文档的权值
<field> boost=float 默认为1.0  设置字段的权值

Commit and Optimize Operations

时间: 2024-08-07 19:01:49

1.6.2 Uploading Data with Index Handlers的相关文章

1.6.3 Uploading Data with Solr Cell using Apache Tika

1. Uploading Data with Solr Cell using Apache Tika solr使用Apache Tika工程的代码提供了一个框架,用于合并所有不同格式的文件解析器为solr自己的解析器,如Apache PDFBox,Apache POI.通过这个框架,solr使用ExtractingRequestHandler来上传二进制文件. 如果想要solr使用你自己的ContentHandler,你需要继承ExtractingRequestHandler,重写createF

Big Spatio temporal Data(R-tree Index and NN &amp; RNN &amp; Skyline)

一.简单介绍大数据技术产物 “大数据”一词首先出现在2008年9月<Nature>杂志发表的一篇名为“Big Data: Wikiomics”的文章上(Mitch,2008).“大数据科学”尚未有统一定义,但是科学家普遍认为它是以海量的多元异构数据为主要研究对象,以大数据的存储.处理和理解方法为主要研究内容,以新兴的计算技术为主要研究工具,以扩展人类对数据的利用能力为主要目标的一门新兴的综合性学科.它主要针对当前海量(volume).多元(variety)和高速更新(velocity)数据的处

1.6 Indexing and Basic Data Operations--目录

1.6.1 什么是 Indexing 1.6.2 Uploading Data with Index Handlers 1.6.3 Uploading Data with Solr Cell using Apache Tika 1.6.4 Uploading Structured Data Store Data with the Data Import Handler 1.6.5 Updating Parts of Documents 1.6.6 De-Duplication(重复数据删除) 1

Data Binding Library(数据绑定库)

引子 上图中有一些 TextView 和 Button 等,正常情况下,互联网APP都会从服务器抓取数值,然后在 Activity中 findViewById 再进行setText等等.这篇文章就是用来解放你的双手劳动力 的,使用数据绑定库可以不用去findView不用在写繁琐的 setText,只要从服务器获取json 转换成 javaBean格式然后 set,duang,,,,, 所有的值就自己展现在该有的地方了. Demo: https://github.com/Afra55/DataBi

Android Data Binding Library 官方文档(译)

地址:https://developer.android.google.cn/topic/libraries/data-binding/index.html 本文地址:http://blog.csdn.net/jjwwmlp456/article/details/54915981 Data Binding Library (数据绑定库),旨在减少绑定应用程序逻辑和布局所需的一些耦合性代码 最低支持Android 2.1 (API Level 7) 构建环境 使用gradle插件1.5-alpha

Data Binding Guide——google官方文档翻译(上)

android引入MVVM框架时间还不长,目前还很少有应用到app中的.但它是比较新的技术,使用它来搭建项目能省很多代码,而且能使用代码架构比较清晰.本篇文章是我在学习MVVM时翻译的,篇幅比较长,先翻译前半部分. 这篇文档解析如何使用数据绑定库来写响应式布局并减少用来绑定应用程序和布局之间冗余代码,使用逻辑层和布局分离. 数据绑定库提供了即灵活又全面的兼容性--它的支持库.so可以用在android2.1平台(API level 7+). 使用MVVM需要Gradle1.5.0-alphal或

index action分析

上一篇从结构上分析了action的,本篇将以index action为例仔分析一下action的实现方式. 再概括一下action的作用:对于每种功能(如index)action都会包括两个基本的类*action(IndexAction)和Transport*action(TransportIndexAction),前者类中会有一个实例(IndexAction INSTANCE = new IndexAction())这个实例用于client绑定对应的TransportAction(regist

Toward Scalable Systems for Big Data Analytics: A Technology Tutorial (I - III)

ABSTRACT Recent technological advancement have led to a deluge of data from distinctive domains (e.g., health care and scientific sensors, user-generated data, Internet and financial companies, and supply chain systems) over the past two decades. The

Maintenance Plan Usage3:Task Usage (Maintain Index)

Maintenance Plan用于维护Index Fragmentation 和 Statistics的Task 共有三个,后台是使用相应的TSQL来进行data维护. Reorganize Index Task Move index pages into a more efficient search order. This task uses the ALTER INDEX REORGANIZE statement with SQL Server 2012 databases. Rebui