does lucene search function work in large size document?
Posted
by shaon-fan
on Stack Overflow
See other posts from Stack Overflow
or by shaon-fan
Published on 2010-04-27T13:28:50Z
Indexed on
2010/04/28
12:03 UTC
Read the original article
Hit count: 320
Hi,there
I have a problem when do search with lucene.
First, in lucene indexing function, it works well to huge size document. such as .pst file, the outlook mail storage. It can build indexing file include all the information of .pst. The only problem is to large sometimes, include very much words.
So when i search using lucene, it only can process the front part of this indexing file, if one word come out the back part of the indexing file, it couldn't find this word and no hits in result. But when i separate this indexing file to several parts in stupid way when debugging, and searching every parts, it can work well.
So i want to know how to separate indexing file, how much size should be the limit of searching?
cheers and wait 4 reply.
++++++++++++++++++++++++++++++++++++++++++++++++++
hi,there, follow Coady siad, i set the length to max 2^31-1. But the search result still can't include what i want. simply, i convert the doc word to string array[] to analyze, one doc word has 79680 words include the space and any symbol. when i search certain word, it just return 300 count, actually it has more than 300 results. The same reason, when i search a word in back part of the doc, it also couldn't find. //////////////set the length
idexwriter.SetMaxFieldLength(2147483647);
////////////////////search
IndexSearcher searcher = new ndexSearcher(Program.Parameters["INDEX_LOCATION"].ToString()); Hits hits = searcher.Search(query);
This is my code, as others same. I found that problem when i need to count every word hits in a doc. So i also found it couldn't search word in back part of doc.
pls help me to find, is there any set searcher length somewhere? how u meet this problem.
© Stack Overflow or respective owner