A bit of progress on this post....

First off, I got the go ahead from the higher ups to install and configure
v2.0.  I have that installed, configured, indexed, and tested.  That is the
good news.

We were hoping this would just fix this problem, but it didn't.

>Are you able to modify this small stand-alone
>program to create the exception you are seeing?

I did run your small script (minorly modified for try/catch).  And here is
the output:

For qtxt 1* the result query is: allText:1*
Analyzer: [EMAIL PROTECTED]
       RESULTS:
       1 - 0.5

Alright now I am confused.  Why would this work but our classes - which are
practically the same - not work?  The only difference in your version and
mine is that you switch the IndexReader with RAMDirectory.

Any thoughts?



Doron Cohen wrote:
> 
> djd0383 <[EMAIL PROTECTED]> wrote on 25/09/2006 11:21:13:
>> Those two message print the following:
>> For qtxt 1* the result query is allText:1* and
>> The analyzer in use is:
>> org.apache.lucene.analysis.standard.StandardAnalyzer
> 
> This output seems ok - the analyzer is standard and seems to me the result
> query should be working. Are you able to modify this small stand-alone
> program to create the exception you are seeing?
> 
>   public static void main(String[] args) throws Exception {
>     // populate index with 2 docs
>     RAMDirectory dir = new RAMDirectory();
>     Analyzer anlzr = new StandardAnalyzer();
>     IndexWriter iw = new IndexWriter(dir,anlzr,true);
>     String fldName = "allText";
>     Document d1 = new Document();
>     d1.add(new Field(fldName,"This doc has no ones in
> it.",Store.NO,Index.TOKENIZED));
>     iw.addDocument(d1);
>     Document d2 = new Document();
>     d2.add(new Field(fldName,"This doc has:
> 123.",Store.NO,Index.TOKENIZED));
>     iw.addDocument(d2);
>     iw.close();
> 
>     String qtxt = "1*";
>     QueryParser qp = new QueryParser(fldName, anlzr);
>     Query query = qp.parse(qtxt);
>     System.out.println("For qtxt "+qtxt+" the result query is: " + query);
>     System.out.println("Analyzer: "+anlzr);
> 
>     IndexSearcher searcher = new IndexSearcher(dir);
>     Hits hits = searcher.search(query);
>     if (hits==null || hits.length()==0) {
>       System.out.println("       NO results.");
>     } else {
>       System.out.println("       RESULTS:");
>       for (int i = 0; i < hits.length(); i++) {
>         System.out.println("       "+hits.id(i)+" - "+hits.score(i));
>       }
>     }
> 
>   }
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Searching-with-%221%22-tf2320552.html#a6606447
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to