2013年9月22日星期日

Compass + paoding Chinese word segmentation problem

Took a long time , and finally understand the whole roughly lucene and compass , and then I use SSH + compass to do a full-text search of the sample program , Word uses the paoding, however , the search result is not ideal .

For example , the user enters the key words are " Business Week ", after word got " commercial "," Weekly " two words , there are so few records in the index :

1, Business Week
2, Southern Weekly
3, new Weekly
4, Phoenix Weekly
5, Life Weekly
6, commercial Channel
7, commercial Building
8, commercial Tycoon
9, Harbin commercial University

The question now is , only the first one out of the record : Business Week .
My goal is to contain all " commercial " or " Weekly " The record should show up , that is a record as long as there is one word matches , then it should be displayed. present situation is necessary to match each word to be displayed.

Be analogy, my idea is commercial or Weekly , not commercial and Weekly .

relevant code is as follows:


Compass compass = compassTemplate.getCompass();
CompassSession session = compass.openSession();
CompassHits hits = session.find("name:" + "商业 周刊");
System.out.println("共 " + hits.getLength() + " 条匹配结果。");


anxious ... Online ...
------ Solution --------------------------- -----------------
this is not a word of the problem is that you issue a query condition setting
------ Solution ----- ---------------------------------------
http://85600367.iteye.com/admin/blogs/855535 this is my record of multi-criteria query lucene
You can learn from compass never used
------ For reference only ------------------------ ---------------


God help me ... give a reply to it ...
------ For reference only ---------------------- -----------------


then how to set it this ?


------ For reference only ---------------------------------------


artificial Sticky ....
------ For reference only ---------------------------- -----------
. l;;'' jklhj; nlnnnn
------ For reference only --------------- ------------------------
same question ah ! ! Who can help answer

没有评论:

发表评论