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 kate <li...@livejournal.com> on 2006/02/04 07:09:33 UTC

Terms not being found in query

hi,

i have an index with documents containing n-grams, in fields such as 
"3gram", "4gram", etc.  one 5-gram found in the text is "oswax".  using 
Luke, i can see that a field with this value exists for a particular 
document.  however, searching for "5gram:oswax" produces no results (either 
using a query constructed by the query parser, or manually).  the n-gram 
fields are indexed and stored, but not tokenised.

i have tried setting maxFieldLength to Integer.MAX_VALUE with no change.

why do i receive no results?

k.

Re: Terms not being found in query

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Feb 4, 2006, at 1:09 AM, kate wrote:
> i have an index with documents containing n-grams, in fields such as
> "3gram", "4gram", etc.  one 5-gram found in the text is "oswax".   
> using
> Luke, i can see that a field with this value exists for a particular
> document.  however, searching for "5gram:oswax" produces no results  
> (either
> using a query constructed by the query parser, or manually).  the n- 
> gram
> fields are indexed and stored, but not tokenised.
>
> i have tried setting maxFieldLength to Integer.MAX_VALUE with no  
> change.
>
> why do i receive no results?

It looks like you've got all the troubleshooting bases covered, so  
I'm not sure what to suggest other than for you to post a simple test  
case that demonstrates the issue.  If you see the term in Luke, and  
it is indexed, then it most definitely can be used to find the  
document using a TermQuery (I hope that is what you meant as  
"manually").  If you're using QueryParser "manually", then perhaps  
your analyzer is causing an issue?   What is the .toString of your  
Query?

Setting maxFieldLength isn't the issue, otherwise you wouldn't have  
seen the term in Luke.

	Erik


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