Hi there,

I'm trying to do a, from my point of view, simple thing.

I would like to do a search ignoring the case of the stored information in the index...with the following code:

reader = IndexReader.open(indexDirectory);
                
Searcher searcher = new IndexSearcher(reader);
Analyzer analyzer = new StandardAnalyzer();

//Created my own Query parse to handle ranges like filed:[1 TO 6]
QueryParser parser = new CustomQueryParser(FieldNames.CONTENTS, analyzer);
parser.setAllowLeadingWildcard(true);
parser.setLowercaseExpandedTerms(false);
Query query = parser.parse(queryLine);

TopDocs tmp = searcher.search(query, null, 20, sort);

To be more percisely...

I have a field which is called filename and contains a filename which can of course be lowercase or upppercase or a mixture...

I would like to do the following:

+filename:/*scm*.doc

That should result in getting things like

/...SCMtest.doc
/...scmtest.doc
/...scm.doc
etc.

May be someone can give me hint how to solve this...

kind regards
Karl Heinz Marbaise
--
SoftwareEntwicklung Beratung Schulung    Tel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl Heinz Marbaise        ICQ#: 135949029
Hauptstrasse 177                         USt.IdNr: DE191347579
52146 Würselen                           http://www.soebes.de

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to