Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
cfpaperboy #1
accessing java method; lucene
:beer;
Trying to access alll field names from a specific lucene indes using the
"indexreader" and "indexsearcher" classes. According to Lucene documention,
getFieldNames is a method of "indexreader".
Not very knowleagable of java. Any help greatly appreciated.
Syntax for indexreader's get filenames is:
From CFDUMP var="#indexreader#"
Index Reader:
object [unknown type]
FieldNames [undefined value]Text
When posting CFdump var="#indexsearcher#" I get several methods to choose
from, but I ca'n't access anything but the public method (open).
searcher:
object of org.apache.lucene.search.IndexSearcher
Methods search (returns org.apache.lucene.search.TopDocs)
search (returns void)
search (returns org.apache.lucene.search.TopFieldDocs)
close (returns void)
doc (returns org.apache.lucene.document.Document)
maxDoc (returns int)
docFreq (returns int)
rewrite (returns org.apache.lucene.search.Query)
explain (returns org.apache.lucene.search.Explanation)
search (returns org.apache.lucene.search.Hits)
search (returns org.apache.lucene.search.Hits)
search (returns org.apache.lucene.search.Hits)
search (returns void)
search (returns org.apache.lucene.search.Hits)
setSimilarity (returns void)
getSimilarity (returns org.apache.lucene.search.Similarity)
hashCode (returns int)
getClass (returns java.lang.Class)
wait (returns void)
wait (returns void)
wait (returns void)
equals (returns boolean)
notify (returns void)
notifyAll (returns void)
toString (returns java.lang.String)
Text
Thanks for any help.
<cfparam name="name" default="images">
<cfscript>
index = "#request.sitepath#assets\lucene\#name#\"; // lucene index to search
against
// Determine if user has selected a specific index
// get an IndexReader object to use in the constructor to the searcher var
Reader = CreateObject("java", "org.apache.lucene.index.IndexReader");
// get an IndexSearcher object, call the constructor
mysearch = index;
searcher = CreateObject("java", "org.apache.lucene.search.IndexSearcher");
searcher2 = searcher;
searcher = searcher.init(Reader.open(mysearch));
ERROR!!! myfields = searcher.init.(reader.getfieldnames);
blah...
blah...
blah...
blah...
cfpaperboy Guest
-
AS file vs java method
Hi, I have written one java method that will return 0 or 1. i am calling the method from the mxml page. for that i am calling through script. 1. ... -
Error accessing Java Web service over SSL with X.509
Hello I’ve got a problem consuming a Web service made by another company (who use J2EE). The Web service requires an X.509 certificate, which I... -
#25663 [Opn->Bgs]: Contains no data - sometimes with Lucene/Java
ID: 25663 Updated by: sniper@php.net Reported By: huberfelix at web dot de -Status: Open +Status: ... -
#25663 [Opn]: Contains no data - sometimes with Lucene/Java
ID: 25663 User updated by: huberfelix at web dot de Reported By: huberfelix at web dot de Status: Open Bug Type: ... -
#25663 [NEW]: Contains no data - sometimes with Lucene/Java
From: huberfelix at web dot de Operating system: Linux Suse 8.1 PHP version: 4CVS-2003-09-25 (stable) PHP Bug Type: Java...



Reply With Quote

