>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
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
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]
>
>
/')); // 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
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
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