Problem with Field.Text()

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with Field.Text()

Jan Pieper
I hope now I am in the right mailinglist. In the -dev mailinglist Steven
Parkes said, that I have to change this:

 > Field.Text(String, String);

to

 > Field.Text(String, String, Field.Store.YES, Field.Index.TOKENIZED);

But it seems that there isnt such a method declaration. Where is the
mistake?

-- Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Problem with Field.Text()

steven_parkes
Blah. Sorry for the typo. Get rid of the .Text:

Field(String, String, Field.Store.YES, Field.Index.TOKENIZED);

-----Original Message-----
From: Jan Pieper [mailto:[hidden email]]
Sent: Thursday, October 05, 2006 2:53 PM
To: [hidden email]
Subject: Problem with Field.Text()

I hope now I am in the right mailinglist. In the -dev mailinglist Steven
Parkes said, that I have to change this:

 > Field.Text(String, String);

to

 > Field.Text(String, String, Field.Store.YES, Field.Index.TOKENIZED);

But it seems that there isnt such a method declaration. Where is the
mistake?

-- Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Problem with Field.Text()

Jan Pieper
No it is not your fault, it is mine, but it also does not function. My
compiler
gives me this error message:

--------------------------------------------------------------------------------
cannot find symbol:
method Field(
    java.lang.String,
    java.lang.String,
    org.apache.lucene.document.Field.Store,
    org.apache.lucene.document.Field.Index
);
--------------------------------------------------------------------------------

I found the declaration in the docs but i does not function. I do not
know why.
I downloaded the actual stable version: 2.0.0.

-- Jan


> Blah. Sorry for the typo. Get rid of the .Text:
>
> Field(String, String, Field.Store.YES, Field.Index.TOKENIZED);
>
> -----Original Message-----
> From: Jan Pieper [mailto:[hidden email]]
> Sent: Thursday, October 05, 2006 2:53 PM
> To: [hidden email]
> Subject: Problem with Field.Text()
>
> I hope now I am in the right mailinglist. In the -dev mailinglist Steven
> Parkes said, that I have to change this:
>
>  > Field.Text(String, String);
>
> to
>
>  > Field.Text(String, String, Field.Store.YES, Field.Index.TOKENIZED);
>
> But it seems that there isnt such a method declaration. Where is the
> mistake?
>
> -- Jan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Problem with Field.Text()

steven_parkes
In reply to this post by Jan Pieper
Do you have the appropriate imports?

Look at IndexFiles.java in src/demo/org/apache/lucene/demo. It uses this
call for adding two fields. You should be able to build this with "ant
compile-demo". That should help get you started.

-----Original Message-----
From: Jan Pieper [mailto:[hidden email]]
Sent: Thursday, October 05, 2006 3:06 PM
To: [hidden email]
Subject: Re: Problem with Field.Text()

No it is not your fault, it is mine, but it also does not function. My
compiler
gives me this error message:

------------------------------------------------------------------------
--------
cannot find symbol:
method Field(
    java.lang.String,
    java.lang.String,
    org.apache.lucene.document.Field.Store,
    org.apache.lucene.document.Field.Index
);
------------------------------------------------------------------------
--------

I found the declaration in the docs but i does not function. I do not
know why.
I downloaded the actual stable version: 2.0.0.

-- Jan


> Blah. Sorry for the typo. Get rid of the .Text:
>
> Field(String, String, Field.Store.YES, Field.Index.TOKENIZED);
>
> -----Original Message-----
> From: Jan Pieper [mailto:[hidden email]]
> Sent: Thursday, October 05, 2006 2:53 PM
> To: [hidden email]
> Subject: Problem with Field.Text()
>
> I hope now I am in the right mailinglist. In the -dev mailinglist
Steven

> Parkes said, that I have to change this:
>
>  > Field.Text(String, String);
>
> to
>
>  > Field.Text(String, String, Field.Store.YES, Field.Index.TOKENIZED);
>
> But it seems that there isnt such a method declaration. Where is the
> mistake?
>
> -- Jan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

adb
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Field.Text()

adb
In reply to this post by Jan Pieper
You have to create a new Field class with "new Field(...", i.e.

replace doc.add(Field.Text....   with doc.add(new Field(...

Antony




Jan Pieper wrote:

> No it is not your fault, it is mine, but it also does not function. My
> compiler
> gives me this error message:
>
> --------------------------------------------------------------------------------
>
> cannot find symbol:
> method Field(
>    java.lang.String,
>    java.lang.String,
>    org.apache.lucene.document.Field.Store,
>    org.apache.lucene.document.Field.Index
> );
> --------------------------------------------------------------------------------
>
>
> I found the declaration in the docs but i does not function. I do not
> know why.
> I downloaded the actual stable version: 2.0.0.
>
> -- Jan
>
>
>> Blah. Sorry for the typo. Get rid of the .Text:
>>
>> Field(String, String, Field.Store.YES, Field.Index.TOKENIZED);
>>
>> -----Original Message-----
>> From: Jan Pieper [mailto:[hidden email]] Sent: Thursday, October 05,
>> 2006 2:53 PM
>> To: [hidden email]
>> Subject: Problem with Field.Text()
>>
>> I hope now I am in the right mailinglist. In the -dev mailinglist Steven
>> Parkes said, that I have to change this:
>>
>>  > Field.Text(String, String);
>>
>> to
>>
>>  > Field.Text(String, String, Field.Store.YES, Field.Index.TOKENIZED);
>>
>> But it seems that there isnt such a method declaration. Where is the
>> mistake?
>>
>> -- Jan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>>
>>  
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Problem with Field.Text()

Erick Erickson
In reply to this post by steven_parkes
Is your classpath or buildpath for the project in Eclipse) pointing to
2.0rather than
1.x?

Erick

On 10/5/06, Steven Parkes <[hidden email]> wrote:

>
> Do you have the appropriate imports?
>
> Look at IndexFiles.java in src/demo/org/apache/lucene/demo. It uses this
> call for adding two fields. You should be able to build this with "ant
> compile-demo". That should help get you started.
>
> -----Original Message-----
> From: Jan Pieper [mailto:[hidden email]]
> Sent: Thursday, October 05, 2006 3:06 PM
> To: [hidden email]
> Subject: Re: Problem with Field.Text()
>
> No it is not your fault, it is mine, but it also does not function. My
> compiler
> gives me this error message:
>
> ------------------------------------------------------------------------
> --------
> cannot find symbol:
> method Field(
>     java.lang.String,
>     java.lang.String,
>     org.apache.lucene.document.Field.Store,
>     org.apache.lucene.document.Field.Index
> );
> ------------------------------------------------------------------------
> --------
>
> I found the declaration in the docs but i does not function. I do not
> know why.
> I downloaded the actual stable version: 2.0.0.
>
> -- Jan
>
>
> > Blah. Sorry for the typo. Get rid of the .Text:
> >
> > Field(String, String, Field.Store.YES, Field.Index.TOKENIZED);
> >
> > -----Original Message-----
> > From: Jan Pieper [mailto:[hidden email]]
> > Sent: Thursday, October 05, 2006 2:53 PM
> > To: [hidden email]
> > Subject: Problem with Field.Text()
> >
> > I hope now I am in the right mailinglist. In the -dev mailinglist
> Steven
> > Parkes said, that I have to change this:
> >
> >  > Field.Text(String, String);
> >
> > to
> >
> >  > Field.Text(String, String, Field.Store.YES, Field.Index.TOKENIZED);
> >
> > But it seems that there isnt such a method declaration. Where is the
> > mistake?
> >
> > -- Jan
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Field.Text()

Jan Pieper
In reply to this post by adb
Yeah it works :) thanks to all, for help.

> You have to create a new Field class with "new Field(...", i.e.
>
> replace doc.add(Field.Text....   with doc.add(new Field(...
>
> Antony
>
>
>
>
> Jan Pieper wrote:
>> No it is not your fault, it is mine, but it also does not function.
>> My compiler
>> gives me this error message:
>>
>> --------------------------------------------------------------------------------
>>
>> cannot find symbol:
>> method Field(
>>    java.lang.String,
>>    java.lang.String,
>>    org.apache.lucene.document.Field.Store,
>>    org.apache.lucene.document.Field.Index
>> );
>> --------------------------------------------------------------------------------
>>
>>
>> I found the declaration in the docs but i does not function. I do not
>> know why.
>> I downloaded the actual stable version: 2.0.0.
>>
>> -- Jan
>>
>>
>>> Blah. Sorry for the typo. Get rid of the .Text:
>>>
>>> Field(String, String, Field.Store.YES, Field.Index.TOKENIZED);
>>>
>>> -----Original Message-----
>>> From: Jan Pieper [mailto:[hidden email]] Sent: Thursday, October
>>> 05, 2006 2:53 PM
>>> To: [hidden email]
>>> Subject: Problem with Field.Text()
>>>
>>> I hope now I am in the right mailinglist. In the -dev mailinglist
>>> Steven
>>> Parkes said, that I have to change this:
>>>
>>>  > Field.Text(String, String);
>>>
>>> to
>>>
>>>  > Field.Text(String, String, Field.Store.YES, Field.Index.TOKENIZED);
>>>
>>> But it seems that there isnt such a method declaration. Where is the
>>> mistake?
>>>
>>> -- Jan
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>>
>>>  
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]