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 Xin Herbert Wu <xi...@pathf.com> on 2006/02/05 05:54:57 UTC

Field search problem(only single word query works)

Hi,

I have two libraries A and B indexed from database tables where A has about
10 fields and B has about 30 fields(with about a couple of hundred records).
A and B both have a TEXT type field "headline" reading data from the same
database table column. 

 

However the field query - "headline: fire water" works for library A, NOT
for library B(returns 0 results without any error) when the headline field
value is "fire and water". But query "headline:fire headline:water" does
work for library B. 

 

Any possible reason why library B only accepts single word fielded query?

 

I am running Lucene 1.4.3 on Java 5/JBoss4.0.3 in XP/Linux environment. 

 

Thanks.

 

-Xin


RE: Field search problem(only single word query works)

Posted by Xin Herbert Wu <xi...@pathf.com>.
The Luke search worked on the index files. But my query client may be not
built correctly. Upon further test, I supplied an UnStored field in library
B with a guaranteed value - white space(previously it sometimes has new
StringBuffer().toString() empty value).  This makes my query client works
for now. But I will further look into my code and figure out the reason.
Thanks a lot!
-Xin

-----Original Message-----
From: Erik Hatcher [mailto:erik@ehatchersolutions.com] 
Sent: Sunday, February 05, 2006 3:26 AM
To: java-user@lucene.apache.org
Subject: Re: Field search problem(only single word query works)

I recommend you take a look at your indexes with Luke and see what  
actually is indexed.

	Erik


On Feb 4, 2006, at 11:54 PM, Xin Herbert Wu wrote:

> Hi,
>
> I have two libraries A and B indexed from database tables where A  
> has about
> 10 fields and B has about 30 fields(with about a couple of hundred  
> records).
> A and B both have a TEXT type field "headline" reading data from  
> the same
> database table column.
>
>
>
> However the field query - "headline: fire water" works for library  
> A, NOT
> for library B(returns 0 results without any error) when the  
> headline field
> value is "fire and water". But query "headline:fire headline:water"  
> does
> work for library B.
>
>
>
> Any possible reason why library B only accepts single word fielded  
> query?
>
>
>
> I am running Lucene 1.4.3 on Java 5/JBoss4.0.3 in XP/Linux  
> environment.
>
>
>
> Thanks.
>
>
>
> -Xin
>


---------------------------------------------------------------------
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: Field search problem(only single word query works)

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
I recommend you take a look at your indexes with Luke and see what  
actually is indexed.

	Erik


On Feb 4, 2006, at 11:54 PM, Xin Herbert Wu wrote:

> Hi,
>
> I have two libraries A and B indexed from database tables where A  
> has about
> 10 fields and B has about 30 fields(with about a couple of hundred  
> records).
> A and B both have a TEXT type field "headline" reading data from  
> the same
> database table column.
>
>
>
> However the field query - "headline: fire water" works for library  
> A, NOT
> for library B(returns 0 results without any error) when the  
> headline field
> value is "fire and water". But query "headline:fire headline:water"  
> does
> work for library B.
>
>
>
> Any possible reason why library B only accepts single word fielded  
> query?
>
>
>
> I am running Lucene 1.4.3 on Java 5/JBoss4.0.3 in XP/Linux  
> environment.
>
>
>
> Thanks.
>
>
>
> -Xin
>


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