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 John Powers <jp...@configureone.com> on 2007/05/08 19:46:17 UTC

search problem/odd results

I don't understand why I'm getting the results I'm getting.

 

If I search for "pandock*" I get 6 results

Np-pandock

Np-pandock-L

Np-pandock-1

Np-pandock-2

Np-pandock

Np-pandock-L1

 

If I search for np-pandock I get 

Np-pandock

Np-pandock-L

 

If I search for pandock I get 

Np-pandock

Np-pandock-l

 

 

At this point, why those two?     I was searching on lots of fields but
now I've limited it to just this "name" field.    This is under lucene
1.4.

I have one field of name as a keyword , another (nametxt) as text type.
This is the name of the item.     I have other description fields I need
to search through but at this point I don't understand why "pandock" or
"np-pandock" get those two and nothing else.

 

If I search for np-pandock-l1 I get

Np-pandock-l1

 

So that makes sense.       but why would "pandock" only come back with
two results?

 

Thanks for any help in this matter.


Re: search problem/odd results

Posted by Andrzej Bialecki <ab...@getopt.org>.
John Powers wrote:
> Lucene 1.4 is what I use for the application and how I compile things
> But in the help/about it says "null"
> And I usually use the webstart, ya.  But I've tried from a downloaded
> jar as well.  and I'm using java1.6 from sun

Ah, all is clear now. Luke will not work with Lucene < 2.0. You should 
simply get the lukeall.jar and start it from cmd-line - and make sure 
that there are no other versions of Lucene jars on the classpath. 
lukeall.jar contains a copy of Lucene 2.1, and it should be able to open 
indexes created with 1.4.x.


-- 
Best regards,
Andrzej Bialecki     <><
  ___. ___ ___ ___ _ _   __________________________________
[__ || __|__/|__||\/|  Information Retrieval, Semantic Web
___|||__||  \|  ||  |  Embedded Unix, System Integration
http://www.sigram.com  Contact: info at sigram dot com


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


RE: search problem/odd results

Posted by John Powers <jp...@configureone.com>.
Lucene 1.4 is what I use for the application and how I compile things
But in the help/about it says "null"
And I usually use the webstart, ya.  But I've tried from a downloaded
jar as well.  and I'm using java1.6 from sun


-----Original Message-----
From: Andrzej Bialecki [mailto:ab@getopt.org] 
Sent: Wednesday, May 09, 2007 4:22 PM
To: java-user@lucene.apache.org
Subject: Re: search problem/odd results

John Powers wrote:
> java.lang.NoSuchFieldException: IMPL
>         at java.lang.Class.getDeclaredField(Unknown Source)

That's a strange one ... Which version of Lucene are you using with Luke

(you can check this in Help -> About box, look for "Lucene version:"). 
Are you running this from Java WebStart? Which version of JDK is this?

-- 

Best regards,
Andrzej Bialecki     <><
  ___. ___ ___ ___ _ _   __________________________________
[__ || __|__/|__||\/|  Information Retrieval, Semantic Web
___|||__||  \|  ||  |  Embedded Unix, System Integration
http://www.sigram.com  Contact: info at sigram dot 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: search problem/odd results

Posted by Andrzej Bialecki <ab...@getopt.org>.
John Powers wrote:
> java.lang.NoSuchFieldException: IMPL
>         at java.lang.Class.getDeclaredField(Unknown Source)

That's a strange one ... Which version of Lucene are you using with Luke 
(you can check this in Help -> About box, look for "Lucene version:"). 
Are you running this from Java WebStart? Which version of JDK is this?

-- 
Best regards,
Andrzej Bialecki     <><
  ___. ___ ___ ___ _ _   __________________________________
[__ || __|__/|__||\/|  Information Retrieval, Semantic Web
___|||__||  \|  ||  |  Embedded Unix, System Integration
http://www.sigram.com  Contact: info at sigram dot com


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


RE: search problem/odd results

Posted by John Powers <jp...@configureone.com>.
java.lang.NoSuchFieldException: IMPL
        at java.lang.Class.getDeclaredField(Unknown Source)
        at org.getopt.luke.Luke.openDirectory(Unknown Source)
        at org.getopt.luke.Luke.openIndex(Unknown Source)
        at org.getopt.luke.Luke.openOk(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at thinlet.Thinlet.invokeImpl(Unknown Source)
        at thinlet.Thinlet.invoke(Unknown Source)
        at thinlet.Thinlet.handleMouseEvent(Unknown Source)
        at thinlet.Thinlet.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Window.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
IMPL

-----Original Message-----
From: Daniel Naber [mailto:lucenelist2005@danielnaber.de] 
Sent: Wednesday, May 09, 2007 3:27 PM
To: java-user@lucene.apache.org
Subject: Re: search problem/odd results

On Wednesday 09 May 2007 16:17, John Powers wrote:

> Yes, it doesn't work.     it gives an error modal dialog box that says
> "IMPL".

Is there a more useful error message when you start Luke from the command 
line and try to open the index?

Regards
 Daniel

-- 
http://www.danielnaber.de

---------------------------------------------------------------------
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: search problem/odd results

Posted by Daniel Naber <lu...@danielnaber.de>.
On Wednesday 09 May 2007 16:17, John Powers wrote:

> Yes, it doesn't work.     it gives an error modal dialog box that says
> "IMPL".

Is there a more useful error message when you start Luke from the command 
line and try to open the index?

Regards
 Daniel

-- 
http://www.danielnaber.de

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


RE: search problem/odd results

Posted by John Powers <jp...@configureone.com>.
Yes, it doesn't work.     it gives an error modal dialog box that says
"IMPL".



-----Original Message-----
From: Daniel Naber [mailto:lucenelist2005@danielnaber.de] 
Sent: Tuesday, May 08, 2007 4:45 PM
To: java-user@lucene.apache.org
Subject: Re: search problem/odd results

On Tuesday 08 May 2007 23:42, John Powers wrote:

> I've had problems with luke in the past not being able to read the
> files. 

Just make sure you specify the directory, not the files when opening an 
index with Luke. Also use the latest version (0.7).

Regards
 Daniel

-- 

---------------------------------------------------------------------
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: search problem/odd results

Posted by Daniel Naber <lu...@danielnaber.de>.
On Tuesday 08 May 2007 23:42, John Powers wrote:

> I've had problems with luke in the past not being able to read the
> files. 

Just make sure you specify the directory, not the files when opening an 
index with Luke. Also use the latest version (0.7).

Regards
 Daniel

-- 
http://www.danielnaber.de

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


RE: search problem/odd results

Posted by John Powers <jp...@configureone.com>.
Here are the queries

In my code I have:
			System.out.println("luceneQuery: " +
luceneQuery);
			query =
MultiFieldQueryParser.parse(luceneQuery.toString(),
IndexerExternal.CARTABLE, IndexerExternal.getAnalyzer());
			System.out.println("query: " + query);


That produces this:

luceneQuery: ( (name:np-pandock*^1 nametxt:np-pandock*^1)
(name:"np-pandock*"^1 nametxt:"np-pandock*"^1) )

query: (name:np-pandock* nametxt:np-pandock*) (name:"np pandock"
nametxt:"np pandock")


I am using StandardAnalyzer

I've had problems with luke in the past not being able to read the
files.   So I don't use it.     But given the queries below, the data is
there, right?    If "pandock" works, wouldn't "np-pandock"  ... if it
didn't work completely, that'd be fine.   but it returns two.. why those
two?    That's the part I'm not getting.

Thanks for your response...

-----Original Message-----
From: Erick Erickson [mailto:erickerickson@gmail.com] 
Sent: Tuesday, May 08, 2007 1:47 PM
To: java-user@lucene.apache.org
Subject: Re: search problem/odd results

First question: What analyzers are you using at index and search time?

Second question: Have you tried using query.toString() to see how
the query parses? If so, you should post the results.

Third question: Have you used Luke to examine your index, to see
what's actually in there (which may surprise you depending upon
what analyzers you are using). You can also see how queries
parse using various analyzers. Which may also surprise you.

Best
Erick

On 5/8/07, John Powers <jp...@configureone.com> wrote:
>
> I don't understand why I'm getting the results I'm getting.
>
>
>
> If I search for "pandock*" I get 6 results
>
> Np-pandock
>
> Np-pandock-L
>
> Np-pandock-1
>
> Np-pandock-2
>
> Np-pandock
>
> Np-pandock-L1
>
>
>
> If I search for np-pandock I get
>
> Np-pandock
>
> Np-pandock-L
>
>
>
> If I search for pandock I get
>
> Np-pandock
>
> Np-pandock-l
>
>
>
>
>
> At this point, why those two?     I was searching on lots of fields
but
> now I've limited it to just this "name" field.    This is under lucene
> 1.4.
>
> I have one field of name as a keyword , another (nametxt) as text
type.
> This is the name of the item.     I have other description fields I
need
> to search through but at this point I don't understand why "pandock"
or
> "np-pandock" get those two and nothing else.
>
>
>
> If I search for np-pandock-l1 I get
>
> Np-pandock-l1
>
>
>
> So that makes sense.       but why would "pandock" only come back with
> two results?
>
>
>
> Thanks for any help in this matter.
>
>

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


Re: search problem/odd results

Posted by Erick Erickson <er...@gmail.com>.
First question: What analyzers are you using at index and search time?

Second question: Have you tried using query.toString() to see how
the query parses? If so, you should post the results.

Third question: Have you used Luke to examine your index, to see
what's actually in there (which may surprise you depending upon
what analyzers you are using). You can also see how queries
parse using various analyzers. Which may also surprise you.

Best
Erick

On 5/8/07, John Powers <jp...@configureone.com> wrote:
>
> I don't understand why I'm getting the results I'm getting.
>
>
>
> If I search for "pandock*" I get 6 results
>
> Np-pandock
>
> Np-pandock-L
>
> Np-pandock-1
>
> Np-pandock-2
>
> Np-pandock
>
> Np-pandock-L1
>
>
>
> If I search for np-pandock I get
>
> Np-pandock
>
> Np-pandock-L
>
>
>
> If I search for pandock I get
>
> Np-pandock
>
> Np-pandock-l
>
>
>
>
>
> At this point, why those two?     I was searching on lots of fields but
> now I've limited it to just this "name" field.    This is under lucene
> 1.4.
>
> I have one field of name as a keyword , another (nametxt) as text type.
> This is the name of the item.     I have other description fields I need
> to search through but at this point I don't understand why "pandock" or
> "np-pandock" get those two and nothing else.
>
>
>
> If I search for np-pandock-l1 I get
>
> Np-pandock-l1
>
>
>
> So that makes sense.       but why would "pandock" only come back with
> two results?
>
>
>
> Thanks for any help in this matter.
>
>