Time of Update: 2018-12-05
2012-12-22 9:18:06 org.apache.solr.common.SolrException log嚴重: org.apache.solr.common.SolrException: ERROR: [doc=[B@e046ccf] unknown field 'geo_name' at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:340) at
Time of Update: 2018-12-05
Solr的相關推薦其實用了Lucene的MoreLikeThis,在Solr使用很簡單,只需簡單配置即可。//配置如下: <!-- request handler likehua --> <requestHandler name="/mlt" class="solr.MoreLikeThisHandler">
Time of Update: 2018-12-05
1、在solr/config/solrconfig.xml中配置handler 配置xml如下: <!-- request handler likehua --> <requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler"> <lst name="defaults"> <str
Time of Update: 2018-12-05
在看這個對象之前,我們要知道BooleanQuery這個對象能幹什麼。它能幹什麼呢,它能進行組合查詢。大家都知道,一般的進階查詢(比如前程無憂的職位搜尋應該用到了組合查詢)都會用到組合查詢。它了組合,它應該是搜尋多個條目,每個條目應該是它的Clause。 別的不多說,我們來看看這個BooleanQuery類的主要屬性和方法。 /** A Query that matches documents matching boolean combinations of
Time of Update: 2018-12-05
1、使用XmlBeanFactory讀取spring設定檔,可以如下: Resource resource=new ClassPathResource("conf/spring/applicationContext.xml"); BeanFactory factory=new XmlBeanFactory(resource); com.geostar.query.beans.DataSource
Time of Update: 2018-12-05
我測試了一下多欄位構造查詢,代碼如下:try { long start=System.currentTimeMillis(); Directory dic = new SimpleFSDirectory(new File(ILuceneManager.DEFAULT_REGION_LUCENE_INDEX_PATH)); IndexSearcher searcher=new IndexSearcher(dic); //----------設定相似性
Time of Update: 2018-12-05
如果想刪除Lucene索引,常常採用的類是IndexWriter,描述IndexWriter類刪除索引的方法: ok,我來測試這個deleteAll方法是什麼效果。首先建立一些索引檔案(具體的方法和代碼我就此省略),索引檔案可以組織圖如下: 接下來,我們來將索引刪除,以前刪除索引我都是手動刪除,汗~~~~,因為那些索引建立了以後幾乎都不改變,因為那些資料都是不動的興趣點資料。所以我當時也沒有寫刪除索引的方法。下面是我測試刪除索引的方法:View Code 1
Time of Update: 2018-12-05
TermQuery是lucene查詢中最基本的一種原子查詢,從它的名字Term我們可以看出,它只能針對一個欄位進行查詢。下面是我測試的一個代碼範例:@Testpublic void testGovenQuery(){try {String keyword="杭州";Directory dic=new SimpleFSDirectory(new File(ILuceneManager.DEFAULT_REGION_LUCENE_INDEX_PATH));IndexSearcher
Time of Update: 2018-12-05
今天答應了武漢天喻通訊技術有限公司的offer(java web方向)。然後再往上查了一下武漢天喻通訊 ,我的那個汗啊 幾乎全是差評。天喻答應我試用3600底薪+餐補(200多),試用期間沒有績效。轉正(需要兩個月)以後才開始算績效,績效演算法是底薪*15%。每月要交400多公積金等。備忘,本人現在居住在武漢,剛好一年零四個月的工作經驗。本人在網上看了那麼多差評,心中有疑問: 1、天喻是不是加班很兇。
Time of Update: 2018-12-05
直接上代碼: /** * 解析MoreLikeThis * @author likehua * */public List<SolrDocument> parseMoreLikeThis(QueryResponse response){List<SolrDocument> lst=new ArrayList<SolrDocument>();SimpleOrderedMap res= (SimpleOrderedMap)
Time of Update: 2018-12-05
由於項目使用的js很多,為了提高系統效率,將js做壓縮處理。成功的對多個js進行壓縮,必須經曆下面兩步。1.合并多個js成為一個js.2.將和並過後的js進行壓縮處理。使用的ant配置主要有: <property name="root" value="WebRoot"></property> <property name="js" value="${root}/js"></property> <property
Time of Update: 2018-12-05
Solr具有拼字檢查的功能,您只需修改solr的設定檔(solrconfig.xml)中spellcheck部分: <searchComponent name="spellcheck" class="solr.SpellCheckComponent"> <str name="queryAnalyzerFieldType">textSpell</str> <!--likehua 20121227 -->
Time of Update: 2018-12-05
在使用maven構建項目時,項目如果太大的話,很容易記憶體溢出的。出問題之後我們該怎麼解決呢?通常的做法就是改變其環境變數。下面以我本機為例來逐步羅列:1、找到MAVEN_HOME\bin\mvn.bat,2、開啟mvn.bat ,找到“@REM set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE” ,在改行的下一行添加:set MAVEN_OPTS= -Xms256m -Xmx512m ( 該參數什麼意思,請搜尋jvm參數相關的知識。
Time of Update: 2018-12-05
JAXB, Web Services, and Binary Data When an instance of a class is used with a Web Service, the JAX-WS implementation can choose to handle fields/properties that hold binary data as SOAP attachment. An attachment is a means to send the data outside
Time of Update: 2018-12-05
google search了一下 "bluehost rails" 就有很多文章(英文居多)。 大家請參考! 但有幾個特別要注意的地方。1. 添加子網域名稱進入cPanel後在Domains下的subdomains,點擊進入,然後添加即可。 (一般人在產生rails時忘了添加子網域名稱,也會忘了產生子網域名稱的link.) 2.dispatch.fcgi和dispatch.rb(在publice目錄下)的首行。因為BlueHost下是虛擬unix系統,所以要改成#!/usr/bin/ruby (
Time of Update: 2018-12-05
在vs開發中,自訂控制項若重寫OnLoad, PreLoad等方法,在設計介面時會報Null異常,原因是在VS“設計時”狀態會自動運行OnLoad等方法,一些空的對象就會報錯。 網上說加上DesignMode就行了。比如:Code highlighting produced by Actipro CodeHighlighter
Time of Update: 2018-12-05
http://localhost:1985/solr/select/?q=*%3A*&version=2.2&start=0&rows=10&indent=on&wt=json solr的http請求後加一個wt參數
Time of Update: 2018-12-05
rails 命令用法 實用:rake -T 列出所有rake命令rake -T plugin 列出所有有關plugin的rake命令rake db:migrate version=0 清除資料庫資料和結構 1.1 建立一個Rails應用程式 $ rails app_name 可選項: -d, database=xxx 指定安裝一個資料庫(mysql oracle postgresql sqlite2 sqlite3 ), 預設情況下是資料庫 -r, ruby-path=
Time of Update: 2018-12-05
文章目錄 1. database.yml (in the config folder)2. environments.rb (in the config folder)3. .htaccess (in the public folder)4. dispatch.fcgi (in the config folder) I’ve noticed a lot of people asking about this one (probable
Time of Update: 2018-12-05
大家都知道jQuery(JQ)是基於js的代碼封裝,效能肯定不如原生js好,尤其是DOM操縱部分效能差異明顯。今天要研究的就是原生js和jQuery的DOM操作函數在主流瀏覽器中的效能差異究竟是多少,是否真的差距明顯。測試平台:E5400+2G DDR2+Windows 7 SP1 32bit參與測試的瀏覽器有:FireFox: 3.6.3IE6IE8Chrome: 10.0.648Safari: 5.0.1Opera: