Problems in searching with lucene by filenames
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sriram_thota
Posted On:   Friday, June 10, 2005 06:18 AM

Hi All, I am new to lucene.I am developing a search functionality with lucene in my application.Iam facing some problems in searching.Please help me in resolving the problem. The main logic is while iam iterating the files i am writing the filenames in a seperate text file "file.txt". The problem is i am able to write the names of the files in file.txt and able to index file.txt and before indexing i had converted the file names in file.txt to lowercase,but iam not able to search with filenames.Iam giving the complete filename while searching. Any help will be highly appreciated. Sriram.T    More>>

Hi All,



I am new to lucene.I am developing a search functionality with lucene in my application.Iam facing some problems in searching.Please help me in resolving the problem.

The main logic is while iam iterating the files i am writing the filenames in a seperate text file "file.txt".


The problem is i am able to write the names of the files in file.txt and able to index file.txt and before indexing i had converted the file names in file.txt to lowercase,but iam not able to search with filenames.Iam giving the complete filename while searching.

Any help will be highly appreciated.



Sriram.T

   <<Less

Re: Problems in searching with lucene by filenames

Posted By:   Charles_Sanders  
Posted On:   Thursday, June 16, 2005 03:41 PM

Couple of things to consider: Field Type and Analyzer. What field type are you using for the file name? Are you using a field type that is tokenized? If so, you may not want to do this. If you do want to tokenize the file names, then look at the analyzer you are using and how it handles special characters (:, , .). Some analyzers break strings on special characters and remove the characters. Other analyzers leave some special characters in place. Depending on how the analyzer handle special characters, it could make searching difficult.
About | Sitemap | Contact