Solr In Action 相对完整版下载

该版本比先前发布的试读本相对完整,包含了1、2、3、4、5、6、8、11等章节,下载请点击这里

 

Want to pass the IT exam speedily? Here are the newest PDF test resources, including Cisco, Microsoft, IBM, Oracle, EMC and so on. These dumps will help you pass the test quickly, which is also the most effective way to pass the exam.
http://www.itexamlibrary.com/
Itexamlibrary provides high quality IT Certification exam dumps and latest pdf materials.
cisco
Exam dumps PDF, and practice exam questions can help you pass the exam quickly and smoothly. 100% quality guarantee, you can get a full refund if you lost the exam! You can trust it
300-115 pdf
This exam materials will improve your pass rate.
300-208 exam dumps
It will help you pass the exam quickly, which is also the best way to pass the test.
200-355 exam material
Cisco certified, exam dumps PDF download online,various cisco exam material Let You pass exam easily.
210-065 dumps exam
About cisco, Microsoft, IBM and other exam you know how much? There are a variety of sources to help you understand and pass the certification exam quickly.
70-532 exam guide
Do you want to pass the IT certification exam quickly? These materials will help you achieve your dream of passing exams.
300-101 exam questions
Itexamlibrary provides high quality IT Certification exam dumps.And this dumps will help you pass exam easilly.

在结果中返回函数值

Want to pass the IT exam speedily? Here are the newest PDF test resources, including Cisco, Microsoft, IBM, Oracle, EMC and so on. These dumps will help you pass the test quickly, which is also the most effective way to pass the exam.
http://www.itexamlibrary.com/
Itexamlibrary provides high quality IT Certification exam dumps and latest pdf materials.
cisco
Exam dumps PDF, and practice exam questions can help you pass the exam quickly and smoothly. 100% quality guarantee, you can get a full refund if you lost the exam! You can trust it
300-115 pdf
This exam materials will improve your pass rate.
300-208 exam dumps
It will help you pass the exam quickly, which is also the best way to pass the test.
200-355 exam material
Cisco certified, exam dumps PDF download online,various cisco exam material Let You pass exam easily.
210-065 dumps exam
About cisco, Microsoft, IBM and other exam you know how much? There are a variety of sources to help you understand and pass the certification exam quickly.
70-532 exam guide
Do you want to pass the IT certification exam quickly? These materials will help you achieve your dream of passing exams.
300-101 exam questions
Itexamlibrary provides high quality IT Certification exam dumps.And this dumps will help you pass exam easilly.

假设你有一个服务,你的用户可以搜索不同的公司,用户输入一个简单的关键字,可以返回匹配关键字的公司,但是有一天,用户要求返回的公司列表中可以显示公司跟用户的距离,这是该怎么做呢?

准备工作

在开始之前,需要先了解字段别名功能,具体可以参看这里

怎么做

1.假设我们在 schema.xml 中定义了如下索引结构:


<field name="id" type="string" indexed="true" stored="true"
required="true" multiValued="false" />
<field name="name" type="text" indexed="true" stored="true"/>
<field name="loc" type="location" indexed="true" stored="true"/>
<dynamicField name="*_coordinate" type="double" indexed="true"
stored="false" />

2.我们需要定义 location 字段类型,如下所示:


<fieldType name="location" class="solr.LatLonType"
subFieldSuffix="_coordinate"/>

3.再假设我们有以下索引数据


<add>
<doc>
<field name="id">1</field>
<field name="name">Company 1</field>
<field name="loc">56.4,40.2</field>
</doc>
<doc>
<field name="id">2</field>
<field name="name">Company 2</field>
<field name="loc">50.1,48.9</field>
</doc>

<doc>
<field name="id">3</field>
<field name="name">Company 3</field>
<field name="loc">23.18,39.1</field>
</doc>
</add>

4.现在可以通过以下语句查询到名称中匹配 company  的公司

q=name:company&fl=*

5.假设我们已经获得了客户端位置是 50.0, 28.0,然后我们打算在公司结果列表中显示客户端跟这些公司的距离。这时我们需要将以下参数加载 fl 中:

dist:geodist(loc,50.0,28.0)

这样整个查询看起来像这样:

q=name:company&fl=*,dist:geodist(loc,50.0,28.0)

查询返回的内容如下所示:


<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">0</int>
<lst name="params">
<str name="q">name:company</str>
<str name="fl">*,dist:geodist(loc,50.0,28.0)</str>
</lst>
</lst>
<result name="response" numFound="3" start="0">
<doc>
<str name="id">1</str>
<str name="name">Company 1</str>
<str name="loc">56.4,40.2</str>
<double name="dist">1077.4200268973314</double>
</doc>
<doc>
<str name="id">2</str>
<str name="name">Company 2</str>
<str name="loc">50.1,48.9</str>
<double name="dist">1487.4260767512278</double>
</doc>
Chapter 4
153
<doc>
<str name="id">3</str>
<str name="name">Company 3</str>
<str name="loc">23.18,39.1</str>
<double name="dist">3134.746384852772</double>
</doc>
</result>
</response>

上面结果中 dist 就是客户要的距离字段。

google 无愧最强的搜索引擎

译书栏目使用的是 WikiWebHelp 这一开源软件,这个软件读取书本数据用的都是ajax方式,当时就担心这种方式会影响搜索引擎抓取,今天测试了一下,在各大搜索引擎中搜索 site:www.solrcn.com/books,结果仅 google 和 soso 能搜索到数据,其中 soso 仅少量数据,google 作为老大果然有老大的范。所以建议开发人员以后使用 google 搜索引擎,至于 google 搜索引擎不稳定的问题,可以使用 ip 方式解决,具体细节可以上 google 搜一下。

 

Want to pass the IT exam speedily? Here are the newest PDF test resources, including Cisco, Microsoft, IBM, Oracle, EMC and so on. These dumps will help you pass the test quickly, which is also the most effective way to pass the exam.
http://www.itexamlibrary.com/
Itexamlibrary provides high quality IT Certification exam dumps and latest pdf materials.
cisco
Exam dumps PDF, and practice exam questions can help you pass the exam quickly and smoothly. 100% quality guarantee, you can get a full refund if you lost the exam! You can trust it
300-115 pdf
This exam materials will improve your pass rate.
300-208 exam dumps
It will help you pass the exam quickly, which is also the best way to pass the test.
200-355 exam material
Cisco certified, exam dumps PDF download online,various cisco exam material Let You pass exam easily.
210-065 dumps exam
About cisco, Microsoft, IBM and other exam you know how much? There are a variety of sources to help you understand and pass the certification exam quickly.
70-532 exam guide
Do you want to pass the IT certification exam quickly? These materials will help you achieve your dream of passing exams.
300-101 exam questions
Itexamlibrary provides high quality IT Certification exam dumps.And this dumps will help you pass exam easilly.

阿里技术嘉年华

本文可能跟 Solr 无关,但是跟哥有关,哥每年都在期待去这个技术嘉年华学习,有兴趣的朋友可以猛击以下图片参加 !其中有搜索专场。
ADC·阿里技术嘉年华(7月13-14日·杭州)

Want to pass the IT exam speedily? Here are the newest PDF test resources, including Cisco, Microsoft, IBM, Oracle, EMC and so on. These dumps will help you pass the test quickly, which is also the most effective way to pass the exam.
http://www.itexamlibrary.com/
Itexamlibrary provides high quality IT Certification exam dumps and latest pdf materials.
cisco
Exam dumps PDF, and practice exam questions can help you pass the exam quickly and smoothly. 100% quality guarantee, you can get a full refund if you lost the exam! You can trust it
300-115 pdf
This exam materials will improve your pass rate.
300-208 exam dumps
It will help you pass the exam quickly, which is also the best way to pass the test.
200-355 exam material
Cisco certified, exam dumps PDF download online,various cisco exam material Let You pass exam easily.
210-065 dumps exam
About cisco, Microsoft, IBM and other exam you know how much? There are a variety of sources to help you understand and pass the certification exam quickly.
70-532 exam guide
Do you want to pass the IT certification exam quickly? These materials will help you achieve your dream of passing exams.
300-101 exam questions
Itexamlibrary provides high quality IT Certification exam dumps.And this dumps will help you pass exam easilly.

solr 4.x 特性:局部更新索引

该功能在 lucene4.x 的更新日志中有提到,最近终于找到了相关的说明,详见更新文档的单个字段。该功能看起来相当不错,假设要索引文章的新闻,新闻有个点击数的字段,需要搜索的结果按点击数排序时,这样 就能把点击数也写进索引库,单点击数变化时,单独更新点击数即可,此前是需要重现更新整个索引的,包括文章内容、标题等。这个说明中只提到了用 curl 方式类更新,理论上在 solrj 中也会有相关的接口。另外从描述中看,它只提到了,不需要送其他字段的值,不知道是否 solr 内部将其他字段读取出来,然后再自行索引进去,如果是这样的,整个性能就不济了,只是方便用户少送几个字段。具体情况需要测试一下或者跟踪一下源码

Want to pass the IT exam speedily? Here are the newest PDF test resources, including Cisco, Microsoft, IBM, Oracle, EMC and so on. These dumps will help you pass the test quickly, which is also the most effective way to pass the exam.
http://www.itexamlibrary.com/
Itexamlibrary provides high quality IT Certification exam dumps and latest pdf materials.
cisco
Exam dumps PDF, and practice exam questions can help you pass the exam quickly and smoothly. 100% quality guarantee, you can get a full refund if you lost the exam! You can trust it
300-115 pdf
This exam materials will improve your pass rate.
300-208 exam dumps
It will help you pass the exam quickly, which is also the best way to pass the test.
200-355 exam material
Cisco certified, exam dumps PDF download online,various cisco exam material Let You pass exam easily.
210-065 dumps exam
About cisco, Microsoft, IBM and other exam you know how much? There are a variety of sources to help you understand and pass the certification exam quickly.
70-532 exam guide
Do you want to pass the IT certification exam quickly? These materials will help you achieve your dream of passing exams.
300-101 exam questions
Itexamlibrary provides high quality IT Certification exam dumps.And this dumps will help you pass exam easilly.

新栏目上线:译书

好久没有更新了,实在惭愧。下个月要考项目经理,需要大量背书,不知道能不能在背书之余坚持翻译下去。

solr 4 有出来一段时间了,一直没有认真跟进,落后太多了,近期打算开始学习,打算看《Apache Solr 4 Cookbook》开学习 Solr 4 的内容,边看边翻译,翻译内容就写在译书栏目

译书栏目用的是“Wiki Web Help”这个开源项目,由于不会写 Html、css,所有就只能找现成的。“Wiki Web Help”貌似不支持IE6,IE6的朋友要看的话,要换浏览器。另外它每个页面貌似都是通过 Ajax 去后台取的,预计对搜索引擎很不友好,google 和 百度估计都抓取不到其中的内容,到时得想个办法或找个朋友帮忙弄一下。

不说了,坚持翻译下去。大家有什么问题,建议加群问,群里智慧多,群号详见 关于我

 

Want to pass the IT exam speedily? Here are the newest PDF test resources, including Cisco, Microsoft, IBM, Oracle, EMC and so on. These dumps will help you pass the test quickly, which is also the most effective way to pass the exam.
http://www.itexamlibrary.com/
Itexamlibrary provides high quality IT Certification exam dumps and latest pdf materials.
cisco
Exam dumps PDF, and practice exam questions can help you pass the exam quickly and smoothly. 100% quality guarantee, you can get a full refund if you lost the exam! You can trust it
300-115 pdf
This exam materials will improve your pass rate.
300-208 exam dumps
It will help you pass the exam quickly, which is also the best way to pass the test.
200-355 exam material
Cisco certified, exam dumps PDF download online,various cisco exam material Let You pass exam easily.
210-065 dumps exam
About cisco, Microsoft, IBM and other exam you know how much? There are a variety of sources to help you understand and pass the certification exam quickly.
70-532 exam guide
Do you want to pass the IT certification exam quickly? These materials will help you achieve your dream of passing exams.
300-101 exam questions
Itexamlibrary provides high quality IT Certification exam dumps.And this dumps will help you pass exam easilly.

Apache Nutch 1.6 发布

Apache Nutch 1.6 发布,该版本修复了超过 20 个 bug,新功能包括:新的 HostNormalizer,可通过 MIME-type 和 Indexer API 的功能增强来动态设置 fetchInterval ,更新 Tika 到 1.2 版本,更新 Autimaton 到 1.11-8 版本。

Solr In action 试读本

《solr in action》这个可能是第一本关于 Solr 4.0 的书籍,看样子是还没写完,这里有第一章的文件,有兴趣的同学可以点击下载:Solr_meap_ch01

文件大小:1.44M

格式:PDF

页数:26页

 

 

solr 4.0 正式发布了

随着 lucene 4.0 的正式发布,10月12日,solr 4.0 也正式发布了,跟之前的预测稍差了一点时间。发行包跟之前的结构基本一致,运行起来后,管理界面有了很大的改进,加入了监控、core 管理等,UI 也相对漂亮了。效果如下所示:

之前一直备受关注的实时搜索、solrCloud等功能有待后面有时间了慢慢挖掘。

附:solr4.0正式版下载

带 IK 分词器的 Luke

 

 

Luke 之前的文章中有介绍过,这次提供一个带IK分词器的luke,点击这里下载。该版本是在 luke 3.5 基础上加入了 IK2012 的包,可以对solr3.5(lucene3.5)、solr3.6(lucene3.6)的词库进行查看。

这样,在 luke 的 plugins 界面中,可以下拉选择到IK 的分词器,输入相应的文本,就能查看到分词的结果。如下图所示:
luke&IK在 search 界面里,也可以调出 IK 分词器对关键字进行分词,然后测试搜索结果。如下所示:

 

Copyright © All Rights Reserved · Green Hope Theme by Sivan & schiy · Proudly powered by WordPress · 闽ICP备18020075号