Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/demo/SearchFiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ using namespace lucene::search;


void SearchFiles(const char* index){
standard::StandardAnalyzer analyzer;
lucene::analysis::WhitespaceAnalyzer analyzer;
char line[80];
TCHAR tline[80];
TCHAR* buf;
Expand All @@ -50,11 +50,13 @@ void SearchFiles(const char* index){
Query* q = QueryParser::parse(tline,_T("contents"),&analyzer);

buf = q->toString(_T("contents"));
Query* p=q;

_tprintf(_T("Searching for: %s\n\n"), buf);
_CLDELETE_LCARRAY(buf);

uint64_t str = Misc::currentTimeMillis();
Hits* h = s.search(q);
Hits* h = s.search(p);
uint32_t srch = (int32_t)(Misc::currentTimeMillis() - str);
str = Misc::currentTimeMillis();

Expand Down