Sure, that'd work. It would also work to just continue to use
f.getPath() whenever you need it.
FWIW
Erick
On Nov 12, 2007 1:43 PM, KR <[EMAIL PROTECTED]> wrote:
>
>
> Erick Erickson wrote:
> >
> > Sure, just define it in the same scope as you want to refer to it.
> > Of course, that tells you
Erick Erickson wrote:
>
> Sure, just define it in the same scope as you want to refer to it.
> Of course, that tells you nothing ...
>
> Java variables go out of scope when the last '}' *at the same level*
> is passed. For intance:
>
> {
>string s1;
>{
> string s2;
>} // s2 i
Sure, just define it in the same scope as you want to refer to it.
Of course, that tells you nothing ...
Java variables go out of scope when the last '}' *at the same level*
is passed. For intance:
{
string s1;
{
string s2;
} // s2 is out of scope after this line.
// s1 is still
Grant Ingersoll-6 wrote:
>
> When you are indexing the file and adding the Document, you will need
> to parse out your filename per your regular expression, and then
> create the appropriate field:
>
> Document doc = new Document()
> String cat = getCategoryFromFileName(inputFileName)
> doc
When you are indexing the file and adding the Document, you will need
to parse out your filename per your regular expression, and then
create the appropriate field:
Document doc = new Document()
String cat = getCategoryFromFileName(inputFileName)
doc.add(new Field("category", cat, ...)
//do t