Redian新闻
>
再请教一个lucene的问题
avatar
再请教一个lucene的问题# Java - 爪哇娇娃
J*n
1
不久前因迟到而未能在巴西登上失事法航客机的一名德国裔意大利女公民在数日后与丈
夫一起返回家乡时不幸遭遇车祸,女公民当场死亡,她的丈夫身受重伤,现在还在医院
抢救......
德国裔意大利退休公民约翰娜-甘塔勒和库尔特-甘塔勒夫妇5月31日只因晚到机场几分
钟,未能在巴西里约热内卢登上随后失事坠入大西洋的法航客机,幸免于空难。
数日后两人结束休假经德国慕尼黑返回欧洲,两人决定驾驶一辆租来的汽车返回自己在
意大利梅拉诺市的家乡,6月9日开车驶上从慕尼黑机场到意大利南部阿尔卑斯地区布雷
内罗市之间的公路。
在行驶到与意大利交界的奥地利城市库夫施坦因时,两人乘坐的汽车不知因为什么原因
突然失去控制,汽车疾速闯入逆向车道,与一辆卡车相撞。约汉娜当场死亡,她的丈夫
身受重伤,现在还在医院抢救。
avatar
t*g
2
我需要把token从lucene index中dump出来,可能要很多数据。怎么做呢?要用Term做吗
?我是一个新手。。谢谢!
avatar
t*e
3
Depending on how index files are created in the first place, Lucene may
store a full copy of the original text to be indexed, such that you can
restore the text from the query results. Otherwise, you only get other
fields like IDs from the Hit Documents.
avatar
t*g
4
We did store the original text. I don't have problems in dumping the
original text. I can dump it from through Hit Documents. However, what I
need is to dump the tokenized text. It doesn't exist in the Hit Documents.
Looks like I need to go into indices to get the tokenized documents. But I'm
new to Lucene, I can't find a way to do it. Need help! Thx.

【在 t*******e 的大作中提到】
: Depending on how index files are created in the first place, Lucene may
: store a full copy of the original text to be indexed, such that you can
: restore the text from the query results. Otherwise, you only get other
: fields like IDs from the Hit Documents.

avatar
t*e
5

.
'm
This is impossible. Inverted index in a search engine stores terms
(tokens) in a term index file as the search key, which maps Document IDs,
and returns matched Documents as the query results. But not the other way around.
The terms you specified in you query are the tokens you may use to highlight
the original text.

【在 t*g 的大作中提到】
: We did store the original text. I don't have problems in dumping the
: original text. I can dump it from through Hit Documents. However, what I
: need is to dump the tokenized text. It doesn't exist in the Hit Documents.
: Looks like I need to go into indices to get the tokenized documents. But I'm
: new to Lucene, I can't find a way to do it. Need help! Thx.

avatar
b*y
6
You will need to store the terms in lucene index. But, I don't see why you
want to do that.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。