Max Pfingsthorn wrote: >Hi! > >In my application, I index some strings (like filenames) untokenized, meaning >via > >doc.add(new Field(FIELD,VALUE,false,true,false)); > >When I later take a look at it with Luke, I still get tokens of the filenames >(like "news" instead of "news-item.xml") in the list of most frequent terms. >Shouldn't I get only the complete filenames there?? > >Also, how do I search case-insensitive over this kind of field? > >Thanks! > >Best regards, > >Max Pfingsthorn > >Hippo > >Oosteinde 11 >1017WT Amsterdam >The Netherlands >Tel +31 (0)20 5224466 >------------------------------------------------------------- >[EMAIL PROTECTED] / www.hippo.nl >-------------------------------------------------------------- > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > For indexing untokenized fields try the static method Field.Keyword(String fieldname,String value) then the string is really not tokenized. But i think new Field with your params should make the same. Have you tried to make a search for the filename this should only return a result when you write out the whole filename.
Case insensitive search is standard when you use the standardanalyzer i think: the code should look like this Searcher.search(QueryParser.parse("the query string","the fieldname",new StandardAnalyzer()); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]