solr

Is Solr SuggestComponent able to return shingles instead of whole field values?

喜你入骨 提交于 2020-01-21 03:42:53
问题 I use solr 5.0.0 and want to create an autocomplete functionality generating suggestions from the word-grams (or shingles) of my documents. The problem is that in return of a suggest-query I only get complete "terms" of the search field which can be extremly long. CURRENT PROBLEM: Input:"so" Suggestions: "......extremly long text so n long text continuing......" "......next long text so lar next text continuing......" GOAL: Input: "so" Suggestions with shingles: " so n" " so lar" " so lar

Is Solr SuggestComponent able to return shingles instead of whole field values?

牧云@^-^@ 提交于 2020-01-21 03:42:45
问题 I use solr 5.0.0 and want to create an autocomplete functionality generating suggestions from the word-grams (or shingles) of my documents. The problem is that in return of a suggest-query I only get complete "terms" of the search field which can be extremly long. CURRENT PROBLEM: Input:"so" Suggestions: "......extremly long text so n long text continuing......" "......next long text so lar next text continuing......" GOAL: Input: "so" Suggestions with shingles: " so n" " so lar" " so lar

Solr Query Syntax

♀尐吖头ヾ 提交于 2020-01-21 03:31:22
问题 I just got started looking at using Solr as my search web service. I don't know whether Solr supports these query types: Startswith Exact Match Contain Doesn't Contain In the range Could anyone guide me how to implement those features in Solr? Cheers, Samnang 回答1: Solr is capable of all those things but to adequately explain how to do each of time an answer would become a mini-manual for Solr. I'd suggest you read the actual manual and tutorials linked from the Solr homepage. In short though:

How to get last indexed record in Solr?

孤街浪徒 提交于 2020-01-21 03:07:35
问题 I want to know how to get/search last indexed record in Apache Solr..? When the existing record is updated then it goes to end of all the records...so I want to get that last indexed record. thanks.. 回答1: You could add a 'timestamp' field to your Solr schema that puts the current date/time into the record when it is added. <field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/> Then, do a sort in descending order by this field and the first record

Solr Composite Unique key from existing fields in schema

删除回忆录丶 提交于 2020-01-19 05:28:59
问题 I have an index named LocationIndex in solr with fields as follows: <fields> <field name="solr_id" type="string" stored="true" required="true" indexed="true"/> <field name="solr_ver" type="string" stored="true" required="true" indexed="true" default="0000"/> // and some more fields </fields> <uniqueKey>solr_id</uniqueKey> But now I want to change schema so that unique key must be composite of two already present fields solr_id and solr_ver ... something as follows: <fields> <field name="solr

Solr Composite Unique key from existing fields in schema

本秂侑毒 提交于 2020-01-19 05:26:29
问题 I have an index named LocationIndex in solr with fields as follows: <fields> <field name="solr_id" type="string" stored="true" required="true" indexed="true"/> <field name="solr_ver" type="string" stored="true" required="true" indexed="true" default="0000"/> // and some more fields </fields> <uniqueKey>solr_id</uniqueKey> But now I want to change schema so that unique key must be composite of two already present fields solr_id and solr_ver ... something as follows: <fields> <field name="solr

SpringDataSolr运用

邮差的信 提交于 2020-01-18 09:06:58
电商网站中查询商品通常会用到搜索引擎,solr就是其中一种.今天讲一下solr的安装和SpringDataSolr运用,solr是建立在Lucene上的,可以说是它的应用,而SpringDataSolr对Solr进行了封装. 1.下载solr压缩文件,将solr的war(版本4.10.3)放置tomcat的webapp目录下,启动tomcat,会解压solr的jar包. solr目录如图: 2.将所需要的扩展包放入到WEB-INF的lib目录(如果没有就新建),扩展包如图: 3.将压缩文件中的solr文件夹,作为solrhome,目录如下: 4.修改apache-tomcat-7.0.52\webapps\solr\WEB-INF下的web.xml文件,确定solrhome的位置(有点想maven仓库配置),如图: 5.启动tomcat,访问http://localhost:8080/solr.如图: 6.解压中文分词器,目录如下: 7.将中文分词器jar放置tomcat中solr的WEB-INF/lib目录下,将ext_stopword.dic,IKAnalyzer.cfg.xml,mydict.dic放置WEB-INF/classes目录(没有的话新建该目录)下,如图: 8.修改solrhome\collection1\conf目录下schema.xml文件

Use different solr requesthandlers for different webpages

醉酒当歌 提交于 2020-01-17 12:26:44
问题 I am using solrnet. I have two handler. 1) /Default handler 2) /mysearch handler 1st one is used for few of webpages & 2nd one is used for other webpages. So, how can I use both of handlers for different webpages? Please advise me this is possible or not? 来源: https://stackoverflow.com/questions/29390870/use-different-solr-requesthandlers-for-different-webpages

Use different solr requesthandlers for different webpages

懵懂的女人 提交于 2020-01-17 12:26:04
问题 I am using solrnet. I have two handler. 1) /Default handler 2) /mysearch handler 1st one is used for few of webpages & 2nd one is used for other webpages. So, how can I use both of handlers for different webpages? Please advise me this is possible or not? 来源: https://stackoverflow.com/questions/29390870/use-different-solr-requesthandlers-for-different-webpages

Could not find or load main class org.apache.solr.util.SolrCLI

佐手、 提交于 2020-01-17 08:00:47
问题 I kept getting the error "Could not find or load main class org.apache.solr.util.SolrCLI" while trying to setup SOLR on windows x64 machine. 回答1: The resolution to the problem is really simple. 1)start solr. notice that you have to use solr.cmd instead of just solr *bin/solr.cmd start* 2) then create the collection: *bin/solr.cmd create -c gettingstarted -p 8983* 3) then add file/s to index using post tool. You can execute the post command in two ways a) java -Dc=gettingstarted -jar post.jar