Re: Create and populate a field when indexing

2007-11-12 Thread Erick Erickson
>Document doc = new Document(); > >// Add the url as a field named "path". Use a field that is >// indexed (i.e. searchable), but don't tokenize the field into words. >doc.add(new Field("path", f.getPath().replace(dirSep, '/'), > Fiel

Re: Create and populate a field when indexing

2007-11-12 Thread KR
named "path". Use a field that is // indexed (i.e. searchable), but don't tokenize the field into words. doc.add(new Field("path", f.getPath().replace(dirSep, '/'), Field.Store.YES, Field.Index.UN_TOKENIZED)); This way the filename is available

Re: Create and populate a field when indexing

2007-11-12 Thread Erick Erickson
g uid) { > String url = uid.replace('\u', '/'); // replace nulls with > slashes >return url.substring(0, url.lastIndexOf('/')); // remove date from end > } > > Is there some way for me to perhaps chop down to the filename here, and > make > that available later in the code? > > K. > -- > View this message in context: > http://www.nabble.com/Create-and-populate-a-field-when-indexing-tf4713018.html#a13667927 > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >

Re: Create and populate a field when indexing

2007-11-09 Thread KR
/')); // remove date from end } Is there some way for me to perhaps chop down to the filename here, and make that available later in the code? K. -- View this message in context: http://www.nabble.com/Create-and-populate-a-field-when-indexing-tf4713018.html#a13667927 Sent from the Lucen

Re: Create and populate a field when indexing

2007-10-29 Thread Grant Ingersoll
roubleshooting". For a file named xxx-cal-123.html the indexer adds the field "category" with the value "cal". For a file named xx-qv-(9).html the indexer adds the field "category" with the value "qv". Is there a way to do that? Beef. -- View this

Create and populate a field when indexing

2007-10-29 Thread KR
e named xxx-cal-123.html the indexer adds the field "category" with the value "cal". For a file named xx-qv-(9).html the indexer adds the field "category" with the value "qv". Is there a way to do that? Beef. -- View this message in context: http://www.na