You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Aaron Shaw <aa...@onetel.com> on 2006/12/04 11:08:23 UTC

Problem: "The selected method Keyword was not found"

Hi,

I'm attempting to use Lucene under Coldfusion MX, however when I try to
create and index I am coming up against the following error message when I
try to add a document:

The selected method Keyword was not found.

I'm using the following lines of code to try to create the index:

<cfscript>
analyzer = CreateObject("java","org.apache.lucene.analysis.StopAnalyzer"); 
analyzer.init();
writer = CreateObject("java","org.apache.lucene.index.IndexWriter");
writer.init("c:\cfusionmx\wwwroot\lucene\docsindex",analyzer, true); 
document = CreateObject("java", "org.apache.lucene.document.Document");
field = CreateObject("java", "org.apache.lucene.document.Field");
system = CreateObject("java", "java.lang.System"); 
content = theContent; 
endtitle=len(theContent);
startTitle = FindNoCase("", content);
if (endTitle GT 0) {
     title = trim(Mid(content, startTitle + 7, endTitle - startTitle - 7));
} 
document.add(field.Keyword("url","http://localhost:8500/cfdocs/dochome.htm"));
</cfscript>

However if I dump the "field" object, I would expect to see the Keyword
method or property displayed, however this is not the case.

If anyone can shed any light on this it would be very much appreciated.

Thanks,

Aaron
-- 
View this message in context: http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-found%22-tf2750289.html#a7673372
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


Re: Problem: "The selected method Keyword was not found"

Posted by David Sheldon <da...@earth.li>.
On Mon, Dec 04, 2006 at 02:43:13AM -0800, Aaron Shaw wrote:
> field = CreateObject("java", "org.apache.lucene.document.Field");
> 
> I'm assuming the next line needs to be the equivalent of this:
> 
> Field field = new Field("url","http://localhost:8500/cfdocs/dochome.htm", 
> 
> however I'm not sure what this is meant to do so I don't really know how to
> translate it...is this creating a new object or calling a method of my
> existing field object?

It is creating a new object, but Coldfusion represents this differently. 

As explained in the Adobe help: http://qurl.com/pg7g2

Your "CreateObject" call will load the object, and you actually call the
constructor by calling "init" on your field object.

David

-- 
UNIX was not designed to stop you from doing stupid things, because that
would also stop you from doing clever things.
		-- Doug Gwyn

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


RE: Problem: "The selected method Keyword was not found"

Posted by "Risov, Maria" <ma...@eds.com>.
Aaron,

When you download Lucene from one of the mirrors http://www.apache.org/dyn/closer.cgi/lucene/java/ (you are using the Java version, right?), you should see packages named "lucene-core-2.0.0.jar".  These contain all Lucene modules and other components that became standard.  You need the "lucene-2.0.0.zip" - without the "core" word.  This package contains the "contrib" folder with additional analyzers and other useful modules.  

Good luck! 

Marie 


-----Original Message-----
From: Aaron Shaw [mailto:aaronshaw@onetel.com] 
Sent: Tuesday, December 05, 2006 4:36 AM
To: java-user@lucene.apache.org
Subject: RE: Problem: "The selected method Keyword was not found"


Hi,

thank you both for your help. Where would I find this "Contributions"?

Aaron


Risov, Maria wrote:
> 
> It's in Contributions rather than being in the core Lucene folder. 
> 
> Marie Risov
> 
> 
> 
> -----Original Message-----
> From: Erick Erickson [mailto:erickerickson@gmail.com]
> Sent: Monday, December 04, 2006 2:35 PM
> To: java-user@lucene.apache.org
> Subject: Re: Problem: "The selected method Keyword was not found"
> 
> It's a secret, do you have the secret code <G>???
> 
> Try SnowballAnalyzer....
> 
> Erick
> 
> On 12/4/06, Aaron Shaw <aa...@onetel.com> wrote:
>>
>>
>> thank you both for your help, got it working now
>>
>>
>> One additional thing, how do I get it to use stemming? I'm presuming 
>> I have to use one of the analyzers other than "simpleanalyzer" but I 
>> can't seem to find out which?
>>
>>
>> Samir Abdou wrote:
>> >
>> > In your classpath !
>> >
>> > -----Message d'origine-----
>> > De: Aaron Shaw [mailto:aaronshaw@onetel.com]
>> > Envoyé: lundi, 4. décembre 2006 12:02
>> > À: java-user@lucene.apache.org
>> > Objet: RE: Problem: "The selected method Keyword was not found"
>> >
>> >
>> > Is there any quick way of telling whether I'm using 1.9 or 2? I 
>> > want to make sure I successfully removed the old version
>> >
>> >
>> > Samir Abdou wrote:
>> >>
>> >> If you're trying to use the 1.9 version it's OK! The 'Keyword' 
>> >> static method is not available in the 2.0 version.
>> >>
>> >> Field field = new
>> Field("url","http://localhost:8500/cfdocs/dochome.htm
>> ",
>> >>
>> >>>...is this creating a new object or calling a method of my 
>> >>>existing field object?
>> >>
>> >> This is creating a new object.
>> >>
>> >> Samir
>> >>
>> >>
>> >> Samir Abdou wrote:
>> >>>
>> >>> Field field = new
>> >>> Field("url","http://localhost:8500/cfdocs/dochome.htm",
>> >>> Field.Store.YES, Field.Index.UN_TOKENIZED);
>> >>>
>> >>> You need tot translate this to cf script :-)
>> >>>
>> >>> For more information, take a look to 
>> >>> http://lucene.apache.org/java/1_9_1/api/index.html
>> >>>
>> >>>
>> >>> Welcome,
>> >>> Samir
>> >>>
>> >>>
>> >>> -----Message d'origine-----
>> >>> De: Aaron Shaw [mailto:aaronshaw@onetel.com]
>> >>> Envoyé: lundi, 4. décembre 2006 11:23
>> >>> À: java-user@lucene.apache.org
>> >>> Objet: RE: Problem: "The selected method Keyword was not found"
>> >>>
>> >>>
>> >>> Hi,
>> >>>
>> >>> I've tried it in 2.0 and 1.9
>> >>>
>> >>> What syntax should I be using to add documents in the new version 
>> >>> instead?
>> >>>
>> >>> Thanks,
>> >>>
>> >>> Aaron
>> >>>
>> >>>
>> >>>
>> >>> Samir Abdou wrote:
>> >>>>
>> >>>> Hi,
>> >>>>
>> >>>> The method Field.Keyword is not longer available in Lucene's 
>> >>>> last version!
>> >>>>
>> >>>> Which version are you using?
>> >>>>
>> >>>> Regards,
>> >>>> Samir
>> >>>>
>> >>>> -----Message d'origine-----
>> >>>> De: Aaron Shaw [mailto:aaronshaw@onetel.com]
>> >>>> Envoyé: lundi, 4. décembre 2006 11:08
>> >>>> À: java-user@lucene.apache.org
>> >>>> Objet: Problem: "The selected method Keyword was not found"
>> >>>>
>> >>>>
>> >>>> Hi,
>> >>>>
>> >>>> I'm attempting to use Lucene under Coldfusion MX, however when I 
>> >>>> try
>> to
>> >>>> create and index I am coming up against the following error 
>> >>>> message when I try to add a document:
>> >>>>
>> >>>> The selected method Keyword was not found.
>> >>>>
>> >>>> I'm using the following lines of code to try to create the index:
>> >>>>
>> >>>> <cfscript>
>> >>>> analyzer =
>> >>>> CreateObject("java","org.apache.lucene.analysis.StopAnalyzer");
>> >>>
>> >>>> analyzer.init();
>> >>>> writer = 
>> >>>> CreateObject("java","org.apache.lucene.index.IndexWriter");
>> >>>> writer.init("c:\cfusionmx\wwwroot\lucene\docsindex",analyzer, 
>> >>>> true); document = CreateObject("java", 
>> >>>> "org.apache.lucene.document.Document
>> ");
>> >>>> field = CreateObject("java", 
>> >>>> "org.apache.lucene.document.Field");
>> >>>> system = CreateObject("java", "java.lang.System"); content = 
>> >>>> theContent; endtitle=len(theContent); startTitle = 
>> >>>> FindNoCase("", content); if (endTitle GT 0) {
>> >>>>      title = trim(Mid(content, startTitle + 7, endTitle - 
>> >>>> startTitle
>> -
>> >>>> 7));
>> >>>> }
>> >>>>
>> >>>
>> >>
>> > document.add(field.Keyword("url","
>> http://localhost:8500/cfdocs/dochome.htm")
>> >>>> );
>> >>>> </cfscript>
>> >>>>
>> >>>> However if I dump the "field" object, I would expect to see the
>> Keyword
>> >>>> method or property displayed, however this is not the case.
>> >>>>
>> >>>> If anyone can shed any light on this it would be very much
>> appreciated.
>> >>>>
>> >>>> Thanks,
>> >>>>
>> >>>> Aaron
>> >>>> --
>> >>>> View this message in context:
>> >>>>
>> >>>
>> >>
>> >
>> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-n
>> ot-foun
>> >>>> d%22-tf2750289.html#a7673372
>> >>>> Sent from the Lucene - Java Users mailing list archive at
>> Nabble.com.
>> >>>>
>> >>>>
>> >>>>
>> ---------------------------------------------------------------------
>> >>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> >>>> For additional commands, e-mail: 
>> >>>> java-user-help@lucene.apache.org
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> ---------------------------------------------------------------------
>> >>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> >>>> For additional commands, e-mail: 
>> >>>> java-user-help@lucene.apache.org
>> >>>>
>> >>>>
>> >>>>
>> >>>
>> >>> --
>> >>> View this message in context:
>> >>>
>> >>
>> >
>> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-n
>> ot-foun
>> >>> d%22-tf2750289.html#a7673534
>> >>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>> >>>
>> >>>
>> >>> -----------------------------------------------------------------
>> >>> ---- To unsubscribe, e-mail: 
>> >>> java-user-unsubscribe@lucene.apache.org
>> >>> For additional commands, e-mail: java-user-help@lucene.apache.org
>> >>>
>> >>>
>> >>>
>> >>> -----------------------------------------------------------------
>> >>> ---- To unsubscribe, e-mail: 
>> >>> java-user-unsubscribe@lucene.apache.org
>> >>> For additional commands, e-mail: java-user-help@lucene.apache.org
>> >>>
>> >>>
>> >>>
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> >
>> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-n
>> ot-foun
>> >> d%22-tf2750289.html#a7673771
>> >> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ------------------------------------------------------------------
>> >> --- To unsubscribe, e-mail: 
>> >> java-user-unsubscribe@lucene.apache.org
>> >> For additional commands, e-mail: java-user-help@lucene.apache.org
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------
>> >> --- To unsubscribe, e-mail: 
>> >> java-user-unsubscribe@lucene.apache.org
>> >> For additional commands, e-mail: java-user-help@lucene.apache.org
>> >>
>> >>
>> >>
>> >
>> > --
>> > View this message in context:
>> >
>> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-n
>> ot-foun
>> > d%22-tf2750289.html#a7674006
>> > Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>> >
>> >
>> > -------------------------------------------------------------------
>> > -- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> > For additional commands, e-mail: java-user-help@lucene.apache.org
>> >
>> >
>> >
>> > -------------------------------------------------------------------
>> > -- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> > For additional commands, e-mail: java-user-help@lucene.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-n
>> ot-found%22-tf2750289.html#a7682746
>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 

--
View this message in context: http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-found%22-tf2750289.html#a7695492
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


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


RE: Problem: "The selected method Keyword was not found"

Posted by Aaron Shaw <aa...@onetel.com>.
Hi,

thank you both for your help. Where would I find this "Contributions"?

Aaron


Risov, Maria wrote:
> 
> It's in Contributions rather than being in the core Lucene folder. 
> 
> Marie Risov 
> 
> 
> 
> -----Original Message-----
> From: Erick Erickson [mailto:erickerickson@gmail.com] 
> Sent: Monday, December 04, 2006 2:35 PM
> To: java-user@lucene.apache.org
> Subject: Re: Problem: "The selected method Keyword was not found"
> 
> It's a secret, do you have the secret code <G>???
> 
> Try SnowballAnalyzer....
> 
> Erick
> 
> On 12/4/06, Aaron Shaw <aa...@onetel.com> wrote:
>>
>>
>> thank you both for your help, got it working now
>>
>>
>> One additional thing, how do I get it to use stemming? I'm presuming I 
>> have to use one of the analyzers other than "simpleanalyzer" but I 
>> can't seem to find out which?
>>
>>
>> Samir Abdou wrote:
>> >
>> > In your classpath !
>> >
>> > -----Message d'origine-----
>> > De: Aaron Shaw [mailto:aaronshaw@onetel.com]
>> > Envoyé: lundi, 4. décembre 2006 12:02
>> > À: java-user@lucene.apache.org
>> > Objet: RE: Problem: "The selected method Keyword was not found"
>> >
>> >
>> > Is there any quick way of telling whether I'm using 1.9 or 2? I want to
>> > make
>> > sure I successfully removed the old version
>> >
>> >
>> > Samir Abdou wrote:
>> >>
>> >> If you're trying to use the 1.9 version it's OK! The 'Keyword' static
>> >> method
>> >> is not available in the 2.0 version.
>> >>
>> >> Field field = new
>> Field("url","http://localhost:8500/cfdocs/dochome.htm
>> ",
>> >>
>> >>>...is this creating a new object or calling a method of my
>> >>>existing field object?
>> >>
>> >> This is creating a new object.
>> >>
>> >> Samir
>> >>
>> >>
>> >> Samir Abdou wrote:
>> >>>
>> >>> Field field = new
>> >>> Field("url","http://localhost:8500/cfdocs/dochome.htm",
>> >>> Field.Store.YES, Field.Index.UN_TOKENIZED);
>> >>>
>> >>> You need tot translate this to cf script :-)
>> >>>
>> >>> For more information, take a look to
>> >>> http://lucene.apache.org/java/1_9_1/api/index.html
>> >>>
>> >>>
>> >>> Welcome,
>> >>> Samir
>> >>>
>> >>>
>> >>> -----Message d'origine-----
>> >>> De: Aaron Shaw [mailto:aaronshaw@onetel.com]
>> >>> Envoyé: lundi, 4. décembre 2006 11:23
>> >>> À: java-user@lucene.apache.org
>> >>> Objet: RE: Problem: "The selected method Keyword was not found"
>> >>>
>> >>>
>> >>> Hi,
>> >>>
>> >>> I've tried it in 2.0 and 1.9
>> >>>
>> >>> What syntax should I be using to add documents in the new version
>> >>> instead?
>> >>>
>> >>> Thanks,
>> >>>
>> >>> Aaron
>> >>>
>> >>>
>> >>>
>> >>> Samir Abdou wrote:
>> >>>>
>> >>>> Hi,
>> >>>>
>> >>>> The method Field.Keyword is not longer available in Lucene's last
>> >>>> version!
>> >>>>
>> >>>> Which version are you using?
>> >>>>
>> >>>> Regards,
>> >>>> Samir
>> >>>>
>> >>>> -----Message d'origine-----
>> >>>> De: Aaron Shaw [mailto:aaronshaw@onetel.com]
>> >>>> Envoyé: lundi, 4. décembre 2006 11:08
>> >>>> À: java-user@lucene.apache.org
>> >>>> Objet: Problem: "The selected method Keyword was not found"
>> >>>>
>> >>>>
>> >>>> Hi,
>> >>>>
>> >>>> I'm attempting to use Lucene under Coldfusion MX, however when I try
>> to
>> >>>> create and index I am coming up against the following error message
>> >>>> when
>> >>>> I
>> >>>> try to add a document:
>> >>>>
>> >>>> The selected method Keyword was not found.
>> >>>>
>> >>>> I'm using the following lines of code to try to create the index:
>> >>>>
>> >>>> <cfscript>
>> >>>> analyzer =
>> >>>> CreateObject("java","org.apache.lucene.analysis.StopAnalyzer");
>> >>>
>> >>>> analyzer.init();
>> >>>> writer = CreateObject("java","org.apache.lucene.index.IndexWriter");
>> >>>> writer.init("c:\cfusionmx\wwwroot\lucene\docsindex",analyzer, true);
>> >>>> document = CreateObject("java", "org.apache.lucene.document.Document
>> ");
>> >>>> field = CreateObject("java", "org.apache.lucene.document.Field");
>> >>>> system = CreateObject("java", "java.lang.System");
>> >>>> content = theContent;
>> >>>> endtitle=len(theContent);
>> >>>> startTitle = FindNoCase("", content);
>> >>>> if (endTitle GT 0) {
>> >>>>      title = trim(Mid(content, startTitle + 7, endTitle - startTitle
>> -
>> >>>> 7));
>> >>>> }
>> >>>>
>> >>>
>> >>
>> > document.add(field.Keyword("url","
>> http://localhost:8500/cfdocs/dochome.htm")
>> >>>> );
>> >>>> </cfscript>
>> >>>>
>> >>>> However if I dump the "field" object, I would expect to see the
>> Keyword
>> >>>> method or property displayed, however this is not the case.
>> >>>>
>> >>>> If anyone can shed any light on this it would be very much
>> appreciated.
>> >>>>
>> >>>> Thanks,
>> >>>>
>> >>>> Aaron
>> >>>> --
>> >>>> View this message in context:
>> >>>>
>> >>>
>> >>
>> >
>> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
>> >>>> d%22-tf2750289.html#a7673372
>> >>>> Sent from the Lucene - Java Users mailing list archive at
>> Nabble.com.
>> >>>>
>> >>>>
>> >>>>
>> ---------------------------------------------------------------------
>> >>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> >>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> ---------------------------------------------------------------------
>> >>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> >>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>> >>>>
>> >>>>
>> >>>>
>> >>>
>> >>> --
>> >>> View this message in context:
>> >>>
>> >>
>> >
>> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
>> >>> d%22-tf2750289.html#a7673534
>> >>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>> >>>
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> >>> For additional commands, e-mail: java-user-help@lucene.apache.org
>> >>>
>> >>>
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> >>> For additional commands, e-mail: java-user-help@lucene.apache.org
>> >>>
>> >>>
>> >>>
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> >
>> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
>> >> d%22-tf2750289.html#a7673771
>> >> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> >> For additional commands, e-mail: java-user-help@lucene.apache.org
>> >>
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> >> For additional commands, e-mail: java-user-help@lucene.apache.org
>> >>
>> >>
>> >>
>> >
>> > --
>> > View this message in context:
>> >
>> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
>> > d%22-tf2750289.html#a7674006
>> > Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> > For additional commands, e-mail: java-user-help@lucene.apache.org
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> > For additional commands, e-mail: java-user-help@lucene.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-found%22-tf2750289.html#a7682746
>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-found%22-tf2750289.html#a7695492
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


RE: Problem: "The selected method Keyword was not found"

Posted by "Risov, Maria" <ma...@eds.com>.
It's in Contributions rather than being in the core Lucene folder. 

Marie Risov 



-----Original Message-----
From: Erick Erickson [mailto:erickerickson@gmail.com] 
Sent: Monday, December 04, 2006 2:35 PM
To: java-user@lucene.apache.org
Subject: Re: Problem: "The selected method Keyword was not found"

It's a secret, do you have the secret code <G>???

Try SnowballAnalyzer....

Erick

On 12/4/06, Aaron Shaw <aa...@onetel.com> wrote:
>
>
> thank you both for your help, got it working now
>
>
> One additional thing, how do I get it to use stemming? I'm presuming I 
> have to use one of the analyzers other than "simpleanalyzer" but I 
> can't seem to find out which?
>
>
> Samir Abdou wrote:
> >
> > In your classpath !
> >
> > -----Message d'origine-----
> > De: Aaron Shaw [mailto:aaronshaw@onetel.com]
> > Envoyé: lundi, 4. décembre 2006 12:02
> > À: java-user@lucene.apache.org
> > Objet: RE: Problem: "The selected method Keyword was not found"
> >
> >
> > Is there any quick way of telling whether I'm using 1.9 or 2? I want to
> > make
> > sure I successfully removed the old version
> >
> >
> > Samir Abdou wrote:
> >>
> >> If you're trying to use the 1.9 version it's OK! The 'Keyword' static
> >> method
> >> is not available in the 2.0 version.
> >>
> >> Field field = new Field("url","http://localhost:8500/cfdocs/dochome.htm
> ",
> >>
> >>>...is this creating a new object or calling a method of my
> >>>existing field object?
> >>
> >> This is creating a new object.
> >>
> >> Samir
> >>
> >>
> >> Samir Abdou wrote:
> >>>
> >>> Field field = new
> >>> Field("url","http://localhost:8500/cfdocs/dochome.htm",
> >>> Field.Store.YES, Field.Index.UN_TOKENIZED);
> >>>
> >>> You need tot translate this to cf script :-)
> >>>
> >>> For more information, take a look to
> >>> http://lucene.apache.org/java/1_9_1/api/index.html
> >>>
> >>>
> >>> Welcome,
> >>> Samir
> >>>
> >>>
> >>> -----Message d'origine-----
> >>> De: Aaron Shaw [mailto:aaronshaw@onetel.com]
> >>> Envoyé: lundi, 4. décembre 2006 11:23
> >>> À: java-user@lucene.apache.org
> >>> Objet: RE: Problem: "The selected method Keyword was not found"
> >>>
> >>>
> >>> Hi,
> >>>
> >>> I've tried it in 2.0 and 1.9
> >>>
> >>> What syntax should I be using to add documents in the new version
> >>> instead?
> >>>
> >>> Thanks,
> >>>
> >>> Aaron
> >>>
> >>>
> >>>
> >>> Samir Abdou wrote:
> >>>>
> >>>> Hi,
> >>>>
> >>>> The method Field.Keyword is not longer available in Lucene's last
> >>>> version!
> >>>>
> >>>> Which version are you using?
> >>>>
> >>>> Regards,
> >>>> Samir
> >>>>
> >>>> -----Message d'origine-----
> >>>> De: Aaron Shaw [mailto:aaronshaw@onetel.com]
> >>>> Envoyé: lundi, 4. décembre 2006 11:08
> >>>> À: java-user@lucene.apache.org
> >>>> Objet: Problem: "The selected method Keyword was not found"
> >>>>
> >>>>
> >>>> Hi,
> >>>>
> >>>> I'm attempting to use Lucene under Coldfusion MX, however when I try
> to
> >>>> create and index I am coming up against the following error message
> >>>> when
> >>>> I
> >>>> try to add a document:
> >>>>
> >>>> The selected method Keyword was not found.
> >>>>
> >>>> I'm using the following lines of code to try to create the index:
> >>>>
> >>>> <cfscript>
> >>>> analyzer =
> >>>> CreateObject("java","org.apache.lucene.analysis.StopAnalyzer");
> >>>
> >>>> analyzer.init();
> >>>> writer = CreateObject("java","org.apache.lucene.index.IndexWriter");
> >>>> writer.init("c:\cfusionmx\wwwroot\lucene\docsindex",analyzer, true);
> >>>> document = CreateObject("java", "org.apache.lucene.document.Document
> ");
> >>>> field = CreateObject("java", "org.apache.lucene.document.Field");
> >>>> system = CreateObject("java", "java.lang.System");
> >>>> content = theContent;
> >>>> endtitle=len(theContent);
> >>>> startTitle = FindNoCase("", content);
> >>>> if (endTitle GT 0) {
> >>>>      title = trim(Mid(content, startTitle + 7, endTitle - startTitle
> -
> >>>> 7));
> >>>> }
> >>>>
> >>>
> >>
> > document.add(field.Keyword("url","
> http://localhost:8500/cfdocs/dochome.htm")
> >>>> );
> >>>> </cfscript>
> >>>>
> >>>> However if I dump the "field" object, I would expect to see the
> Keyword
> >>>> method or property displayed, however this is not the case.
> >>>>
> >>>> If anyone can shed any light on this it would be very much
> appreciated.
> >>>>
> >>>> Thanks,
> >>>>
> >>>> Aaron
> >>>> --
> >>>> View this message in context:
> >>>>
> >>>
> >>
> >
> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
> >>>> d%22-tf2750289.html#a7673372
> >>>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> >>>> For additional commands, e-mail: java-user-help@lucene.apache.org
> >>>>
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> >>>> For additional commands, e-mail: java-user-help@lucene.apache.org
> >>>>
> >>>>
> >>>>
> >>>
> >>> --
> >>> View this message in context:
> >>>
> >>
> >
> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
> >>> d%22-tf2750289.html#a7673534
> >>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> >>> For additional commands, e-mail: java-user-help@lucene.apache.org
> >>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> >>> For additional commands, e-mail: java-user-help@lucene.apache.org
> >>>
> >>>
> >>>
> >>
> >> --
> >> View this message in context:
> >>
> >
> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
> >> d%22-tf2750289.html#a7673771
> >> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> >> For additional commands, e-mail: java-user-help@lucene.apache.org
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> >> For additional commands, e-mail: java-user-help@lucene.apache.org
> >>
> >>
> >>
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
> > d%22-tf2750289.html#a7674006
> > Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-found%22-tf2750289.html#a7682746
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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


Re: Problem: "The selected method Keyword was not found"

Posted by Erick Erickson <er...@gmail.com>.
It's a secret, do you have the secret code <G>???

Try SnowballAnalyzer....

Erick

On 12/4/06, Aaron Shaw <aa...@onetel.com> wrote:
>
>
> thank you both for your help, got it working now
>
>
> One additional thing, how do I get it to use stemming? I'm presuming I
> have
> to use one of the analyzers other than "simpleanalyzer" but I can't seem
> to
> find out which?
>
>
> Samir Abdou wrote:
> >
> > In your classpath !
> >
> > -----Message d'origine-----
> > De: Aaron Shaw [mailto:aaronshaw@onetel.com]
> > Envoyé: lundi, 4. décembre 2006 12:02
> > À: java-user@lucene.apache.org
> > Objet: RE: Problem: "The selected method Keyword was not found"
> >
> >
> > Is there any quick way of telling whether I'm using 1.9 or 2? I want to
> > make
> > sure I successfully removed the old version
> >
> >
> > Samir Abdou wrote:
> >>
> >> If you're trying to use the 1.9 version it's OK! The 'Keyword' static
> >> method
> >> is not available in the 2.0 version.
> >>
> >> Field field = new Field("url","http://localhost:8500/cfdocs/dochome.htm
> ",
> >>
> >>>...is this creating a new object or calling a method of my
> >>>existing field object?
> >>
> >> This is creating a new object.
> >>
> >> Samir
> >>
> >>
> >> Samir Abdou wrote:
> >>>
> >>> Field field = new
> >>> Field("url","http://localhost:8500/cfdocs/dochome.htm",
> >>> Field.Store.YES, Field.Index.UN_TOKENIZED);
> >>>
> >>> You need tot translate this to cf script :-)
> >>>
> >>> For more information, take a look to
> >>> http://lucene.apache.org/java/1_9_1/api/index.html
> >>>
> >>>
> >>> Welcome,
> >>> Samir
> >>>
> >>>
> >>> -----Message d'origine-----
> >>> De: Aaron Shaw [mailto:aaronshaw@onetel.com]
> >>> Envoyé: lundi, 4. décembre 2006 11:23
> >>> À: java-user@lucene.apache.org
> >>> Objet: RE: Problem: "The selected method Keyword was not found"
> >>>
> >>>
> >>> Hi,
> >>>
> >>> I've tried it in 2.0 and 1.9
> >>>
> >>> What syntax should I be using to add documents in the new version
> >>> instead?
> >>>
> >>> Thanks,
> >>>
> >>> Aaron
> >>>
> >>>
> >>>
> >>> Samir Abdou wrote:
> >>>>
> >>>> Hi,
> >>>>
> >>>> The method Field.Keyword is not longer available in Lucene's last
> >>>> version!
> >>>>
> >>>> Which version are you using?
> >>>>
> >>>> Regards,
> >>>> Samir
> >>>>
> >>>> -----Message d'origine-----
> >>>> De: Aaron Shaw [mailto:aaronshaw@onetel.com]
> >>>> Envoyé: lundi, 4. décembre 2006 11:08
> >>>> À: java-user@lucene.apache.org
> >>>> Objet: Problem: "The selected method Keyword was not found"
> >>>>
> >>>>
> >>>> Hi,
> >>>>
> >>>> I'm attempting to use Lucene under Coldfusion MX, however when I try
> to
> >>>> create and index I am coming up against the following error message
> >>>> when
> >>>> I
> >>>> try to add a document:
> >>>>
> >>>> The selected method Keyword was not found.
> >>>>
> >>>> I'm using the following lines of code to try to create the index:
> >>>>
> >>>> <cfscript>
> >>>> analyzer =
> >>>> CreateObject("java","org.apache.lucene.analysis.StopAnalyzer");
> >>>
> >>>> analyzer.init();
> >>>> writer = CreateObject("java","org.apache.lucene.index.IndexWriter");
> >>>> writer.init("c:\cfusionmx\wwwroot\lucene\docsindex",analyzer, true);
> >>>> document = CreateObject("java", "org.apache.lucene.document.Document
> ");
> >>>> field = CreateObject("java", "org.apache.lucene.document.Field");
> >>>> system = CreateObject("java", "java.lang.System");
> >>>> content = theContent;
> >>>> endtitle=len(theContent);
> >>>> startTitle = FindNoCase("", content);
> >>>> if (endTitle GT 0) {
> >>>>      title = trim(Mid(content, startTitle + 7, endTitle - startTitle
> -
> >>>> 7));
> >>>> }
> >>>>
> >>>
> >>
> > document.add(field.Keyword("url","
> http://localhost:8500/cfdocs/dochome.htm")
> >>>> );
> >>>> </cfscript>
> >>>>
> >>>> However if I dump the "field" object, I would expect to see the
> Keyword
> >>>> method or property displayed, however this is not the case.
> >>>>
> >>>> If anyone can shed any light on this it would be very much
> appreciated.
> >>>>
> >>>> Thanks,
> >>>>
> >>>> Aaron
> >>>> --
> >>>> View this message in context:
> >>>>
> >>>
> >>
> >
> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
> >>>> d%22-tf2750289.html#a7673372
> >>>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> >>>> For additional commands, e-mail: java-user-help@lucene.apache.org
> >>>>
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> >>>> For additional commands, e-mail: java-user-help@lucene.apache.org
> >>>>
> >>>>
> >>>>
> >>>
> >>> --
> >>> View this message in context:
> >>>
> >>
> >
> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
> >>> d%22-tf2750289.html#a7673534
> >>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> >>> For additional commands, e-mail: java-user-help@lucene.apache.org
> >>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> >>> For additional commands, e-mail: java-user-help@lucene.apache.org
> >>>
> >>>
> >>>
> >>
> >> --
> >> View this message in context:
> >>
> >
> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
> >> d%22-tf2750289.html#a7673771
> >> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> >> For additional commands, e-mail: java-user-help@lucene.apache.org
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> >> For additional commands, e-mail: java-user-help@lucene.apache.org
> >>
> >>
> >>
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
> > d%22-tf2750289.html#a7674006
> > Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-found%22-tf2750289.html#a7682746
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

RE: Problem: "The selected method Keyword was not found"

Posted by Aaron Shaw <aa...@onetel.com>.
thank you both for your help, got it working now


One additional thing, how do I get it to use stemming? I'm presuming I have
to use one of the analyzers other than "simpleanalyzer" but I can't seem to
find out which?


Samir Abdou wrote:
> 
> In your classpath !
> 
> -----Message d'origine-----
> De : Aaron Shaw [mailto:aaronshaw@onetel.com] 
> Envoyé : lundi, 4. décembre 2006 12:02
> À : java-user@lucene.apache.org
> Objet : RE: Problem: "The selected method Keyword was not found"
> 
> 
> Is there any quick way of telling whether I'm using 1.9 or 2? I want to
> make
> sure I successfully removed the old version
> 
> 
> Samir Abdou wrote:
>> 
>> If you're trying to use the 1.9 version it's OK! The 'Keyword' static
>> method
>> is not available in the 2.0 version. 
>> 
>> Field field = new Field("url","http://localhost:8500/cfdocs/dochome.htm", 
>> 
>>>...is this creating a new object or calling a method of my
>>>existing field object?
>> 
>> This is creating a new object.
>> 
>> Samir
>> 
>> 
>> Samir Abdou wrote:
>>> 
>>> Field field = new
>>> Field("url","http://localhost:8500/cfdocs/dochome.htm",
>>> Field.Store.YES, Field.Index.UN_TOKENIZED);
>>> 
>>> You need tot translate this to cf script :-)
>>> 
>>> For more information, take a look to
>>> http://lucene.apache.org/java/1_9_1/api/index.html 
>>> 
>>> 
>>> Welcome,
>>> Samir
>>> 
>>> 
>>> -----Message d'origine-----
>>> De : Aaron Shaw [mailto:aaronshaw@onetel.com] 
>>> Envoyé : lundi, 4. décembre 2006 11:23
>>> À : java-user@lucene.apache.org
>>> Objet : RE: Problem: "The selected method Keyword was not found"
>>> 
>>> 
>>> Hi, 
>>> 
>>> I've tried it in 2.0 and 1.9
>>> 
>>> What syntax should I be using to add documents in the new version
>>> instead?
>>> 
>>> Thanks,
>>> 
>>> Aaron
>>> 
>>> 
>>> 
>>> Samir Abdou wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> The method Field.Keyword is not longer available in Lucene's last
>>>> version!
>>>> 
>>>> Which version are you using?
>>>> 
>>>> Regards,
>>>> Samir
>>>> 
>>>> -----Message d'origine-----
>>>> De : Aaron Shaw [mailto:aaronshaw@onetel.com] 
>>>> Envoyé : lundi, 4. décembre 2006 11:08
>>>> À : java-user@lucene.apache.org
>>>> Objet : Problem: "The selected method Keyword was not found"
>>>> 
>>>> 
>>>> Hi,
>>>> 
>>>> I'm attempting to use Lucene under Coldfusion MX, however when I try to
>>>> create and index I am coming up against the following error message
>>>> when
>>>> I
>>>> try to add a document:
>>>> 
>>>> The selected method Keyword was not found.
>>>> 
>>>> I'm using the following lines of code to try to create the index:
>>>> 
>>>> <cfscript>
>>>> analyzer =
>>>> CreateObject("java","org.apache.lucene.analysis.StopAnalyzer");
>>> 
>>>> analyzer.init();
>>>> writer = CreateObject("java","org.apache.lucene.index.IndexWriter");
>>>> writer.init("c:\cfusionmx\wwwroot\lucene\docsindex",analyzer, true); 
>>>> document = CreateObject("java", "org.apache.lucene.document.Document");
>>>> field = CreateObject("java", "org.apache.lucene.document.Field");
>>>> system = CreateObject("java", "java.lang.System"); 
>>>> content = theContent; 
>>>> endtitle=len(theContent);
>>>> startTitle = FindNoCase("", content);
>>>> if (endTitle GT 0) {
>>>>      title = trim(Mid(content, startTitle + 7, endTitle - startTitle -
>>>> 7));
>>>> } 
>>>>
>>>
>>
> document.add(field.Keyword("url","http://localhost:8500/cfdocs/dochome.htm")
>>>> );
>>>> </cfscript>
>>>> 
>>>> However if I dump the "field" object, I would expect to see the Keyword
>>>> method or property displayed, however this is not the case.
>>>> 
>>>> If anyone can shed any light on this it would be very much appreciated.
>>>> 
>>>> Thanks,
>>>> 
>>>> Aaron
>>>> -- 
>>>> View this message in context:
>>>>
>>>
>>
> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
>>>> d%22-tf2750289.html#a7673372
>>>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>> 
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>> 
>>>> 
>>>> 
>>> 
>>> -- 
>>> View this message in context:
>>>
>>
> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
>>> d%22-tf2750289.html#a7673534
>>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>> 
>>> 
>>> 
>> 
>> -- 
>> View this message in context:
>>
> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
>> d%22-tf2750289.html#a7673771
>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
> d%22-tf2750289.html#a7674006
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-found%22-tf2750289.html#a7682746
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


RE: Problem: "The selected method Keyword was not found"

Posted by Samir Abdou <Sa...@unine.ch>.
In your classpath !

-----Message d'origine-----
De : Aaron Shaw [mailto:aaronshaw@onetel.com] 
Envoyé : lundi, 4. décembre 2006 12:02
À : java-user@lucene.apache.org
Objet : RE: Problem: "The selected method Keyword was not found"


Is there any quick way of telling whether I'm using 1.9 or 2? I want to make
sure I successfully removed the old version


Samir Abdou wrote:
> 
> If you're trying to use the 1.9 version it's OK! The 'Keyword' static
> method
> is not available in the 2.0 version. 
> 
> Field field = new Field("url","http://localhost:8500/cfdocs/dochome.htm", 
> 
>>...is this creating a new object or calling a method of my
>>existing field object?
> 
> This is creating a new object.
> 
> Samir
> 
> 
> Samir Abdou wrote:
>> 
>> Field field = new Field("url","http://localhost:8500/cfdocs/dochome.htm",
>> Field.Store.YES, Field.Index.UN_TOKENIZED);
>> 
>> You need tot translate this to cf script :-)
>> 
>> For more information, take a look to
>> http://lucene.apache.org/java/1_9_1/api/index.html 
>> 
>> 
>> Welcome,
>> Samir
>> 
>> 
>> -----Message d'origine-----
>> De : Aaron Shaw [mailto:aaronshaw@onetel.com] 
>> Envoyé : lundi, 4. décembre 2006 11:23
>> À : java-user@lucene.apache.org
>> Objet : RE: Problem: "The selected method Keyword was not found"
>> 
>> 
>> Hi, 
>> 
>> I've tried it in 2.0 and 1.9
>> 
>> What syntax should I be using to add documents in the new version
>> instead?
>> 
>> Thanks,
>> 
>> Aaron
>> 
>> 
>> 
>> Samir Abdou wrote:
>>> 
>>> Hi,
>>> 
>>> The method Field.Keyword is not longer available in Lucene's last
>>> version!
>>> 
>>> Which version are you using?
>>> 
>>> Regards,
>>> Samir
>>> 
>>> -----Message d'origine-----
>>> De : Aaron Shaw [mailto:aaronshaw@onetel.com] 
>>> Envoyé : lundi, 4. décembre 2006 11:08
>>> À : java-user@lucene.apache.org
>>> Objet : Problem: "The selected method Keyword was not found"
>>> 
>>> 
>>> Hi,
>>> 
>>> I'm attempting to use Lucene under Coldfusion MX, however when I try to
>>> create and index I am coming up against the following error message when
>>> I
>>> try to add a document:
>>> 
>>> The selected method Keyword was not found.
>>> 
>>> I'm using the following lines of code to try to create the index:
>>> 
>>> <cfscript>
>>> analyzer =
>>> CreateObject("java","org.apache.lucene.analysis.StopAnalyzer");
>> 
>>> analyzer.init();
>>> writer = CreateObject("java","org.apache.lucene.index.IndexWriter");
>>> writer.init("c:\cfusionmx\wwwroot\lucene\docsindex",analyzer, true); 
>>> document = CreateObject("java", "org.apache.lucene.document.Document");
>>> field = CreateObject("java", "org.apache.lucene.document.Field");
>>> system = CreateObject("java", "java.lang.System"); 
>>> content = theContent; 
>>> endtitle=len(theContent);
>>> startTitle = FindNoCase("", content);
>>> if (endTitle GT 0) {
>>>      title = trim(Mid(content, startTitle + 7, endTitle - startTitle -
>>> 7));
>>> } 
>>>
>>
>
document.add(field.Keyword("url","http://localhost:8500/cfdocs/dochome.htm")
>>> );
>>> </cfscript>
>>> 
>>> However if I dump the "field" object, I would expect to see the Keyword
>>> method or property displayed, however this is not the case.
>>> 
>>> If anyone can shed any light on this it would be very much appreciated.
>>> 
>>> Thanks,
>>> 
>>> Aaron
>>> -- 
>>> View this message in context:
>>>
>>
>
http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
>>> d%22-tf2750289.html#a7673372
>>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>> 
>>> 
>>> 
>> 
>> -- 
>> View this message in context:
>>
>
http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
>> d%22-tf2750289.html#a7673534
>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>> 
>> 
>> 
> 
> -- 
> View this message in context:
>
http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
> d%22-tf2750289.html#a7673771
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
d%22-tf2750289.html#a7674006
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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



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


RE: Problem: "The selected method Keyword was not found"

Posted by Aaron Shaw <aa...@onetel.com>.
Is there any quick way of telling whether I'm using 1.9 or 2? I want to make
sure I successfully removed the old version


Samir Abdou wrote:
> 
> If you're trying to use the 1.9 version it's OK! The 'Keyword' static
> method
> is not available in the 2.0 version. 
> 
> Field field = new Field("url","http://localhost:8500/cfdocs/dochome.htm", 
> 
>>...is this creating a new object or calling a method of my
>>existing field object?
> 
> This is creating a new object.
> 
> Samir
> 
> 
> Samir Abdou wrote:
>> 
>> Field field = new Field("url","http://localhost:8500/cfdocs/dochome.htm",
>> Field.Store.YES, Field.Index.UN_TOKENIZED);
>> 
>> You need tot translate this to cf script :-)
>> 
>> For more information, take a look to
>> http://lucene.apache.org/java/1_9_1/api/index.html 
>> 
>> 
>> Welcome,
>> Samir
>> 
>> 
>> -----Message d'origine-----
>> De : Aaron Shaw [mailto:aaronshaw@onetel.com] 
>> Envoyé : lundi, 4. décembre 2006 11:23
>> À : java-user@lucene.apache.org
>> Objet : RE: Problem: "The selected method Keyword was not found"
>> 
>> 
>> Hi, 
>> 
>> I've tried it in 2.0 and 1.9
>> 
>> What syntax should I be using to add documents in the new version
>> instead?
>> 
>> Thanks,
>> 
>> Aaron
>> 
>> 
>> 
>> Samir Abdou wrote:
>>> 
>>> Hi,
>>> 
>>> The method Field.Keyword is not longer available in Lucene's last
>>> version!
>>> 
>>> Which version are you using?
>>> 
>>> Regards,
>>> Samir
>>> 
>>> -----Message d'origine-----
>>> De : Aaron Shaw [mailto:aaronshaw@onetel.com] 
>>> Envoyé : lundi, 4. décembre 2006 11:08
>>> À : java-user@lucene.apache.org
>>> Objet : Problem: "The selected method Keyword was not found"
>>> 
>>> 
>>> Hi,
>>> 
>>> I'm attempting to use Lucene under Coldfusion MX, however when I try to
>>> create and index I am coming up against the following error message when
>>> I
>>> try to add a document:
>>> 
>>> The selected method Keyword was not found.
>>> 
>>> I'm using the following lines of code to try to create the index:
>>> 
>>> <cfscript>
>>> analyzer =
>>> CreateObject("java","org.apache.lucene.analysis.StopAnalyzer");
>> 
>>> analyzer.init();
>>> writer = CreateObject("java","org.apache.lucene.index.IndexWriter");
>>> writer.init("c:\cfusionmx\wwwroot\lucene\docsindex",analyzer, true); 
>>> document = CreateObject("java", "org.apache.lucene.document.Document");
>>> field = CreateObject("java", "org.apache.lucene.document.Field");
>>> system = CreateObject("java", "java.lang.System"); 
>>> content = theContent; 
>>> endtitle=len(theContent);
>>> startTitle = FindNoCase("", content);
>>> if (endTitle GT 0) {
>>>      title = trim(Mid(content, startTitle + 7, endTitle - startTitle -
>>> 7));
>>> } 
>>>
>>
> document.add(field.Keyword("url","http://localhost:8500/cfdocs/dochome.htm")
>>> );
>>> </cfscript>
>>> 
>>> However if I dump the "field" object, I would expect to see the Keyword
>>> method or property displayed, however this is not the case.
>>> 
>>> If anyone can shed any light on this it would be very much appreciated.
>>> 
>>> Thanks,
>>> 
>>> Aaron
>>> -- 
>>> View this message in context:
>>>
>>
> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
>>> d%22-tf2750289.html#a7673372
>>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>> 
>>> 
>>> 
>> 
>> -- 
>> View this message in context:
>>
> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
>> d%22-tf2750289.html#a7673534
>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
> d%22-tf2750289.html#a7673771
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-found%22-tf2750289.html#a7674006
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


RE: Problem: "The selected method Keyword was not found"

Posted by Samir Abdou <Sa...@unine.ch>.
If you're trying to use the 1.9 version it's OK! The 'Keyword' static method
is not available in the 2.0 version. 

Field field = new Field("url","http://localhost:8500/cfdocs/dochome.htm", 

>...is this creating a new object or calling a method of my
>existing field object?

This is creating a new object.

Samir


Samir Abdou wrote:
> 
> Field field = new Field("url","http://localhost:8500/cfdocs/dochome.htm",
> Field.Store.YES, Field.Index.UN_TOKENIZED);
> 
> You need tot translate this to cf script :-)
> 
> For more information, take a look to
> http://lucene.apache.org/java/1_9_1/api/index.html 
> 
> 
> Welcome,
> Samir
> 
> 
> -----Message d'origine-----
> De : Aaron Shaw [mailto:aaronshaw@onetel.com] 
> Envoyé : lundi, 4. décembre 2006 11:23
> À : java-user@lucene.apache.org
> Objet : RE: Problem: "The selected method Keyword was not found"
> 
> 
> Hi, 
> 
> I've tried it in 2.0 and 1.9
> 
> What syntax should I be using to add documents in the new version instead?
> 
> Thanks,
> 
> Aaron
> 
> 
> 
> Samir Abdou wrote:
>> 
>> Hi,
>> 
>> The method Field.Keyword is not longer available in Lucene's last
>> version!
>> 
>> Which version are you using?
>> 
>> Regards,
>> Samir
>> 
>> -----Message d'origine-----
>> De : Aaron Shaw [mailto:aaronshaw@onetel.com] 
>> Envoyé : lundi, 4. décembre 2006 11:08
>> À : java-user@lucene.apache.org
>> Objet : Problem: "The selected method Keyword was not found"
>> 
>> 
>> Hi,
>> 
>> I'm attempting to use Lucene under Coldfusion MX, however when I try to
>> create and index I am coming up against the following error message when
>> I
>> try to add a document:
>> 
>> The selected method Keyword was not found.
>> 
>> I'm using the following lines of code to try to create the index:
>> 
>> <cfscript>
>> analyzer =
>> CreateObject("java","org.apache.lucene.analysis.StopAnalyzer");
> 
>> analyzer.init();
>> writer = CreateObject("java","org.apache.lucene.index.IndexWriter");
>> writer.init("c:\cfusionmx\wwwroot\lucene\docsindex",analyzer, true); 
>> document = CreateObject("java", "org.apache.lucene.document.Document");
>> field = CreateObject("java", "org.apache.lucene.document.Field");
>> system = CreateObject("java", "java.lang.System"); 
>> content = theContent; 
>> endtitle=len(theContent);
>> startTitle = FindNoCase("", content);
>> if (endTitle GT 0) {
>>      title = trim(Mid(content, startTitle + 7, endTitle - startTitle -
>> 7));
>> } 
>>
>
document.add(field.Keyword("url","http://localhost:8500/cfdocs/dochome.htm")
>> );
>> </cfscript>
>> 
>> However if I dump the "field" object, I would expect to see the Keyword
>> method or property displayed, however this is not the case.
>> 
>> If anyone can shed any light on this it would be very much appreciated.
>> 
>> Thanks,
>> 
>> Aaron
>> -- 
>> View this message in context:
>>
>
http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
>> d%22-tf2750289.html#a7673372
>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>> 
>> 
>> 
> 
> -- 
> View this message in context:
>
http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
> d%22-tf2750289.html#a7673534
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
d%22-tf2750289.html#a7673771
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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



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


RE: Problem: "The selected method Keyword was not found"

Posted by Aaron Shaw <aa...@onetel.com>.
Hi,

thanks for your help. Still having a problem after looking at that
documentation though, it still seems to have Field.Keyword etc shown in the
API?

I've tried turning that into cf script  however I'm not quite sure whether
I'm doing it correctly

I'm creating a new field object like so:

field = CreateObject("java", "org.apache.lucene.document.Field");

I'm assuming the next line needs to be the equivalent of this:

Field field = new Field("url","http://localhost:8500/cfdocs/dochome.htm", 

however I'm not sure what this is meant to do so I don't really know how to
translate it...is this creating a new object or calling a method of my
existing field object?

Thanks

Aaron



Samir Abdou wrote:
> 
> Field field = new Field("url","http://localhost:8500/cfdocs/dochome.htm",
> Field.Store.YES, Field.Index.UN_TOKENIZED);
> 
> You need tot translate this to cf script :-)
> 
> For more information, take a look to
> http://lucene.apache.org/java/1_9_1/api/index.html 
> 
> 
> Welcome,
> Samir
> 
> 
> -----Message d'origine-----
> De : Aaron Shaw [mailto:aaronshaw@onetel.com] 
> Envoyé : lundi, 4. décembre 2006 11:23
> À : java-user@lucene.apache.org
> Objet : RE: Problem: "The selected method Keyword was not found"
> 
> 
> Hi, 
> 
> I've tried it in 2.0 and 1.9
> 
> What syntax should I be using to add documents in the new version instead?
> 
> Thanks,
> 
> Aaron
> 
> 
> 
> Samir Abdou wrote:
>> 
>> Hi,
>> 
>> The method Field.Keyword is not longer available in Lucene's last
>> version!
>> 
>> Which version are you using?
>> 
>> Regards,
>> Samir
>> 
>> -----Message d'origine-----
>> De : Aaron Shaw [mailto:aaronshaw@onetel.com] 
>> Envoyé : lundi, 4. décembre 2006 11:08
>> À : java-user@lucene.apache.org
>> Objet : Problem: "The selected method Keyword was not found"
>> 
>> 
>> Hi,
>> 
>> I'm attempting to use Lucene under Coldfusion MX, however when I try to
>> create and index I am coming up against the following error message when
>> I
>> try to add a document:
>> 
>> The selected method Keyword was not found.
>> 
>> I'm using the following lines of code to try to create the index:
>> 
>> <cfscript>
>> analyzer =
>> CreateObject("java","org.apache.lucene.analysis.StopAnalyzer");
> 
>> analyzer.init();
>> writer = CreateObject("java","org.apache.lucene.index.IndexWriter");
>> writer.init("c:\cfusionmx\wwwroot\lucene\docsindex",analyzer, true); 
>> document = CreateObject("java", "org.apache.lucene.document.Document");
>> field = CreateObject("java", "org.apache.lucene.document.Field");
>> system = CreateObject("java", "java.lang.System"); 
>> content = theContent; 
>> endtitle=len(theContent);
>> startTitle = FindNoCase("", content);
>> if (endTitle GT 0) {
>>      title = trim(Mid(content, startTitle + 7, endTitle - startTitle -
>> 7));
>> } 
>>
> document.add(field.Keyword("url","http://localhost:8500/cfdocs/dochome.htm")
>> );
>> </cfscript>
>> 
>> However if I dump the "field" object, I would expect to see the Keyword
>> method or property displayed, however this is not the case.
>> 
>> If anyone can shed any light on this it would be very much appreciated.
>> 
>> Thanks,
>> 
>> Aaron
>> -- 
>> View this message in context:
>>
> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
>> d%22-tf2750289.html#a7673372
>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
> d%22-tf2750289.html#a7673534
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-found%22-tf2750289.html#a7673771
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


RE: Problem: "The selected method Keyword was not found"

Posted by Samir Abdou <Sa...@unine.ch>.
Field field = new Field("url","http://localhost:8500/cfdocs/dochome.htm",
Field.Store.YES, Field.Index.UN_TOKENIZED);

You need tot translate this to cf script :-)

For more information, take a look to
http://lucene.apache.org/java/1_9_1/api/index.html 


Welcome,
Samir


-----Message d'origine-----
De : Aaron Shaw [mailto:aaronshaw@onetel.com] 
Envoyé : lundi, 4. décembre 2006 11:23
À : java-user@lucene.apache.org
Objet : RE: Problem: "The selected method Keyword was not found"


Hi, 

I've tried it in 2.0 and 1.9

What syntax should I be using to add documents in the new version instead?

Thanks,

Aaron



Samir Abdou wrote:
> 
> Hi,
> 
> The method Field.Keyword is not longer available in Lucene's last version!
> 
> Which version are you using?
> 
> Regards,
> Samir
> 
> -----Message d'origine-----
> De : Aaron Shaw [mailto:aaronshaw@onetel.com] 
> Envoyé : lundi, 4. décembre 2006 11:08
> À : java-user@lucene.apache.org
> Objet : Problem: "The selected method Keyword was not found"
> 
> 
> Hi,
> 
> I'm attempting to use Lucene under Coldfusion MX, however when I try to
> create and index I am coming up against the following error message when I
> try to add a document:
> 
> The selected method Keyword was not found.
> 
> I'm using the following lines of code to try to create the index:
> 
> <cfscript>
> analyzer = CreateObject("java","org.apache.lucene.analysis.StopAnalyzer");

> analyzer.init();
> writer = CreateObject("java","org.apache.lucene.index.IndexWriter");
> writer.init("c:\cfusionmx\wwwroot\lucene\docsindex",analyzer, true); 
> document = CreateObject("java", "org.apache.lucene.document.Document");
> field = CreateObject("java", "org.apache.lucene.document.Field");
> system = CreateObject("java", "java.lang.System"); 
> content = theContent; 
> endtitle=len(theContent);
> startTitle = FindNoCase("", content);
> if (endTitle GT 0) {
>      title = trim(Mid(content, startTitle + 7, endTitle - startTitle -
> 7));
> } 
>
document.add(field.Keyword("url","http://localhost:8500/cfdocs/dochome.htm")
> );
> </cfscript>
> 
> However if I dump the "field" object, I would expect to see the Keyword
> method or property displayed, however this is not the case.
> 
> If anyone can shed any light on this it would be very much appreciated.
> 
> Thanks,
> 
> Aaron
> -- 
> View this message in context:
>
http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
> d%22-tf2750289.html#a7673372
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
d%22-tf2750289.html#a7673534
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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



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


RE: Problem: "The selected method Keyword was not found"

Posted by Aaron Shaw <aa...@onetel.com>.
Hi, 

I've tried it in 2.0 and 1.9

What syntax should I be using to add documents in the new version instead?

Thanks,

Aaron



Samir Abdou wrote:
> 
> Hi,
> 
> The method Field.Keyword is not longer available in Lucene's last version!
> 
> Which version are you using?
> 
> Regards,
> Samir
> 
> -----Message d'origine-----
> De : Aaron Shaw [mailto:aaronshaw@onetel.com] 
> Envoyé : lundi, 4. décembre 2006 11:08
> À : java-user@lucene.apache.org
> Objet : Problem: "The selected method Keyword was not found"
> 
> 
> Hi,
> 
> I'm attempting to use Lucene under Coldfusion MX, however when I try to
> create and index I am coming up against the following error message when I
> try to add a document:
> 
> The selected method Keyword was not found.
> 
> I'm using the following lines of code to try to create the index:
> 
> <cfscript>
> analyzer = CreateObject("java","org.apache.lucene.analysis.StopAnalyzer"); 
> analyzer.init();
> writer = CreateObject("java","org.apache.lucene.index.IndexWriter");
> writer.init("c:\cfusionmx\wwwroot\lucene\docsindex",analyzer, true); 
> document = CreateObject("java", "org.apache.lucene.document.Document");
> field = CreateObject("java", "org.apache.lucene.document.Field");
> system = CreateObject("java", "java.lang.System"); 
> content = theContent; 
> endtitle=len(theContent);
> startTitle = FindNoCase("", content);
> if (endTitle GT 0) {
>      title = trim(Mid(content, startTitle + 7, endTitle - startTitle -
> 7));
> } 
> document.add(field.Keyword("url","http://localhost:8500/cfdocs/dochome.htm")
> );
> </cfscript>
> 
> However if I dump the "field" object, I would expect to see the Keyword
> method or property displayed, however this is not the case.
> 
> If anyone can shed any light on this it would be very much appreciated.
> 
> Thanks,
> 
> Aaron
> -- 
> View this message in context:
> http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
> d%22-tf2750289.html#a7673372
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-found%22-tf2750289.html#a7673534
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


RE: Problem: "The selected method Keyword was not found"

Posted by Samir Abdou <Sa...@unine.ch>.
Hi,

The method Field.Keyword is not longer available in Lucene's last version!

Which version are you using?

Regards,
Samir

-----Message d'origine-----
De : Aaron Shaw [mailto:aaronshaw@onetel.com] 
Envoyé : lundi, 4. décembre 2006 11:08
À : java-user@lucene.apache.org
Objet : Problem: "The selected method Keyword was not found"


Hi,

I'm attempting to use Lucene under Coldfusion MX, however when I try to
create and index I am coming up against the following error message when I
try to add a document:

The selected method Keyword was not found.

I'm using the following lines of code to try to create the index:

<cfscript>
analyzer = CreateObject("java","org.apache.lucene.analysis.StopAnalyzer"); 
analyzer.init();
writer = CreateObject("java","org.apache.lucene.index.IndexWriter");
writer.init("c:\cfusionmx\wwwroot\lucene\docsindex",analyzer, true); 
document = CreateObject("java", "org.apache.lucene.document.Document");
field = CreateObject("java", "org.apache.lucene.document.Field");
system = CreateObject("java", "java.lang.System"); 
content = theContent; 
endtitle=len(theContent);
startTitle = FindNoCase("", content);
if (endTitle GT 0) {
     title = trim(Mid(content, startTitle + 7, endTitle - startTitle - 7));
} 
document.add(field.Keyword("url","http://localhost:8500/cfdocs/dochome.htm")
);
</cfscript>

However if I dump the "field" object, I would expect to see the Keyword
method or property displayed, however this is not the case.

If anyone can shed any light on this it would be very much appreciated.

Thanks,

Aaron
-- 
View this message in context:
http://www.nabble.com/Problem%3A-%22The-selected-method-Keyword-was-not-foun
d%22-tf2750289.html#a7673372
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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



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