lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Powers" <jpow...@configureone.com>
Subject RE: search problem/odd results
Date Tue, 08 May 2007 21:42:01 GMT
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 <jpowers@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


Mime
View raw message