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 "Bryan Lewis [DAS]" <br...@dasmail.co.uk> on 2010/01/21 15:19:16 UTC

No Matching constructor

Hi,

 

I'm trying to create a Lucene index via Railo and am getting the above
error.

 

My code is as follows (and was working fine in a JSP page but doesn't seem
to want to play under Railo, using same version of Lucene 2.3.2 ):

 

<code above this to query database into qData,  create StandardAnalyzer,
IndexWriter  - all working fine>

.

.

.

<cfset vField=CreateObject("java","org.apache.lucene.document.Field")>

 

<cfloop query="qData">

                <!--- create the document   [works OK] --- >

                <cfset
vDoc=CreateObject("java","org.apache.lucene.document.Document")>

 

                <!--- add fields to document [fails with 'No matching
constructor' no matter what I use] --- >

                <cfset vDoc.add(vField.Text("id", qData.id)>

 

.

.

.

 

Where qData is a database query returning the id column from a database
table (it is returning other columns too but as it won't even insert one
field I haven't shown the others in the code above).

 

I have also tried 

<cfset vDoc.add(vField.Text("id", "test">

<cfset vDoc.add(vField.Text("id", qData.id, vField.Store.YES,
vField.Index.NO)>  [this is the one that works in my JSP but it doesn't work
here...]

 

 

 

Has anyone else come across this problem?

 

Any ideas?

 

Cheers

Bryan.

 

 

 


RE: No Matching constructor

Posted by "Bryan Lewis [DAS]" <br...@dasmail.co.uk>.
Seems that CFML handles things a bit differently...

See this thread for a solution taht worked for me:
http://groups.google.com/group/railo/browse_thread/thread/b52954bfe2aa85ea#


Case closed :0)

Bryan.



-----Original Message-----
From: Bryan Lewis [DAS] [mailto:bryan.lewis@dasmail.co.uk] 
Sent: 21 January 2010 14:28
To: java-user@lucene.apache.org
Subject: RE: No Matching constructor

The typos (missing ')' at the end of some statements are not in the original
code).


-----Original Message-----
From: Bryan Lewis [DAS] [mailto:bryan.lewis@dasmail.co.uk] 
Sent: 21 January 2010 14:19
To: java-user@lucene.apache.org
Subject: No Matching constructor

Hi,

 

I'm trying to create a Lucene index via Railo and am getting the above
error.

 

My code is as follows (and was working fine in a JSP page but doesn't seem
to want to play under Railo, using same version of Lucene 2.3.2 ):

 

<code above this to query database into qData,  create StandardAnalyzer,
IndexWriter  - all working fine>

.

.

.

<cfset vField=CreateObject("java","org.apache.lucene.document.Field")>

 

<cfloop query="qData">

                <!--- create the document   [works OK] --- >

                <cfset
vDoc=CreateObject("java","org.apache.lucene.document.Document")>

 

                <!--- add fields to document [fails with 'No matching
constructor' no matter what I use] --- >

                <cfset vDoc.add(vField.Text("id", qData.id)>

 

.

.

.

 

Where qData is a database query returning the id column from a database
table (it is returning other columns too but as it won't even insert one
field I haven't shown the others in the code above).

 

I have also tried 

<cfset vDoc.add(vField.Text("id", "test">

<cfset vDoc.add(vField.Text("id", qData.id, vField.Store.YES,
vField.Index.NO)>  [this is the one that works in my JSP but it doesn't work
here...]

 

 

 

Has anyone else come across this problem?

 

Any ideas?

 

Cheers

Bryan.

 

 

 



---------------------------------------------------------------------
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: No Matching constructor

Posted by "Bryan Lewis [DAS]" <br...@dasmail.co.uk>.
The typos (missing ')' at the end of some statements are not in the original
code).


-----Original Message-----
From: Bryan Lewis [DAS] [mailto:bryan.lewis@dasmail.co.uk] 
Sent: 21 January 2010 14:19
To: java-user@lucene.apache.org
Subject: No Matching constructor

Hi,

 

I'm trying to create a Lucene index via Railo and am getting the above
error.

 

My code is as follows (and was working fine in a JSP page but doesn't seem
to want to play under Railo, using same version of Lucene 2.3.2 ):

 

<code above this to query database into qData,  create StandardAnalyzer,
IndexWriter  - all working fine>

.

.

.

<cfset vField=CreateObject("java","org.apache.lucene.document.Field")>

 

<cfloop query="qData">

                <!--- create the document   [works OK] --- >

                <cfset
vDoc=CreateObject("java","org.apache.lucene.document.Document")>

 

                <!--- add fields to document [fails with 'No matching
constructor' no matter what I use] --- >

                <cfset vDoc.add(vField.Text("id", qData.id)>

 

.

.

.

 

Where qData is a database query returning the id column from a database
table (it is returning other columns too but as it won't even insert one
field I haven't shown the others in the code above).

 

I have also tried 

<cfset vDoc.add(vField.Text("id", "test">

<cfset vDoc.add(vField.Text("id", qData.id, vField.Store.YES,
vField.Index.NO)>  [this is the one that works in my JSP but it doesn't work
here...]

 

 

 

Has anyone else come across this problem?

 

Any ideas?

 

Cheers

Bryan.

 

 

 



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