c# - Lucene Searcher return only one match result -


my search text goes "ma" , have 2 lucene document have ma text in it. in return 1 document.

below code :

//adding deocument  document.add(new field("text",text,field.store.yes, field.index.tokenized));  //search logic :  indexreader reader = indexreader.open(getfileinfo(indexname)); //create index searcher perform search indexsearcher searcher = new indexsearcher(reader);  //list of id list<string> searchresultid = new list<string>();  //build query object queryparser parser = new queryparser("text", analyzer); parser.setallowleadingwildcard(true); query query = parser.parse(searchtext); //execute query hits hits = searcher.search(query); 

maybe use luke. it's useful diagnostic tool can display contents of existing lucene index , other interesting stuff. haven't used myself, i'm not sure, think might in debugging issue. luck!


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -